From: shatur.linux@gmail.com
To: ltp@lists.linux.it
Cc: shatur.linux@gmail.com, sturlapati@vmware.com
Subject: [LTP] [PATCH] run-posix-option-group-test.sh: Log and exit if one attempts to run tests without compiling
Date: Tue, 7 Jun 2022 15:18:16 -0700 [thread overview]
Message-ID: <20220607221816.50955-1-sturlapati@vmware.com> (raw)
From: Sharan Turlapati <sturlapati@vmware.com>
Currently, run-posix-option-group-test.sh erroneously
logs "***Tests Completed***" when no test has actually run if the script is invoked
to run without actually compiling the tests.
Check if the .run-test files actually exist before attempting to run them.
If not found, log a message indicating the problem and suggest to check if
the tests were compiled. Exit the script without attempting to run other
tests.
Signed-off-by: Sharan Turlapati <sturlapati@vmware.com>
---
.../bin/run-posix-option-group-test.sh | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/testcases/open_posix_testsuite/bin/run-posix-option-group-test.sh b/testcases/open_posix_testsuite/bin/run-posix-option-group-test.sh
index 0d4c9bd80..56773f0f0 100755
--- a/testcases/open_posix_testsuite/bin/run-posix-option-group-test.sh
+++ b/testcases/open_posix_testsuite/bin/run-posix-option-group-test.sh
@@ -22,9 +22,16 @@ EOF
run_option_group_tests()
{
- for test_script in $(find $1 -name '*.run-test' | sort); do
- (cd "$(dirname "$test_script")" && ./$(basename "$test_script"))
- done
+ list_of_tests=`find $1 -name '*.run-test' | sort`
+ if [[ -n $list_of_tests ]]
+ then
+ for test_script in $list_of_tests; do
+ (cd "$(dirname "$test_script")" && ./$(basename "$test_script"))
+ done
+ else
+ echo ".run-test files not found under $1. Were the tests compiled?"
+ exit 1
+ fi
}
case $1 in
--
2.19.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next reply other threads:[~2022-06-09 8:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-07 22:18 shatur.linux [this message]
2022-06-10 5:41 ` [LTP] [PATCH] run-posix-option-group-test.sh: Log and exit if one attempts to run tests without compiling Petr Vorel
2022-06-13 13:46 ` Petr Vorel
-- strict thread matches above, loose matches on Subject: below --
2022-06-07 22:08 shatur.linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220607221816.50955-1-sturlapati@vmware.com \
--to=shatur.linux@gmail.com \
--cc=ltp@lists.linux.it \
--cc=sturlapati@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox