diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-08-10 16:05:07 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-08-11 03:19:57 +0530 |
commit | 2ee28029f945d74d01e63d6efd8802c9df03b28f (patch) | |
tree | 8fb6554f12650e2a9043bf108a320ec7f6681ed2 /run_meson_command_tests.py | |
parent | 9f5c84279e65b70865d873999205012f2a2b859e (diff) | |
download | meson-2ee28029f945d74d01e63d6efd8802c9df03b28f.zip meson-2ee28029f945d74d01e63d6efd8802c9df03b28f.tar.gz meson-2ee28029f945d74d01e63d6efd8802c9df03b28f.tar.bz2 |
Install meson.exe as the entrypoint on Windows
Thanks to Rafael Rivera for the suggestion
Fixes https://github.com/mesonbuild/meson/issues/1877
Diffstat (limited to 'run_meson_command_tests.py')
-rwxr-xr-x | run_meson_command_tests.py | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/run_meson_command_tests.py b/run_meson_command_tests.py index cd220de..f38b89a 100755 --- a/run_meson_command_tests.py +++ b/run_meson_command_tests.py @@ -135,25 +135,15 @@ class CommandTests(unittest.TestCase): self.assertTrue(bindir.is_dir()) # Run `meson` os.chdir('/') - if is_windows(): - resolved_meson_command = python_command + [str(bindir / 'meson.py')] - else: - resolved_meson_command = python_command + [str(bindir / 'meson')] - # The python configuration on appveyor does not register .py as - # a valid extension, so we cannot run `meson` on Windows. - builddir = str(self.tmpdir / 'build1') - meson_setup = ['meson', 'setup'] - meson_command = meson_setup + self.meson_args - stdo = self._run(meson_command + [self.testdir, builddir]) - self.assertMesonCommandIs(stdo.split('\n')[0], resolved_meson_command) + resolved_meson_command = [str(bindir / 'meson')] + builddir = str(self.tmpdir / 'build1') + meson_setup = ['meson', 'setup'] + meson_command = meson_setup + self.meson_args + stdo = self._run(meson_command + [self.testdir, builddir]) + self.assertMesonCommandIs(stdo.split('\n')[0], resolved_meson_command) # Run `/path/to/meson` builddir = str(self.tmpdir / 'build2') - if is_windows(): - # Cannot run .py directly because of the appveyor configuration, - # and the script is named meson.py, not meson - meson_setup = python_command + [str(bindir / 'meson.py'), 'setup'] - else: - meson_setup = [str(bindir / 'meson'), 'setup'] + meson_setup = [str(bindir / 'meson'), 'setup'] meson_command = meson_setup + self.meson_args stdo = self._run(meson_command + [self.testdir, builddir]) self.assertMesonCommandIs(stdo.split('\n')[0], resolved_meson_command) @@ -168,7 +158,7 @@ class CommandTests(unittest.TestCase): # Next part requires a shell return # `meson` is a wrapper to `meson.real` - resolved_meson_command = python_command + [str(bindir / 'meson.real')] + resolved_meson_command = [str(bindir / 'meson.real')] builddir = str(self.tmpdir / 'build4') (bindir / 'meson').rename(bindir / 'meson.real') wrapper = (bindir / 'meson') |