From 2f67193ac0ccca6e83e680b6c3ceb0de148c3b89 Mon Sep 17 00:00:00 2001 From: NikhitaR-IFX Date: Wed, 21 Feb 2024 21:18:32 +0530 Subject: [PATCH] tests/psoc6: Test exit on failure. Signed-off-by: NikhitaR-IFX --- tests/psoc6/run_psoc6_tests.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/psoc6/run_psoc6_tests.sh b/tests/psoc6/run_psoc6_tests.sh index c7caaeb858dde..cd741eb293e54 100755 --- a/tests/psoc6/run_psoc6_tests.sh +++ b/tests/psoc6/run_psoc6_tests.sh @@ -263,10 +263,18 @@ if [ ${fs} -eq 1 ]; then chmod 777 ./psoc6/test_scripts/fs.py python3 ./psoc6/test_scripts/fs.py ${device0} 0 + if [ $? -ne 0 ]; then + echo "FS test failed" + exit 1 + fi # On device file saving tests for medium and large size takes considerable amount of time. Hence only when needed, this should be triggered. if [ ${afs} -eq 1 ]; then - python3 ./psoc6/test_scripts/fs.py ${device0} 1 + python3 ./psoc6/test_scripts/fs.py ${device0} 1 + if [ $? -ne 0 ]; then + echo "FS test failed" + exit 1 + fi fi fi