Skip to content

Commit 21f755d

Browse files
aescolarMaureenHelm
authored andcommitted
tests/bsim run_parallel: Allow TESTS_FILE with search paths
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]>
1 parent 10d7b19 commit 21f755d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/bsim/run_parallel.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ function display_help(){
1313
echo " Testcases are searched for in \${SEARCH_PATH},"
1414
echo " which by default is the folder the script is run from"
1515
echo " You can instead also provide a space separated test list with \${TESTS_LIST}, "
16-
echo " or an input file including a list of tests \${TESTS_FILE} (w one line"
17-
echo " per test, you can comment lines with #)"
16+
echo " or an input file including a list of tests and/or tests search paths"
17+
echo " \${TESTS_FILE} (w one line per test/path, you can comment lines with #)"
1818
echo ""
1919
echo " Examples (run from \${ZEPHYR_BASE}):"
2020
echo " * Run all tests found under one folder:"
@@ -44,7 +44,9 @@ i=0
4444

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

0 commit comments

Comments
 (0)