From 8ae12a8ec24f2e6029702b2f107f9f0433c1d82c Mon Sep 17 00:00:00 2001 From: Peter Griess Date: Thu, 26 Sep 2013 09:20:24 -0500 Subject: [PATCH] Only run eventfd tests on Linux. Summary: - Detect Linux and define the HAVE_LINUX autoconf macro. Use this to elide eventfd tests in tests/Makefile.am. Test Plan: - fbconfig -r folly && fbmake runtests - ./configure && make check on Ubuntu/FC/Mac Reviewed By: delong.j@fb.com FB internal diff: D998507 --- folly/configure.ac | 1 + folly/test/Makefile.am | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/folly/configure.ac b/folly/configure.ac index 664c83d5..6d9fb1e5 100644 --- a/folly/configure.ac +++ b/folly/configure.ac @@ -110,6 +110,7 @@ AC_SUBST(AM_LDFLAGS, "$BOOST_LDFLAGS $BOOST_THREAD_LIB $BOOST_SYSTEM_LIB $BOOST_ AM_CONDITIONAL([HAVE_STD_THREAD], [test "$ac_cv_header_features" = "yes"]) AM_CONDITIONAL([HAVE_X86_64], [test "$build_cpu" = "x86_64"]) +AM_CONDITIONAL([HAVE_LINUX], [test "$build_os" == "linux-gnu"]) # Output AC_CONFIG_FILES([Makefile diff --git a/folly/test/Makefile.am b/folly/test/Makefile.am index 6ec48124..65cab8a5 100644 --- a/folly/test/Makefile.am +++ b/folly/test/Makefile.am @@ -61,8 +61,11 @@ fbstring_test_using_jemalloc_SOURCES = FBStringTest.cpp fbstring_test_using_jemalloc_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la TESTS += fbstring_test_using_jemalloc +if HAVE_LINUX eventfd_test_SOURCES = EventFDTest.cpp eventfd_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la +TESTS += eventfd_test +endif thread_cached_int_test_SOURCES = ThreadCachedIntTest.cpp thread_cached_int_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la @@ -70,7 +73,7 @@ thread_cached_int_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark thread_local_test_SOURCES = ThreadLocalTest.cpp thread_local_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la -TESTS += eventfd_test thread_cached_int_test thread_local_test +TESTS += thread_cached_int_test thread_local_test fbvector_test_SOURCES = FBVectorTest.cpp fbvector_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la -- 2.34.1