summaryrefslogtreecommitdiff
path: root/xts5
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2010-02-20 12:15:56 -0800
committerDan Nicholson <dbn.lists@gmail.com>2010-02-20 12:20:23 -0800
commit5d263b6dbe4c354b866b1c9b19522f75c01cbf44 (patch)
tree0ab8f87d65ee036dd86ace646ef75ea7356e2026 /xts5
parentf7ea1a704c9d2f5ff382b22b9590577e485beda8 (diff)
xts5: Include summary report in results
Give users a quick summary of the test results with the xts-report "no details" mode. This will appear next to the journal as summary.
Diffstat (limited to 'xts5')
-rw-r--r--xts5/Makefile.am13
-rw-r--r--xts5/bin/xts-run.in9
2 files changed, 19 insertions, 3 deletions
diff --git a/xts5/Makefile.am b/xts5/Makefile.am
index 5aaf01a9..68b6be33 100644
--- a/xts5/Makefile.am
+++ b/xts5/Makefile.am
@@ -28,8 +28,9 @@ bin/xts-run: bin/xts-run.in
# Setup for testing
TCC = $(top_builddir)/src/tet3/tcc/tcc$(EXEEXT)
-run_tcc = TET_ROOT='$(top_srcdir)' $(TCC) -e -a $(abs_builddir) \
- -i "$(top_builddir)/xts-`date +%F-%R`" -x tetexec.cfg xts5
+run_tcc = TET_ROOT='$(top_srcdir)' $(TCC) -e -a '$(abs_builddir)' \
+ -x tetexec.cfg
+report = $(builddir)/src/bin/reports/xts-report$(EXEEXT) -d2
scenario =
XTS_CONFIG = TET_ROOT='$(top_srcdir)' XSET='$(XSET)' XDPYINFO='$(XDPYINFO)' \
$(PERL) -p $(srcdir)/bin/xts-config
@@ -37,7 +38,13 @@ XTS_CONFIG = TET_ROOT='$(top_srcdir)' XSET='$(XSET)' XDPYINFO='$(XDPYINFO)' \
tetexec.cfg: tetexec.cfg.in $(srcdir)/bin/xts-config
$(AM_V_GEN)$(XTS_CONFIG) < $< > $@.tmp && mv -f $@.tmp $@ || rm -f $@.tmp
check-local: tetexec.cfg
- $(run_tcc) $(scenario)
+ @outdir="$(top_builddir)/xts-`date +%F-%R`"; \
+ echo $(run_tcc) -i "$$outdir" xts5 $(scenario); \
+ $(run_tcc) -i "$$outdir" xts5 $(scenario); \
+ ret=$$?; \
+ echo $(report) -f "$$outdir/journal" ">" "$$outdir/summary"; \
+ $(report) -f "$$outdir/journal" > "$$outdir/summary"; \
+ exit $$ret
# Helpful pattern target for testing subsets (test-Xopen, etc.)
test-%:
diff --git a/xts5/bin/xts-run.in b/xts5/bin/xts-run.in
index 93d3eb05..94fd83c2 100644
--- a/xts5/bin/xts-run.in
+++ b/xts5/bin/xts-run.in
@@ -7,6 +7,7 @@ PACKAGE_VERSION="%PACKAGE_VERSION%"
TCC="${TCC-${bindir}/tcc}"
PERL=${PERL-perl}
XTS_CONFIG="${XTS_CONFIG-${bindir}/xts-config}"
+XTS_REPORT="${XTS_REPORT-${bindir}/xts-report}"
prog=$0
config=
@@ -82,4 +83,12 @@ if [ ! -d "$outdir" ] && ! mkdir -p "$outdir"; then
exit 1
fi
+# run the tests
"$TCC" -e -i "$outdir" -x "$config" xts5 $scenario
+ret=$?
+
+# generate a short report
+"$XTS_REPORT" -d2 -f "$outdir/journal" > "$outdir/summary"
+
+# return the tcc exit code
+exit $ret