fixup! Try adding --xml option to run/tests.
authorCarl Hetherington <cth@carlh.net>
Tue, 16 Jun 2020 06:17:43 +0000 (08:17 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 16 Jun 2020 06:17:43 +0000 (08:17 +0200)
cscript
run/tests

diff --git a/cscript b/cscript
index f4e184e0d4a68c183a95a9290182f8acce2abb3c..1e47b9dc7c1836ebf034f4cc8d7eb16a75e95dac 100644 (file)
--- a/cscript
+++ b/cscript
@@ -389,7 +389,7 @@ def dependencies(target, options):
 
     return deps
 
-option_defaults = { "gui": True, "variant": None }
+option_defaults = { "gui": True, "variant": None, "xml": False }
 
 def configure_options(target, options):
     opt = ''
@@ -719,10 +719,12 @@ def make_manual(target):
     target.command('pdflatex colour.tex')
     return [os.path.abspath('pdf'), os.path.abspath('html'), os.path.abspath('colour.pdf')]
 
-def test(target, test):
+def test(target, options, test):
     if target.platform != 'windows':
         target.set('LC_ALL', 'C')
-        cmd = 'run/tests --xml '
+        cmd = 'run/tests'
+        if options['xml']:
+            target += '--xml '
         if target.debug:
             cmd += '--backtrace '
         if test is not None:
index b243efccbc9b13893b739e74b28dffd672f20f47..f143514d49a80c063d3954c6e57eeb9f0bf220fc 100755 (executable)
--- a/run/tests
+++ b/run/tests
@@ -27,6 +27,7 @@ elif [ "$1" == "--helgrind" ]; then
     shift;
     valgrind --tool="helgrind" build/test/unit-tests $*
 elif [ "$1" == "--xml" ]; then
+    shift;
     build/test/unit-tests --catch_system_errors=no --log_format=XML --log_sink=results.xml --log_level=all --report_level=no --result_code=no
 else
     ulimit -c unlimited