about summary refs log tree commit diff
path: root/support/Makefile
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-12-28 13:37:18 +0100
committerFlorian Weimer <fweimer@redhat.com>2016-12-28 13:37:18 +0100
commit5f0b84379024787bae24ad20e81d26ab2f082389 (patch)
tree41c4fdcd00da543528b49cfd4c3e5a9489ba7f85 /support/Makefile
parent9c30df69c485ba93cdb4428c9bea6da371fb16ef (diff)
downloadglibc-5f0b84379024787bae24ad20e81d26ab2f082389.tar.gz
glibc-5f0b84379024787bae24ad20e81d26ab2f082389.tar.xz
glibc-5f0b84379024787bae24ad20e81d26ab2f082389.zip
support: Add support for delayed test failure reporting
The new functions support_record_failure records a test failure,
but does not terminate the process.  The macros TEST_VERIFY
and TEST_VERIFY_EXIT check that a condition is true.
Diffstat (limited to 'support/Makefile')
-rw-r--r--support/Makefile18
1 files changed, 17 insertions, 1 deletions
diff --git a/support/Makefile b/support/Makefile
index bd425afc2b..1bde8bd740 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -30,11 +30,14 @@ libsupport-routines = \
   ignore_stderr \
   oom_error \
   set_fortify_handler \
+  support_record_failure \
   support_test_main \
+  support_test_verify_impl \
   temp_file \
   write_message \
   xasprintf \
   xcalloc \
+  xfork \
   xmalloc \
   xpthread_barrier_destroy \
   xpthread_barrier_init \
@@ -51,6 +54,7 @@ libsupport-routines = \
   xpthread_spin_lock \
   xpthread_spin_unlock \
   xrealloc \
+  xwaitpid \
 
 libsupport-static-only-routines := $(libsupport-routines)
 # Only build one variant of the library.
@@ -59,6 +63,18 @@ ifeq ($(build-shared),yes)
 libsupport-inhibit-o += .o
 endif
 
-tests = README-testing
+tests = \
+  README-testing \
+  tst-support_record_failure \
+
+tests-special = \
+  $(objpfx)tst-support_record_failure-2.out
+
+$(objpfx)tst-support_record_failure-2.out: tst-support_record_failure-2.sh \
+  $(objpfx)tst-support_record_failure
+	$(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
+	  '$(run-program-env)' '$(test-program-prefix-after-env)' \
+	  > $@; \
+	$(evaluate-test)
 
 include ../Rules