From 2013c9c16541e1443da09db54c152dea3f79bf3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 14 Sep 2022 16:08:24 +0300 Subject: [PATCH] run-tests: Swap the nesting of a loop/condition There's no point in running the whole loop if each iteration is going to be skipped. --- run-tests.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/run-tests.sh b/run-tests.sh index daed392..ea421da 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -248,12 +248,12 @@ for arch in $ARCHS; do done $COPY $COPYFILES fi - for test in $RUN_TESTS; do - file=$test.exe - if [ -n "$RUN" ]; then + if [ -n "$RUN" ]; then + for test in $RUN_TESTS; do + file=$test.exe $RUN $file - fi - done + done + fi cd .. done echo All tests succeeded