diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2016-11-22 14:18:21 -0300 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2016-11-22 14:18:21 -0300 |
commit | 3f6e06c9300f62c80a89770bc4c0ab768f42dc60 (patch) | |
tree | fa69da3fd8f89723b903c2906dd3909ed8e0503a | |
parent | 9644e8b8defd4c21c2d1453f65d3bc6307bace54 (diff) | |
download | meson-3f6e06c9300f62c80a89770bc4c0ab768f42dc60.zip meson-3f6e06c9300f62c80a89770bc4c0ab768f42dc60.tar.gz meson-3f6e06c9300f62c80a89770bc4c0ab768f42dc60.tar.bz2 |
mesontest: Fix the --wd option and rename it to -C to be coherent with ninja
-rwxr-xr-x | mesontest.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mesontest.py b/mesontest.py index d12e7de..76b6449 100755 --- a/mesontest.py +++ b/mesontest.py @@ -57,7 +57,7 @@ parser.add_argument('--list', default=False, dest='list', action='store_true', help='List available tests.') parser.add_argument('--wrapper', default=None, dest='wrapper', help='wrapper to run tests with (e.g. Valgrind)') -parser.add_argument('--wd', default=None, dest='wd', +parser.add_argument('-C', default='.', dest='wd', help='directory to cd into before running') parser.add_argument('--suite', default=None, dest='suite', help='Only run tests belonging to the given suite.') @@ -136,9 +136,10 @@ class TestHarness: self.error_count = 0 self.is_run = False if self.options.benchmark: - self.datafile = 'meson-private/meson_benchmark_setup.dat' + self.datafile = os.path.join(options.wd, 'meson-private/meson_benchmark_setup.dat') else: - self.datafile = 'meson-private/meson_test_setup.dat' + self.datafile = os.path.join(options.wd, 'meson-private/meson_test_setup.dat') + print(self.datafile) def run_single_test(self, wrap, test): if test.fname[0].endswith('.jar'): @@ -250,7 +251,7 @@ class TestHarness: return self.error_count def run_tests(self, datafilename, log_base): - logfile_base = os.path.join('meson-logs', log_base) + logfile_base = os.path.join(self.options.wd, 'meson-logs', log_base) if self.options.wrapper is None: wrap = [] logfilename = logfile_base + '.txt' |