mirror of
https://github.com/brl/mutter.git
synced 2025-04-13 05:39:38 +00:00
Restore the report on the conformance test suite
The report generation was broken by the split of the various test units; also, we were using GTest in a way that's not really sanctioned by upstream. This commit tries to re-use the targets from GLib's Makefile rules while compensating for our own set up.
This commit is contained in:
parent
608a5a8ae6
commit
7d1445afca
4
tests/conform/.gitignore
vendored
4
tests/conform/.gitignore
vendored
@ -114,3 +114,7 @@
|
|||||||
/test-cogl-depth-test
|
/test-cogl-depth-test
|
||||||
/test-cogl-pixel-array
|
/test-cogl-pixel-array
|
||||||
/wrappers
|
/wrappers
|
||||||
|
/*-report.xml
|
||||||
|
/*-report.html
|
||||||
|
/*-report-npot.xml
|
||||||
|
/*-report-npot.html
|
||||||
|
@ -113,70 +113,102 @@ test_conformance_LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFI
|
|||||||
|
|
||||||
test_conformance_LDFLAGS = -export-dynamic
|
test_conformance_LDFLAGS = -export-dynamic
|
||||||
|
|
||||||
.PHONY: test
|
|
||||||
.PHONY: test-report test-report-normal test-report-disable-npots
|
|
||||||
.PHONY: full-report full-report-normal full-report-disable-npots
|
|
||||||
.PHONY: full-report-generate
|
|
||||||
|
|
||||||
test: wrappers
|
test: wrappers
|
||||||
@$(top_srcdir)/tests/conform/run-tests.sh \
|
@$(top_srcdir)/tests/conform/run-tests.sh \
|
||||||
./test-conformance$(EXEEXT) test-conformance-results.xml
|
./test-conformance$(EXEEXT) -o test-report.xml
|
||||||
|
|
||||||
test-verbose: wrappers
|
test-verbose: wrappers
|
||||||
@$(top_srcdir)/tests/conform/run-tests.sh \
|
@$(top_srcdir)/tests/conform/run-tests.sh \
|
||||||
./test-conformance$(EXEEXT) test-conformance-results.xml --verbose
|
./test-conformance$(EXEEXT) -o test-report.xml --verbose
|
||||||
|
|
||||||
test-report-normal: wrappers
|
GTESTER = gtester
|
||||||
@$(top_srcdir)/tests/conform/run-tests.sh \
|
GTESTER_REPORT = gtester-report
|
||||||
./test-conformance$(EXEEXT) test-conformance-results.xml -k \
|
|
||||||
&& ( gtester-report test-conformance-results.xml \
|
|
||||||
| sed 's/>GTester Unit Test Report</>GTester Unit Test Report (normal)</' \
|
|
||||||
> test-conformance-results.html ) \
|
|
||||||
&& gnome-open ./test-conformance-results.html
|
|
||||||
|
|
||||||
test-report-disable-npots: wrappers
|
# XXX: we could prevent the conformance test suite from running
|
||||||
@../tools/disable-npots.sh \
|
# by simply defining this variable conditionally
|
||||||
|
TEST_PROGS = test-conformance
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
|
.PHONY: test-report perf-report full-report
|
||||||
|
.PHONY: test-report-npot perf-report-npot full-report-npot
|
||||||
|
|
||||||
|
# test-report: run tests and generate report
|
||||||
|
# perf-report: run tests with -m perf and generate report
|
||||||
|
# full-report: like test-report: with -m perf and -m slow
|
||||||
|
test-report perf-report full-report: ${TEST_PROGS}
|
||||||
|
@test -z "${TEST_PROGS}" || { \
|
||||||
|
export GTESTER_LOGDIR=`mktemp -d "$(srcdir)/.testlogs-XXXXXX"` ; \
|
||||||
|
case $@ in \
|
||||||
|
test-report) test_options="-k";; \
|
||||||
|
perf-report) test_options="-k -m=perf";; \
|
||||||
|
full-report) test_options="-k -m=perf -m=slow";; \
|
||||||
|
esac ; \
|
||||||
$(top_srcdir)/tests/conform/run-tests.sh \
|
$(top_srcdir)/tests/conform/run-tests.sh \
|
||||||
./test-conformance$(EXEEXT) test-conformance-results-dn.xml -k \
|
./test-conformance$(EXEEXT) \
|
||||||
&& ( gtester-report test-conformance-results-dn.xml \
|
--verbose \
|
||||||
| sed 's/>GTester Unit Test Report</>GTester Unit Test Report (no NPOTs)</' \
|
$$test_options \
|
||||||
> test-conformance-results-dn.html ) \
|
-o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ; \
|
||||||
&& gnome-open ./test-conformance-results-dn.html
|
echo '<?xml version="1.0"?>' > $@.xml ; \
|
||||||
|
echo '<report-collection>' >> $@.xml ; \
|
||||||
|
echo '<info>' >> $@.xml ; \
|
||||||
|
echo ' <package>$(PACKAGE)</package>' >> $@.xml ; \
|
||||||
|
echo ' <version>$(VERSION)</version>' >> $@.xml ; \
|
||||||
|
echo '</info>' >> $@.xml ; \
|
||||||
|
for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
|
||||||
|
sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
|
||||||
|
done ; \
|
||||||
|
echo >> $@.xml ; \
|
||||||
|
echo '</report-collection>' >> $@.xml ; \
|
||||||
|
${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
|
||||||
|
rm -rf "$$GTESTER_LOGDIR" ; \
|
||||||
|
}
|
||||||
|
|
||||||
test-report: test-report-normal
|
# same as above, but with a wrapper that forcibly disables non-power of
|
||||||
|
# two textures
|
||||||
full-report-normal: wrappers
|
test-report-npot perf-report-npot full-report-npot: ${TEST_PROGS}
|
||||||
@$(top_srcdir)/tests/conform/run-tests.sh \
|
@test -z "${TEST_PROGS}" || { \
|
||||||
./test-conformance$(EXEEXT) test-conformance-results.xml -k -m=slow \
|
$(top_srcdir)/tests/tools/disable-npots.sh ; \
|
||||||
&& ( gtester-report test-conformance-results.xml \
|
export GTESTER_LOGDIR=`mktemp -d "$(srcdir)/.testlogs-XXXXXX"` ; \
|
||||||
| sed 's/>GTester Unit Test Report</>GTester Unit Test Report (normal)</' \
|
case $@ in \
|
||||||
> test-conformance-results.html )
|
test-report-npot) test_options="-k";; \
|
||||||
|
perf-report-npot) test_options="-k -m=perf";; \
|
||||||
full-report-disable-npots: wrappers
|
full-report-npot) test_options="-k -m=perf -m=slow";; \
|
||||||
@../tools/disable-npots.sh \
|
esac ; \
|
||||||
$(top_srcdir)/tests/conform/run-tests.sh \
|
$(top_srcdir)/tests/conform/run-tests.sh \
|
||||||
./test-conformance$(EXEEXT) test-conformance-results-dn.xml -k -m=slow \
|
./test-conformance$(EXEEXT) \
|
||||||
&& ( gtester-report test-conformance-results-dn.xml \
|
--verbose \
|
||||||
| sed 's/>GTester Unit Test Report</>GTester Unit Test Report (no NPOTs)</' \
|
$$test_options \
|
||||||
> test-conformance-results-dn.html )
|
-o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ; \
|
||||||
|
echo '<?xml version="1.0"?>' > $@.xml ; \
|
||||||
|
echo '<report-collection>' >> $@.xml ; \
|
||||||
|
echo '<info>' >> $@.xml ; \
|
||||||
|
echo ' <package>$(PACKAGE)</package>' >> $@.xml ; \
|
||||||
|
echo ' <version>$(VERSION)</version>' >> $@.xml ; \
|
||||||
|
echo '</info>' >> $@.xml ; \
|
||||||
|
for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
|
||||||
|
sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
|
||||||
|
done ; \
|
||||||
|
echo >> $@.xml ; \
|
||||||
|
echo '</report-collection>' >> $@.xml ; \
|
||||||
|
${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
|
||||||
|
rm -rf "$$GTESTER_LOGDIR" ; \
|
||||||
|
}
|
||||||
|
|
||||||
XML_REPORTS = test-conformance-results.xml
|
XML_REPORTS = \
|
||||||
HTML_REPORTS = test-conformance-results.html
|
test-report.xml \
|
||||||
|
perf-report.xml \
|
||||||
|
full-report.xml \
|
||||||
|
test-report-npot.xml \
|
||||||
|
perf-report-npot.xml \
|
||||||
|
full-report-npot.xml
|
||||||
|
|
||||||
if HAVE_LIBDL
|
HTML_REPORTS = \
|
||||||
XML_REPORTS += test-conformance-results-dn.xml
|
test-report.html \
|
||||||
HTML_REPORTS += test-conformance-results-dn.html
|
perf-report.html \
|
||||||
full-report-generate: full-report-normal full-report-disable-npots
|
full-report.html \
|
||||||
|
test-report-npot.html \
|
||||||
else
|
perf-report-npot.html \
|
||||||
full-report-generate: full-report-normal
|
full-report-npot.html
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
full-report: full-report-generate
|
|
||||||
@for x in $(HTML_REPORTS); do \
|
|
||||||
gnome-open "$$x"; \
|
|
||||||
done
|
|
||||||
|
|
||||||
EXTRA_DIST = ADDING_NEW_TESTS test-launcher.sh.in run-tests.sh
|
EXTRA_DIST = ADDING_NEW_TESTS test-launcher.sh.in run-tests.sh
|
||||||
DISTCLEANFILES = test-launcher.sh
|
DISTCLEANFILES = test-launcher.sh
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
BINARY=$1
|
BINARY=$1
|
||||||
shift
|
shift
|
||||||
XML=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
TMP=`./$BINARY -l -m thorough | grep '^/' | sed -e s/_/-/g`
|
TMP=`./$BINARY -l -m thorough | grep '^/' | sed -e s/_/-/g`
|
||||||
for i in $TMP
|
for i in $TMP
|
||||||
@ -11,4 +9,4 @@ do
|
|||||||
TESTS="$TESTS wrappers/`basename $i`"
|
TESTS="$TESTS wrappers/`basename $i`"
|
||||||
done
|
done
|
||||||
|
|
||||||
exec gtester -o=$XML "$@" $TESTS
|
exec gtester "$@" $TESTS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user