diff options
| author | Phil Sutter <phil@nwl.cc> | 2025-12-16 15:36:23 +0100 |
|---|---|---|
| committer | Phil Sutter <phil@nwl.cc> | 2025-12-16 16:27:44 +0100 |
| commit | 1ac69c4de8ff7b472c3a5f2cf1d9442642e9047c (patch) | |
| tree | 3db63b79aad8e93b1357b5092b2d622405fcf283 /tests/monitor/run-tests.sh | |
| parent | 76c90e438f6ae5c6d4b72a4720b8c2576b2457b3 (diff) | |
When called from another directory without specifying test cases, an
incorrect regexp was used to glob all tests and no test was run at all:
| # ./tests/monitor/run-tests.sh
| echo: running tests from file *.t
| ./tests/monitor/run-tests.sh: line 201: testcases/*.t: No such file or directory
| monitor: running tests from file *.t
| ./tests/monitor/run-tests.sh: line 201: testcases/*.t: No such file or directory
| json-echo: running tests from file *.t
| ./tests/monitor/run-tests.sh: line 201: testcases/*.t: No such file or directory
| json-monitor: running tests from file *.t
| ./tests/monitor/run-tests.sh: line 201: testcases/*.t: No such file or directory
Fixes: 83eaf50c36fe8 ("tests: monitor: Become $PWD agnostic")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests/monitor/run-tests.sh')
| -rwxr-xr-x | tests/monitor/run-tests.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/monitor/run-tests.sh b/tests/monitor/run-tests.sh index 44f21a28..26293e12 100755 --- a/tests/monitor/run-tests.sh +++ b/tests/monitor/run-tests.sh @@ -253,7 +253,7 @@ total_rc=0 for syntax in ${syntaxes:-standard json}; do [ $syntax == json ] && test_json=true || test_json=false for variant in ${variants:-echo monitor}; do - for testcase in ${testcases:-testcases/*.t}; do + for testcase in ${testcases:-$(dirname $0)/testcases/*.t}; do run_testcase "$testcase" let "total_rc += $?" done |
