Skip to content

Commit

Permalink
tests: Don't use Catch2 JUnit reporters.
Browse files Browse the repository at this point in the history
JUnit reporters cause the tests to OOM in CI. For now, just capture the
contents of stdout/stderr, as before, and dump them on test failure. In
the future, we can consider converting Catch2 XML reports to JUnit
reports.

Issue harvard-acc#25.
  • Loading branch information
xyzsam committed Jul 31, 2020
1 parent cc8679c commit 40dd185
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 79 deletions.
7 changes: 2 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ jobs:
build:
docker:
- image: xyzsam/smaug:latest

environment:
SMAUG_HOME: /root/project
steps:
Expand All @@ -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
26 changes: 0 additions & 26 deletions .circleci/run_cpp_tests.sh

This file was deleted.

30 changes: 0 additions & 30 deletions .circleci/run_py_tests.sh

This file was deleted.

2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
17 changes: 1 addition & 16 deletions make/Makefile.native
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 ####
###########################
Expand Down

0 comments on commit 40dd185

Please sign in to comment.