From 35c0eadf0fed98ca8f1b4956431d29ea59ec8f49 Mon Sep 17 00:00:00 2001 From: Yanray Wang Date: Tue, 7 Feb 2023 10:41:04 +0800 Subject: [PATCH] compat.sh: avoid running duplicate test cases for PSK With the introduction of PSK_TESTS, - Either `compat.sh -V NO` or `compat.sh -V YES` runs the PSK tests - `compat.sh` or `compat.sh -V "NO YES"` runs PSK tests only once Signed-off-by: Yanray Wang --- tests/compat.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/compat.sh b/tests/compat.sh index 31e2b83964..eb67da93a3 100755 --- a/tests/compat.sh +++ b/tests/compat.sh @@ -1001,10 +1001,20 @@ SKIP_NEXT="NO" trap cleanup INT TERM HUP -for VERIFY in $VERIFIES; do - VERIF=$(echo $VERIFY | tr '[:upper:]' '[:lower:]') - for MODE in $MODES; do +for MODE in $MODES; do + PSK_TESTS="" + for VERIFY in $VERIFIES; do + VERIF=$(echo $VERIFY | tr '[:upper:]' '[:lower:]') for TYPE in $TYPES; do + + if [ "$TYPE" = "PSK" ]; then + if [ -z "$PSK_TESTS" ]; then + PSK_TESTS="FINISHED" + else + continue; + fi + fi + for PEER in $PEERS; do setup_arguments