@@ -22,7 +22,7 @@ set -xe
2222
2323twister_options=" --inline-logs -N -v --integration"
2424export BSIM_OUT_PATH=" ${BSIM_OUT_PATH:-/ opt/ bsim/ } "
25- if [ ! -d " ${BSIM_OUT_PATH} " ]; then
25+ if [ ! -d " ${BSIM_OUT_PATH} x " ]; then
2626 unset BSIM_OUT_PATH
2727fi
2828export BSIM_COMPONENTS_PATH=" ${BSIM_OUT_PATH} /components/"
@@ -104,16 +104,21 @@ function run_bsim_bt_tests() {
104104
105105function get_tests_to_run() {
106106 ./scripts/zephyr_module.py --twister-out module_tests.args
107- ./scripts/ci/get_modified_tests.py --commits ${commit_range} > modified_tests.args
108- ./scripts/ci/get_modified_boards.py --commits ${commit_range} > modified_boards.args
107+ ./scripts/ci/get_twister_opt.py --commits ${commit_range}
109108
110109 if [ -s modified_boards.args ]; then
111- ${twister} ${twister_options} +modified_boards.args --save-tests test_file_1.txt || exit 1
110+ ${twister} ${twister_options} +modified_boards.args \
111+ --save-tests test_file_1.txt || exit 1
112112 fi
113113 if [ -s modified_tests.args ]; then
114- ${twister} ${twister_options} +modified_tests.args --save-tests test_file_2.txt || exit 1
114+ ${twister} ${twister_options} +modified_tests.args \
115+ --save-tests test_file_2.txt || exit 1
115116 fi
116- rm -f modified_tests.args modified_boards.args
117+ if [ -s modified_archs.args ]; then
118+ ${twister} ${twister_options} +modified_archs.args \
119+ --save-tests test_file_3.txt || exit 1
120+ fi
121+ rm -f modified_tests.args modified_boards.args modified_archs.args
117122}
118123
119124
@@ -209,6 +214,7 @@ if [ -n "$main_ci" ]; then
209214# https://stackoverflow.com/questions/3398258/edit-shell-script-while-its-running
210215 git rebase $remote /${branch}
211216 else
217+ echo " Full Run"
212218 SC=" full"
213219 fi
214220 $short_git_log
@@ -226,7 +232,7 @@ if [ -n "$main_ci" ]; then
226232
227233 # cleanup
228234 rm -f test_file.txt
229- touch test_file_1.txt test_file_2.txt
235+ touch test_file_1.txt test_file_2.txt test_file_3.txt
230236
231237 # In a pull-request see if we have changed any tests or board definitions
232238 if [ -n " ${pull_request_nr} " -o -n " ${local_run} " ]; then
@@ -235,16 +241,18 @@ if [ -n "$main_ci" ]; then
235241
236242 if [ " $SC " == " full" ]; then
237243 # Save list of tests to be run
238- ${twister} ${twister_options} --save-tests test_file_3 .txt || exit 1
244+ ${twister} ${twister_options} --save-tests test_file_4 .txt || exit 1
239245 else
240- echo " test,arch,platform,status,extra_args,handler,handler_time,ram_size,rom_size" > test_file_3.txt
246+ echo " test,arch,platform,status,extra_args,handler,handler_time,ram_size,rom_size" \
247+ > test_file_4.txt
241248 fi
242249
243250 # Remove headers from all files but the first one to generate one
244251 # single file with only one header row
252+ tail -n +2 test_file_3.txt > test_file_3_in.txt
245253 tail -n +2 test_file_2.txt > test_file_2_in.txt
246254 tail -n +2 test_file_1.txt > test_file_1_in.txt
247- cat test_file_3 .txt test_file_2_in.txt test_file_1_in.txt > test_file.txt
255+ cat test_file_4.txt test_file_3_in .txt test_file_2_in.txt test_file_1_in.txt > test_file.txt
248256
249257 echo " +++ run twister"
250258
0 commit comments