diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fdd2b3891c0bfbba9759b327a96c4fc539994ccf..c85d0b6bf1c81a86dceab6278e2ceeab203ea467 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,12 +4,12 @@ before_script: build_ip_and_tests: stage: build - cache: - policy: push - paths: &vunit_cache_paths + artifacts: + paths: &vunit_build_paths - test/vunit_out - 'test/*.gcda' - 'test/*.gcno' + expire_in: 1 hour script: - cd test - make elaborate @@ -31,9 +31,9 @@ build_ip_and_tests: test_ip_unit: stage: test only: *only - cache: - policy: pull - paths: *vunit_cache_paths + dependencies: [build_ip_and_tests] + artifacts: + paths: *vunit_build_paths script: - cd test - make test_unit XUNIT=1 @@ -43,12 +43,13 @@ test_ip_unit: paths: - test/code_html - test/test_unit.xml + - test/xunit.xsl test_ip_sanity: stage: test - cache: - policy: pull - paths: *vunit_cache_paths + dependencies: [build_ip_and_tests] + artifacts: + paths: *vunit_build_paths only: - schedules script: @@ -56,4 +57,21 @@ test_ip_sanity: - make test_sanity XUNIT=1 artifacts: paths: - - test/test_unit.xml + - test/test_sanity.xml + - test/xunit.xsl + +pages: + stage: deploy + when: always + #dependencies: [test_ip_unit, test_ip_sanity] + allow_failure: true # for debugging + script: + - mkdir -p public + - cp xunit.xsl public/ + - cp test_*.xml public/ + - mv code_html public/coverage || true + only: + - master + artifacts: + paths: + - public diff --git a/README.md b/README.md index c69205ccd1aa1e2ee94c109c0880ff454b7ccb57..d33ac7cf41ead8704ea2ea08f7159d43c28a4eab 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # CAN FD IP Core -[![pipeline status](https://gitlab.fel.cvut.cz/illeondr/CAN_FD_IP_Core/badges/master/pipeline.svg)](https://gitlab.fel.cvut.cz/illeondr/CAN_FD_IP_Core/commits/master) -[![coverage report](https://gitlab.fel.cvut.cz/illeondr/CAN_FD_IP_Core/badges/master/coverage.svg)](https://gitlab.fel.cvut.cz/illeondr/CAN_FD_IP_Core/commits/master) +[![pipeline status](https://gitlab.fel.cvut.cz/illeondr/CAN_FD_IP_Core/badges/master/pipeline.svg)](https://illeondr.pages.fel.cvut.cz/CAN_FD_IP_Core/test_unit.xml) +[![coverage report](https://gitlab.fel.cvut.cz/illeondr/CAN_FD_IP_Core/badges/master/coverage.svg)](https://illeondr.pages.fel.cvut.cz/CAN_FD_IP_Core/coverage/) This is repository of CAN FD IP Core written in VHDL, originally developed at Czech Technical University -- Faculty of Electrical Engineering -- Department diff --git a/test/Makefile b/test/Makefile index 94fc85007d0f9cb6a0f468ead73eea42e20f85e2..07c79db9982e2551a934d31731edaf81c2023b72 100644 --- a/test/Makefile +++ b/test/Makefile @@ -5,8 +5,10 @@ TEST_FLAGS = -p`nproc` ifeq ($(XUNIT),0) TEST_FLAGS += + POSTPROC := : else - TEST_FLAGS += --xunit-xml $@.xml + TEST_FLAGS += --xunit-xml $@.xml1 + POSTPROC = ret=$$?; (echo ''; echo ''; cat $@.xml1) >$@.xml; rm $@.xml1; exit $$ret endif all: test coverage @@ -15,12 +17,12 @@ elaborate: $(PYTHON) run.py --elaborate test: - $(PYTHON) run.py $(TEST_FLAGS) + $(PYTHON) run.py $(TEST_FLAGS); $(POSTPROC) test_unit: - $(PYTHON) run.py $(TEST_FLAGS) 'lib.tb_*_unit_test.*' + $(PYTHON) run.py $(TEST_FLAGS) 'lib.tb_*_unit_test.*'; $(POSTPROC) test_feature: test_sanity: - $(PYTHON) run.py $(TEST_FLAGS) 'lib.tb_sanity.*' + $(PYTHON) run.py $(TEST_FLAGS) 'lib.tb_sanity.*'; $(POSTPROC) coverage: lcov --capture --directory . --output-file code_coverage.info diff --git a/test/xunit.xsl b/test/xunit.xsl new file mode 100644 index 0000000000000000000000000000000000000000..9b8c61f0b83da070f95388bc9721e22388a206ee --- /dev/null +++ b/test/xunit.xsl @@ -0,0 +1,211 @@ + + + + + + + + + + +
+
Summary
+ + + + + +
Tests:
Errors:
Failures:
Skipped:
+
+ + + +
+
Failed tests
+ + + + +
+
+ + +
+
Passed tests
+ + + + +
+ + + + +
+ + + + + + bad-true + good + + +
+
+
+
+ . +
+
+ +
+
+
+
+ +
+
+
+ + + + + + + + +
+
+
+ +