ci: run sanitycheck on tests and samples

If modules announce they have tests, run sanitycheck on those modules.
This will run on first matrix node and as the last step after running
regular testsuite.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2019-12-16 10:40:12 -05:00 committed by Carles Cufí
commit 36e1fb630b

View file

@ -97,6 +97,12 @@ function on_complete() {
cp ./sanity-out/sanitycheck.xml shippable/testresults/ cp ./sanity-out/sanitycheck.xml shippable/testresults/
fi fi
if [ -e ./module_tests/sanitycheck.xml ]; then
echo "Copy ./module_tests/sanitycheck.xml"
cp ./module_tests/sanitycheck.xml \
shippable/testresults/module_tests.xml
fi
if [ -e ${bsim_bt_test_results_file} ]; then if [ -e ${bsim_bt_test_results_file} ]; then
echo "Copy ${bsim_bt_test_results_file}" echo "Copy ${bsim_bt_test_results_file}"
cp ${bsim_bt_test_results_file} shippable/testresults/ cp ${bsim_bt_test_results_file} shippable/testresults/
@ -123,6 +129,7 @@ function run_bsim_bt_tests() {
} }
function get_tests_to_run() { function get_tests_to_run() {
./scripts/zephyr_module.py --sanitycheck-out module_tests.args
./scripts/ci/get_modified_tests.py --commits ${commit_range} > modified_tests.args ./scripts/ci/get_modified_tests.py --commits ${commit_range} > modified_tests.args
./scripts/ci/get_modified_boards.py --commits ${commit_range} > modified_boards.args ./scripts/ci/get_modified_boards.py --commits ${commit_range} > modified_boards.args
@ -267,6 +274,14 @@ if [ -n "$main_ci" ]; then
${sanitycheck} ${sanitycheck_options} --load-tests test_file.txt \ ${sanitycheck} ${sanitycheck_options} --load-tests test_file.txt \
--subset ${matrix}/${matrix_builds} --retry-failed 3 --subset ${matrix}/${matrix_builds} --retry-failed 3
# Run module tests on matrix #1
if [ "$matrix" = "1" ]; then
if [ -s module_tests.args ]; then
${sanitycheck} ${sanitycheck_options} \
+module_tests.args --outdir module_tests
fi
fi
# cleanup # cleanup
rm -f test_file* rm -f test_file*