summaryrefslogtreecommitdiff
path: root/cscript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-04-20 20:49:04 +0200
committerCarl Hetherington <cth@carlh.net>2022-05-04 19:37:38 +0200
commit80a97d01ba21df6d06ca750789bfe0bbacaaee4a (patch)
tree8a42399a2bd5b27eb9252ae574427100a2a556f3 /cscript
parentdf504d64b878a409d469df8a166558919e3c2afb (diff)
Allow tests to be run on Windows.
Diffstat (limited to 'cscript')
-rw-r--r--cscript14
1 files changed, 7 insertions, 7 deletions
diff --git a/cscript b/cscript
index 7b767ddf..fd625204 100644
--- a/cscript
+++ b/cscript
@@ -52,7 +52,7 @@ def build(target, options):
# We only build tests on Ubuntu 18.04
cmd += ' --disable-tests'
elif target.platform == 'windows':
- cmd += f' --target-windows-{target.bits} --disable-tests'
+ cmd += f' --target-windows-{target.bits}'
if target.version == 'xp':
# OpenJPEG 1.x is inexplicably faster on Windows XP; see DCP-o-matic bug #771
cmd += ' --jpeg=oj1'
@@ -89,9 +89,9 @@ def make_doxygen(target):
return os.path.abspath('build/doc/html')
def test(target, test):
- if target.platform != 'windows':
- target.set('LC_ALL', 'C')
- if test is None:
- target.command('run/tests')
- else:
- target.command('run/tests --run_test=%s' % test)
+ target.set('LC_ALL', 'C')
+ cmd = 'run\\tests ' if target.platform == 'windows' else 'run/tests '
+ if test is not None:
+ cmd += '-t %s' % test
+ target.command(cmd)
+