summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2024-11-07 14:39:51 +0100
committerPhil Sutter <phil@nwl.cc>2024-11-07 18:32:58 +0100
commit83eaf50c36fe8710ae6b6f991f5f7c7e2ec8d513 (patch)
tree0e6e3c19b86233be19dd71aa824cdcd4787fc5ad /tests
parent4cbb233400e17664d817e4b638c2d8bb88b372ed (diff)
tests: monitor: Become $PWD agnostic
The call to 'cd' is problematic since later the script tries to 'exec unshare -n $0'. This is not the only problem though: Individual test cases specified on command line are expected to be relative to the script's directory, too. Just get rid of these nonsensical restrictions. Reported-by: Florian Westphal <fw@strlen.de> Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/monitor/run-tests.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/monitor/run-tests.sh b/tests/monitor/run-tests.sh
index 214512d2..67d3e618 100755
--- a/tests/monitor/run-tests.sh
+++ b/tests/monitor/run-tests.sh
@@ -1,7 +1,6 @@
#!/bin/bash
-cd $(dirname $0)
-nft=${NFT:-../../src/nft}
+nft=${NFT:-$(dirname $0)/../../src/nft}
debug=false
test_json=false
@@ -146,7 +145,7 @@ while [ -n "$1" ]; do
nft=nft
shift
;;
- testcases/*.t)
+ *.t)
testcases+=" $1"
shift
;;