diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2020-05-09 11:45:21 +0000 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2020-05-10 03:55:36 +0000 |
commit | 031757712c52f0c33bb33fbbfcfd51dea55b5a4e (patch) | |
tree | 1bf216a00f229a8121fd5e517835ce8d7e560e2a | |
parent | 984999a6af5b283a8865252be47004c57fdd2ab0 (diff) | |
download | tests-031757712c52f0c33bb33fbbfcfd51dea55b5a4e.tar.gz |
Fix run_net_test.sh --norun.
This was likely broken by a change to make the script run
all_tests.sh if called with no arguments.
It is useful to keep this running because it is used by
parallel_tests.sh which is useful to find flaky tests.
Bug: 156144865
Test: treehugger
Test: build and run: ../net_test/run_net_test.sh
Test: build only: ../net_test/run_net_test.sh --norun
Test: run only: ../net_test/run_net_test.sh --nobuild bpf_test.py
Test: parallel tests: ../net_test/parallel_tests.sh 10 10 srcaddr_selection_test.py
Test: neither build nor run fails: ../net_test/run_net_test.sh --nobuild --norun
Original-Change: https://android-review.googlesource.com/1306567
Merged-In: I86162af99dea832d18206aae3dee1889b71c879d
Change-Id: I86162af99dea832d18206aae3dee1889b71c879d
-rwxr-xr-x | net/test/run_net_test.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/test/run_net_test.sh b/net/test/run_net_test.sh index ebfb15f..d1a66f5 100755 --- a/net/test/run_net_test.sh +++ b/net/test/run_net_test.sh @@ -178,16 +178,17 @@ fi test_args=${@:2} function isRunningTest() { - [[ -n "$test" ]] && ! (( norun )) + ! (( norun )) } function isBuildOnly() { - [[ -z "$test" ]] && (( norun )) && ! (( nobuild )) + (( norun )) && ! (( nobuild )) } if ! isRunningTest && ! isBuildOnly; then echo "Usage:" >&2 - echo " $0 [--builder] [--readonly|--ro|--readwrite|--rw] [--nobuild] [--verbose] <test>" >&2 + echo " $0 [--builder] [--readonly|--ro|--readwrite|--rw] [--nobuild] [--verbose] [<test>]" >&2 + echo " - if [<test>] is not specified, run all_tests.sh" >&2 echo " $0 --norun" >&2 exit 1 fi |