fix issues with the open source tests
authorAdam Simpkins <simpkins@fb.com>
Thu, 15 Jun 2017 18:28:06 +0000 (11:28 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 15 Jun 2017 18:35:40 +0000 (11:35 -0700)
Summary:
Fix build problems in the open source Makefiles that cause issues when running
`make check`

- The test subdirectory needs to be processed before experimental, since some
  tests in experimental/ depend on libfollytestmain from test/
- The stats/test Makefile had an incorrectly copy-and-pasted line for
  libgtest_la_SOURCES but didn't actually build a libgtest.la library.
- The test/ Makefile defined thread_id_test but forgot to add it to TESTS so
  that it would actually be run as part of "make check"

Reviewed By: Orvid

Differential Revision: D5249132

fbshipit-source-id: 5a71e1f72a39d5407b843a5876891c67238ec006

folly/Makefile.am
folly/stats/test/Makefile.am
folly/test/Makefile.am

index 558a48596139771dd507c0a27180180364415849..b2bad52a79d01b83428d01cd968a9407b46c98ec 100644 (file)
@@ -2,7 +2,10 @@ if FOLLY_TESTMAIN
 MAYBE_INIT = init
 endif
 
-SUBDIRS = . experimental $(MAYBE_INIT) test io/test stats/test
+# Note that the order of SUBDIRS matters.
+# Many subdirectories depend on libfollytest from the test directory,
+# so it must appear before other directories
+SUBDIRS = . test experimental $(MAYBE_INIT) io/test stats/test
 
 ACLOCAL_AMFLAGS = -I m4
 
index 0957edc108fd08192e7da5ce623ba99b2a3596bb..f6f4715012672179696ef2a87a20a7b10bf4b9cf 100755 (executable)
@@ -3,8 +3,6 @@ ACLOCAL_AMFLAGS = -I m4
 CPPFLAGS = -I$(top_srcdir)/test/gtest/googletest/include
 ldadd = $(top_builddir)/test/libfollytestmain.la
 
-libgtest_la_SOURCES = gtest/googletest/src/gtest-all.cc
-
 check_PROGRAMS = \
        histogram_test
 
index 7494920df1f82850e04b19cd4d49eea5c30b409f..539b60002559fcfa7d2570869a337a1825825d31 100644 (file)
@@ -98,6 +98,7 @@ thread_cached_int_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybench
 
 thread_id_test_SOURCES = ThreadIdTest.cpp
 thread_id_test_LDADD = libfollytestmain.la
+TESTS += thread_id_test
 
 thread_local_test_SOURCES = ThreadLocalTest.cpp
 thread_local_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la