+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
# 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"; \\
@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}.