diff --git a/.circleci/config.yml b/.circleci/config.yml index 036d1112..cb813a89 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,6 +3,7 @@ jobs: build: docker: - image: xyzsam/smaug:latest + environment: SMAUG_HOME: /root/project steps: @@ -17,14 +18,10 @@ jobs: make test -j2 - run: name: Run unit tests - environment: - JUNIT_REPORT_DIR: ~/smaug-junit-report-dir command: | export PYTHONPATH=$SMAUG_HOME:$PYTHONPATH - make test-run-junit + make test-run - run: name: Download latest gem5-aladdin binary command: python .circleci/download_artifacts.py --api_token=${GEM5_ALADDIN_BUILD_ARTIFACT_TOKEN} --project=gem5-aladdin --artifact_name=gem5.opt --user=${USER} --download_loc=/tmp --filter=${BUILD_ARTIFACT_FILTER} --branch=${BUILD_ARTIFACT_BRANCH} - - store_test_results: - path: ~/smaug-junit-report-dir diff --git a/.circleci/run_cpp_tests.sh b/.circleci/run_cpp_tests.sh deleted file mode 100755 index 09216e5b..00000000 --- a/.circleci/run_cpp_tests.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# Runs C++ Catch2 tests with Junit reports. -# Usage: -# ./run_cpp_tests.sh report_dir test0 test1 test2... - -REPORT_DIR=$1 -TESTS=${@:2} # All remaining arguments -HAS_ERROR=0 - -mkdir -p ${REPORT_DIR} -for t in $TESTS; do - printf "Running test ($t)" - JUNIT_XML=$(basename $t).xml - ./$t -r junit -o ${REPORT_DIR}/${JUNIT_XML} - RET_VAL=$(echo $?) - if [ $RET_VAL -ne 0 ]; then - echo "... failed" - HAS_ERROR=1 - else - echo " ... ok" - fi -done - -if [ $HAS_ERROR -ne 0 ]; then - exit 1 -fi diff --git a/.circleci/run_py_tests.sh b/.circleci/run_py_tests.sh deleted file mode 100755 index cacadf31..00000000 --- a/.circleci/run_py_tests.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# Runs Python tests without JUnit reports. -# Usage: -# ./run_py_tests.sh report_dir test0 test1 test2... -# -# No reports are currently generated but this is planned. - -REPORT_DIR=$1 -TESTS=${@:2} -HAS_ERROR=0 - -mkdir -p ${REPORT_DIR} -for t in $TESTS; do - printf "Running test ($t)" - JUNIT_XML=$(basename $t).xml - ./$t > tmpout 2>&1 - RET_VAL=$(echo $?) - if [ $RET_VAL -ne 0 ]; then - echo "... failed" - cat tmpout - HAS_ERROR=1 - else - echo " ... ok" - fi -done -rm -f tmpout - -if [ $HAS_ERROR -ne 0 ]; then - exit 1 -fi diff --git a/Makefile b/Makefile index fa6d5bfe..7cc0944d 100644 --- a/Makefile +++ b/Makefile @@ -16,8 +16,6 @@ test: @$(MAKE) -f make/Makefile.native --no-print-directory tests test-run: @$(MAKE) -f make/Makefile.native --no-print-directory run-tests -test-run-junit: - @$(MAKE) -f make/Makefile.native --no-print-directory run-tests-junit clean: @$(MAKE) -f make/Makefile.native --no-print-directory clean tracer: diff --git a/make/Makefile.native b/make/Makefile.native index 365ab1e4..5c2cef8c 100644 --- a/make/Makefile.native +++ b/make/Makefile.native @@ -2,7 +2,7 @@ include make/Makefile.common -.PHONY: all tests clean run-tests run-tests-junit run-cpp-tests run-py-tests +.PHONY: all tests clean run-tests SHELL:=/bin/bash @@ -93,21 +93,6 @@ run-tests: exit 1; \ fi -# For CI. JUNIT_REPORT_DIR is set by the CI engine. -run-tests-junit: - @$(MAKE) -f make/Makefile.native --no-print-directory run-cpp-tests - @$(MAKE) -f make/Makefile.native --no-print-directory run-py-tests - -run-cpp-tests: - @$(MAKE) -f make/Makefile.native --no-print-directory tests - @$(MAKE) -f make/Makefile.native --no-print-directory exec - .circleci/run_cpp_tests.sh $(JUNIT_REPORT_DIR) $(TEST_BIN) - -run-py-tests: - @$(MAKE) -f make/Makefile.native --no-print-directory tests - @$(MAKE) -f make/Makefile.native --no-print-directory exec - .circleci/run_py_tests.sh $(JUNIT_REPORT_DIR) $(BUILD_PY_TESTS) - ########################### #### CLEAN UP #### ###########################