When we auto detect the tests with `tests/shell/run-tests.sh -L`, then commonly the NFT_TEST_BASEDIR starts with a redundant "./". That's a bit ugly. Instead, special handle that case and remove the prefix. The effect is that `tests/shell/run-tests.sh -L` shows tests/shell/testcases/bitwise/0040mark_binop_0 instead of ./tests/shell/testcases/bitwise/0040mark_binop_0 Signed-off-by: Thomas Haller <thaller@xxxxxxxxxx> --- tests/shell/run-tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh index f20a2bec9e9b..dae775bdf3dd 100755 --- a/tests/shell/run-tests.sh +++ b/tests/shell/run-tests.sh @@ -267,7 +267,9 @@ find_tests() { } if [ "${#TESTS[@]}" -eq 0 ] ; then - TESTS=( $(find_tests "$NFT_TEST_BASEDIR/testcases/") ) + d="$NFT_TEST_BASEDIR/testcases/" + d="${d#./}" + TESTS=( $(find_tests "$d") ) test "${#TESTS[@]}" -gt 0 || msg_error "Could not find tests" fi -- 2.41.0