Add Makefile target to run all tests without test-driver
authorIvan Maidanski <ivmai@mail.ru>
Wed, 1 Mar 2017 23:23:32 +0000 (02:23 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 1 Mar 2017 23:23:32 +0000 (02:23 +0300)
This could be used to catch errors reported by MemorySanitizer
(the traditional "make check" shows the tests with MSan errors as
skipped, so it does not lead to a non-zero exit code of make itself).

* cord/cord.am (check-without-test-driver): New phony target (to
compile, link and execute the tests not using test-driver).
* tests/tests.am (check-without-test-driver): Likewise.

cord/cord.am
tests/tests.am

index b8794c2..4ac2da8 100644 (file)
@@ -32,3 +32,8 @@ pkginclude_HEADERS += \
         include/cord.h \
         include/cord_pos.h \
         include/ec.h
+
+# Run the tests directly (without test-driver):
+.PHONY: check-without-test-driver
+check-without-test-driver: $(TESTS)
+       ./cordtest$(EXEEXT)
index 4b46c07..af581a7 100644 (file)
@@ -119,3 +119,23 @@ disclaim_bench_SOURCES = tests/disclaim_bench.c
 disclaim_bench_LDADD = $(test_ldadd)
 
 endif
+
+# Run the tests directly (without test-driver):
+.PHONY: check-without-test-driver
+check-without-test-driver: $(TESTS)
+       ./gctest$(EXEEXT)
+       ./hugetest$(EXEEXT)
+       ./leaktest$(EXEEXT)
+       ./middletest$(EXEEXT)
+       ./realloc_test$(EXEEXT)
+       ./smashtest$(EXEEXT)
+       ./staticrootstest$(EXEEXT)
+       test ! -f disclaim_bench$(EXEEXT) || ./disclaim_bench$(EXEEXT)
+       test ! -f disclaim_test$(EXEEXT) || ./disclaim_test$(EXEEXT)
+       test ! -f initsecondarythread_test$(EXEEXT) \
+         || ./initsecondarythread_test$(EXEEXT)
+       test ! -f threadkey_test$(EXEEXT) || ./threadkey_test$(EXEEXT)
+       test ! -f threadleaktest$(EXEEXT) || ./threadleaktest$(EXEEXT)
+       test ! -f subthreadcreate_test$(EXEEXT) || ./subthreadcreate_test$(EXEEXT)
+       test ! -f test_cpp$(EXEEXT) || ./test_cpp$(EXEEXT)
+       test ! -f tracetest$(EXEEXT) || ./tracetest$(EXEEXT)