From 8245f2357de30308fe9bbd9576465f0ba103896f Mon Sep 17 00:00:00 2001 From: Sijie Date: Wed, 3 Jan 2024 18:14:03 -0500 Subject: [PATCH] add return_code --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 37081c92..87e6fe53 100644 --- a/Makefile +++ b/Makefile @@ -51,6 +51,8 @@ build-test-script: echo 'export PYTHONPATH=$$script_dir/../$(LIB_DIR):$$PATH:$$PYTHONPATH' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME) echo 'cd $$script_dir/../$(TEST_DIR)' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME) echo 'python -m nose --with-coverage --cover-package=$(SERVICE_CAPS) --cover-html --cover-html-dir=/kb/module/work/test_coverage --cover-xml --cover-xml-file=/kb/module/work/test_coverage/coverage.xml --nocapture --nologcapture .' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME) + echo 'returncode=$?' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME) + echo 'if [ $returncode != 0 ]; then exit $returncode; fi' >> $(TEST_DIR)/$(TEST_SCRIPT_NAME) chmod +x $(TEST_DIR)/$(TEST_SCRIPT_NAME) test: