diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2024-07-31 17:18:42 +1000 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2024-08-27 08:43:32 -0700 |
| commit | 3c0de471228420c333bb98be35a28705d0ec063d (patch) | |
| tree | e6c69261378b2cf564bc0457e9d01bfca0a05130 /docs | |
| parent | 75e5ca58374fc7d070a6e34822046391cc5a24e5 (diff) | |
| download | meson-3c0de471228420c333bb98be35a28705d0ec063d.tar.gz | |
Allow external programs in test()'s 'args' parameter
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>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/markdown/snippets/test_args_accepts_external_program.md | 10 | ||||
| -rw-r--r-- | docs/yaml/functions/benchmark.yaml | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/docs/markdown/snippets/test_args_accepts_external_program.md b/docs/markdown/snippets/test_args_accepts_external_program.md new file mode 100644 index 000000000..d730ad5f3 --- /dev/null +++ b/docs/markdown/snippets/test_args_accepts_external_program.md @@ -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' ]) +``` diff --git a/docs/yaml/functions/benchmark.yaml b/docs/yaml/functions/benchmark.yaml index 0323b26e4..7a555a42d 100644 --- a/docs/yaml/functions/benchmark.yaml +++ b/docs/yaml/functions/benchmark.yaml @@ -28,7 +28,7 @@ posargs: kwargs: args: - type: list[str | file | tgt] + type: list[str | file | tgt | external_program] description: Arguments to pass to the executable env: |
