From 270165428c7c5d2e14867e43a08bf8dd4bade2ac Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Mon, 30 Mar 2020 16:31:32 -0400 Subject: [PATCH] ci: do not run full sanitycheck if not needed... if we are changing a test or a sample, there is not need to run everything, it is enough to just build/run the changed test/sample. Also, some files have impact on the code and if they are being changed, do not run fully sanitycheck. Signed-off-by: Anas Nashif --- scripts/ci/run_ci.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/ci/run_ci.sh b/scripts/ci/run_ci.sh index 59c373ff085..8fbb5416464 100755 --- a/scripts/ci/run_ci.sh +++ b/scripts/ci/run_ci.sh @@ -230,7 +230,9 @@ if [ -n "$main_ci" ]; then fi $short_git_log - if [ -n "${BSIM_OUT_PATH}" -a -d "${BSIM_OUT_PATH}" ]; then + SC=`./scripts/ci/what_changed.py --commits ${commit_range}` + + if [ -n "${BSIM_OUT_PATH}" -a -d "${BSIM_OUT_PATH}" -a "$SC" == "full" ]; then echo "Build and run BT simulator tests" # Run BLE tests in simulator on the 1st CI instance: if [ "$matrix" = "1" ]; then @@ -249,8 +251,12 @@ if [ -n "$main_ci" ]; then get_tests_to_run fi + if [ "$SC" == "full" ]; then # Save list of tests to be run ${sanitycheck} ${sanitycheck_options} --save-tests test_file_3.txt || exit 1 + else + echo "test,arch,platform,status,extra_args,handler,handler_time,ram_size,rom_size" > test_file_3.txt + fi # Remove headers from all files but the first one to generate one # single file with only one header row