Convert Bash usage to a Python script.

pull/13603/head
Jussi Pakkanen 3 months ago
parent 761e2470d4
commit b522231c88
  1. 4
      test cases/common/41 test args/meson.build
  2. 11
      test cases/common/41 test args/pathtester.py

@ -38,10 +38,10 @@ test('custom target arg', tester, args : testfilect, env : env_array)
env = environment()
env.append('PATH', 'something')
bash = find_program('bash')
pathtester = find_program('pathtester.py')
custompathtgt = custom_target('testpathappend',
output : 'nothing.txt',
build_always : true,
command : [bash, '-c', 'env'],
command : [pathtester],
env : env)

@ -0,0 +1,11 @@
#!/usr/bin/env python3
import sys, subprocess
if sys.platorm() == 'win32':
cmd = ['xcopy', '/?']
else:
cmd = ['env']
rc = subprocess.run(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
sys.exit(rc.returncode)
Loading…
Cancel
Save