From 2a23bab8191678f33f10f0bd15fc05c7b05c89d3 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 12 Oct 2010 15:43:42 +0100 Subject: [PATCH] conform: Save the revision and date inside the test report Even if gtester-report doesn't use that information (yet), we should store the revision of Clutter that generated the report, and the date in which the test suite was ran. --- tests/conform/Makefile.am | 41 +++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am index 1e723e7e8..c5b5e0806 100644 --- a/tests/conform/Makefile.am +++ b/tests/conform/Makefile.am @@ -100,6 +100,7 @@ stamp-test-conformance: Makefile $(srcdir)/test-conform-main.c echo "/test-launcher.sh" ; \ echo "*.o" ; \ echo "*.xml" ; \ + echo "*.html" ; \ echo ".gitignore" ; \ echo "unit-tests" ; \ echo "/wrappers/" ) > .gitignore @@ -175,6 +176,12 @@ TEST_PROGS = test-conformance test-report perf-report full-report: ${TEST_PROGS} @test -z "${TEST_PROGS}" || { \ export GTESTER_LOGDIR=`mktemp -d "$(srcdir)/.testlogs-XXXXXX"` ; \ + if test -d "$(top_srcdir)/.git"; then \ + export REVISION="`git describe`" ; \ + else \ + export REVISION="$(VERSION) $(CLUTTER_RELEASE_STATUS)" ; \ + fi ; \ + export TIMESTAMP=`date +%Y-%m-%dT%H:%M:%S%z` ; \ case $@ in \ test-report) test_options="-k";; \ perf-report) test_options="-k -m=perf";; \ @@ -185,12 +192,14 @@ test-report perf-report full-report: ${TEST_PROGS} --verbose \ $$test_options \ -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ; \ - echo '' > $@.xml ; \ - echo '' >> $@.xml ; \ - echo '' >> $@.xml ; \ - echo ' $(PACKAGE)' >> $@.xml ; \ - echo ' $(VERSION)' >> $@.xml ; \ - echo '' >> $@.xml ; \ + echo '' > $@.xml ; \ + echo '' >> $@.xml ; \ + echo '' >> $@.xml ; \ + echo ' $(PACKAGE)' >> $@.xml ; \ + echo ' $(VERSION)' >> $@.xml ; \ + echo " $$REVISION" >> $@.xml ; \ + echo " $$TIMESTAMP" >> $@.xml ; \ + echo '' >> $@.xml ; \ for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \ sed '1,1s/^?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \ done ; \ @@ -206,6 +215,12 @@ test-report-npot perf-report-npot full-report-npot: ${TEST_PROGS} @test -z "${TEST_PROGS}" || { \ $(top_srcdir)/tests/tools/disable-npots.sh ; \ export GTESTER_LOGDIR=`mktemp -d "$(srcdir)/.testlogs-XXXXXX"` ; \ + if test -d "$(top_srcdir)/.git"; then \ + export REVISION="`git describe`" ; \ + else \ + export REVISION="$(VERSION) $(CLUTTER_RELEASE_STATUS)" ; \ + fi ; \ + export TIMESTAMP=`date +%Y-%m-%dT%H:%M:%S%z` ; \ case $@ in \ test-report-npot) test_options="-k";; \ perf-report-npot) test_options="-k -m=perf";; \ @@ -216,12 +231,14 @@ test-report-npot perf-report-npot full-report-npot: ${TEST_PROGS} --verbose \ $$test_options \ -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ; \ - echo '' > $@.xml ; \ - echo '' >> $@.xml ; \ - echo '' >> $@.xml ; \ - echo ' $(PACKAGE)' >> $@.xml ; \ - echo ' $(VERSION)' >> $@.xml ; \ - echo '' >> $@.xml ; \ + echo '' > $@.xml ; \ + echo '' >> $@.xml ; \ + echo '' >> $@.xml ; \ + echo ' $(PACKAGE)' >> $@.xml ; \ + echo ' $(VERSION)' >> $@.xml ; \ + echo " $$REVISION" >> $@.xml ; \ + echo " $$TIMESTAMP" >> $@.xml ; \ + echo '' >> $@.xml ; \ for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \ sed '1,1s/^?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \ done ; \