diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2024-08-24 09:34:46 +0300 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2024-08-26 18:38:37 +0300 |
| commit | b522231c88173b69fcc8c20a337aa3e83978b3f3 (patch) | |
| tree | 1ca36a7dd061a2b3e47193a580a432ad0ff20d3d | |
| parent | 761e2470d4360032e88072718d1728e4537dbde1 (diff) | |
| download | meson-b522231c88173b69fcc8c20a337aa3e83978b3f3.tar.gz | |
Convert Bash usage to a Python script.
| -rw-r--r-- | test cases/common/41 test args/meson.build | 4 | ||||
| -rw-r--r-- | test cases/common/41 test args/pathtester.py | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/test cases/common/41 test args/meson.build b/test cases/common/41 test args/meson.build index 4894f3e16..7efd8d5da 100644 --- a/test cases/common/41 test args/meson.build +++ b/test cases/common/41 test args/meson.build @@ -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) diff --git a/test cases/common/41 test args/pathtester.py b/test cases/common/41 test args/pathtester.py new file mode 100644 index 000000000..101136611 --- /dev/null +++ b/test cases/common/41 test args/pathtester.py @@ -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) |
