Although it's not especially common, there are certainly cases where it's useful to pass the path to an external program to a test program. Fixes: https://github.com/mesonbuild/meson/issues/3552 Signed-off-by: David Gibson <david@gibson.dropbear.id.au>deprecationdeadline
parent
75e5ca5837
commit
3c0de47122
10 changed files with 29 additions and 5 deletions
@ -0,0 +1,10 @@ |
||||
## test() and benchmark() functions accept new types |
||||
|
||||
`test` and `benchmark` now accept ExternalPrograms (as returned by |
||||
`find_program`) in the `args` list. This can be useful where the test |
||||
executable is a wrapper which invokes another program given as an |
||||
argument. |
||||
|
||||
```meson |
||||
test('some_test', find_program('sudo'), args : [ find_program('sh'), 'script.sh' ]) |
||||
``` |
@ -0,0 +1,6 @@ |
||||
#!/usr/bin/env python3 |
||||
|
||||
import subprocess |
||||
import sys |
||||
|
||||
subprocess.run(sys.argv[1:]) |
Loading…
Reference in new issue