Add Makefile target to run all tests without test-driver
authorIvan Maidanski <ivmai@mail.ru>
Sat, 18 Feb 2017 07:23:33 +0000 (10:23 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 18 Feb 2017 07:24:36 +0000 (10:24 +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).

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

tests/Makefile.am

index 94c317c..418839f 100644 (file)
@@ -43,6 +43,16 @@ test_malloc_LDADD = $(THREADDLLIBS) \
         $(top_builddir)/src/libatomic_ops_gpl.la \
         $(top_builddir)/src/libatomic_ops.la
 
+# Run the tests directly (without test-driver):
+.PHONY: check-without-test-driver
+check-without-test-driver: $(TESTS)
+       @echo "The following will print some 'Missing ...' messages"
+       ./test_atomic
+       ./test_atomic_generalized
+       ./test_stack
+       ./test_malloc
+       test ! -f test_atomic_pthreads || ./test_atomic_pthreads
+
 test_atomic_include.h: test_atomic_include.template
        mkdir -p `dirname $@`
        sed -e s:XX::g $? > $@