diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-03-08 18:53:41 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-03-08 18:53:41 +0200 |
commit | 3a320036ce836a1cf459e5311f4639bdc272c628 (patch) | |
tree | 002a4ae7a84881ebc5f18caa6f343f80415a9681 /run_tests.py | |
parent | 921bce638b4e31b2f186016a6a7ffb01d9046967 (diff) | |
download | meson-3a320036ce836a1cf459e5311f4639bdc272c628.zip meson-3a320036ce836a1cf459e5311f4639bdc272c628.tar.gz meson-3a320036ce836a1cf459e5311f4639bdc272c628.tar.bz2 |
Can run most of the test suite on Windows.
Diffstat (limited to 'run_tests.py')
-rwxr-xr-x | run_tests.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/run_tests.py b/run_tests.py index 0a4e3e4..b570d62 100755 --- a/run_tests.py +++ b/run_tests.py @@ -39,7 +39,7 @@ def run_test(testdir): os.mkdir(test_build_dir) os.mkdir(install_dir) print('Running test: ' + testdir) - gen_command = [meson_command, '--prefix', install_dir, testdir, test_build_dir] + backend_flags + gen_command = [sys.executable, meson_command, '--prefix', install_dir, testdir, test_build_dir] + backend_flags p = subprocess.Popen(gen_command) p.wait() if p.returncode != 0: @@ -58,8 +58,8 @@ def run_test(testdir): raise RuntimeError('Running install failed.') def gather_tests(testdir): - - tests = [t.split('/', 2)[2] for t in glob(os.path.join(testdir, '*'))] + print(glob(os.path.join(testdir, '*'))) + tests = [t.replace('\\', '/').split('/', 2)[2] for t in glob(os.path.join(testdir, '*'))] testlist = [(int(t.split()[0]), t) for t in tests] testlist.sort() tests = [os.path.join(testdir, t[1]) for t in testlist] @@ -87,5 +87,7 @@ def run_tests(): [run_test(t) for t in platformtests] if __name__ == '__main__': - os.chdir(os.path.split(__file__)[0]) + script_dir = os.path.split(__file__)[0] + if script_dir != '': + os.chdir(script_dir) run_tests() |