]> sourceware.org Git - automake.git/commitdiff
* automake.in (handle_tests): support XFAIL_TEST
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Wed, 31 Mar 1999 12:33:53 +0000 (12:33 +0000)
committerAlexandre Oliva <oliva@dcc.unicamp.br>
Wed, 31 Mar 1999 12:33:53 +0000 (12:33 +0000)
* automake.texi: document it

ChangeLog
automake.in
automake.texi

index cedf2a6e679c65239e43de1f857775038598cece..caac9ff029b5eb06b1f263db24dcadfd22d0136c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-03-31  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * automake.in (handle_tests): support XFAIL_TEST
+       * automake.texi: document it
+
 1999-03-27  Tom Tromey  <tromey@cygnus.com>
 
        * automake.in (saw_sources_p): Correctly count header extensions
index 5c07046a2a5041e2c9ca2c1fd6392b3b52e872fd..576a85b7f5827ff56d19b7088cdb5c38f0b21bf0 100755 (executable)
@@ -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"; \\
index ccea2a9d8fea56c934af0cc3392e3ed5f4688849..11dee30cdfa3ad4be110e87989614c2609349736 100644 (file)
@@ -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}.
 
 
This page took 0.046146 seconds and 5 git commands to generate.