From 1d6418f3bcc4aef089d8851d851a2958e4ab65a0 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Wed, 31 Mar 1999 12:33:53 +0000 Subject: [PATCH] * automake.in (handle_tests): support XFAIL_TEST * automake.texi: document it --- ChangeLog | 5 +++++ automake.in | 37 +++++++++++++++++++++++++++++++------ automake.texi | 4 ++++ 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index cedf2a6e..caac9ff0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-03-31 Alexandre Oliva + + * automake.in (handle_tests): support XFAIL_TEST + * automake.texi: document it + 1999-03-27 Tom Tromey * automake.in (saw_sources_p): Correctly count header extensions diff --git a/automake.in b/automake.in index 5c07046a..576a85b7 100755 --- a/automake.in +++ b/automake.in @@ -3796,24 +3796,49 @@ sub handle_tests # Note: Solaris 2.7 seems to expand TESTS using VPATH. That's # why we choose `dir=' and not `dir=.' $output_rules .= 'check-TESTS: $(TESTS) - @failed=0; all=0; \\ + @failed=0; all=0; xfail=0; xpass=0; \\ srcdir=$(srcdir); export srcdir; \\ for tst in $(TESTS); do \\ if test -f $$tst; then dir=; \\ else dir="$(srcdir)/"; fi; \\ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \\ all=`expr $$all + 1`; \\ - echo "PASS: $$tst"; \\ + case " $(XFAIL_TESTS) " in \\ + *" $$tst "*) \\ + xpass=`expr $$xpass + 1`; \\ + failed=`expr $$failed + 1`; \\ + echo "XPASS: $$tst"; \\ + ;; \\ + *) \\ + echo "PASS: $$tst"; \\ + ;; \\ + esac; \\ elif test $$? -ne 77; then \\ all=`expr $$all + 1`; \\ - failed=`expr $$failed + 1`; \\ - echo "FAIL: $$tst"; \\ + case " $(XFAIL_TESTS) " in \\ + *" $$tst "*) \\ + xfail=`expr $$xfail + 1`; \\ + echo "XFAIL: $$tst"; \\ + ;; \\ + *) \\ + failed=`expr $$failed + 1`; \\ + echo "FAIL: $$tst"; \\ + ;; \\ + esac; \\ fi; \\ done; \\ if test "$$failed" -eq 0; then \\ - banner="All $$all tests passed"; \\ + if test "$$xfail" -eq 0; then \\ + banner="All $$all tests passed"; \\ + else \\ + banner="All $$all tests behaved as expected ($$xfail expected failures)"; \\ + fi; \\ else \\ - banner="$$failed of $$all tests failed"; \\ + if test "$$xpass" -eq 0; then \\ + banner="$$failed of $$all tests failed"; \\ + else \\ + banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \\ + fi; \\ fi; \\ dashes=`echo "$$banner" | sed s/./=/g`; \\ echo "$$dashes"; \\ diff --git a/automake.texi b/automake.texi index ccea2a9d..11dee30c 100644 --- a/automake.texi +++ b/automake.texi @@ -2946,6 +2946,10 @@ names. @vindex RUNTESTFLAGS @c FIXME xref dejagnu +If you're not using dejagnu, you may define the variable +@samp{XFAIL_TESTS} to a list of tests (usually a subset of @samp{TESTS}) +that are expected to fail. This will reverse the result of those tests. + In either case, the testing is done via @samp{make check}. -- 2.43.5