Skip to content

Commit

Permalink
tests/bsim run_parallel: Allow TESTS_FILE with search paths
Browse files Browse the repository at this point in the history
With TESTS_FILE the user could provide a file with a list of
tests to run.
Now we also support that file containing a mix of
tests and paths in which to search for tests.

Signed-off-by: Alberto Escolar Piedras <[email protected]>
  • Loading branch information
aescolar committed Oct 26, 2023
1 parent 1f3d948 commit d61ec0f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/bsim/run_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function display_help(){
echo " Testcases are searched for in \${SEARCH_PATH},"
echo " which by default is the folder the script is run from"
echo " You can instead also provide a space separated test list with \${TESTS_LIST}, "
echo " or an input file including a list of tests \${TESTS_FILE} (w one line"
echo " per test, you can comment lines with #)"
echo " or an input file including a list of tests and/or tests search paths"
echo " \${TESTS_FILE} (w one line per test/path, you can comment lines with #)"
echo ""
echo " Examples (run from \${ZEPHYR_BASE}):"
echo " * Run all tests found under one folder:"
Expand Down Expand Up @@ -44,7 +44,9 @@ i=0

if [ -n "${TESTS_FILE}" ]; then
#remove comments and empty lines from file
all_cases=$(sed 's/#.*$//;/^$/d' "${TESTS_FILE}")
search_pattern=$(sed 's/#.*$//;/^$/d' "${TESTS_FILE}") || exit 1
all_cases=`find ${search_pattern} -name "*.sh" | \
grep -Ev "(/_|run_parallel|compile|generate_coverage_report.sh)"`
elif [ -n "${TESTS_LIST}" ]; then
all_cases=${TESTS_LIST}
else
Expand Down

0 comments on commit d61ec0f

Please sign in to comment.