run_unittests: use sys.executable on Windows for python

Instead of trying to guess whether we need py or python3, and then
falling over when whatever we guessed isn't in the path or isn't right,
just use sys.executable which should always work.
pull/5661/head
Dylan Baker 6 years ago
parent 42d34095b4
commit 7803056ef2
  1. 5
      run_unittests.py

@ -5926,10 +5926,7 @@ class NativeFileTests(BasePlatformTests):
# invokes our python wrapper
batfile = os.path.join(self.builddir, 'binary_wrapper{}.bat'.format(self.current_wrapper))
with open(batfile, 'wt') as f:
if mesonbuild.environment.detect_msys2_arch():
f.write(r'@python3 {} %*'.format(filename))
else:
f.write('@{} {} %*'.format(sys.executable, filename))
f.write(r'@{} {} %*'.format(sys.executable, filename))
return batfile
def helper_for_compiler(self, lang, cb, for_machine = MachineChoice.HOST):

Loading…
Cancel
Save