Skip to content

Commit

Permalink
Integrate combine_results into cocotb_tools
Browse files Browse the repository at this point in the history
This removes the last script from the standalone bin directory,
preferring instead to deliver this functionality as part of the
cocotb_tools package. As all usage of this is internal to the cocotb
repository, no console_scripts entry is added for this.

`python -m cocotb_tools.combine_results` is a drop-in replacement for
`combine_results.py`.
  • Loading branch information
rkryan authored and ktbarrett committed Mar 21, 2024
1 parent 29d4c7e commit 30b769a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ do_tests::
# failures and the XML to track test results
.PHONY: jenkins
jenkins: do_tests
./bin/combine_results.py --suppress_rc --testsuites_name=cocotb_regression
python -m cocotb_tools.combine_results --suppress_rc --testsuites_name=cocotb_regression

# By default want the exit code to indicate the test results
.PHONY: test
test:
$(MAKE) do_tests; ret=$$?; ./bin/combine_results.py && exit $$ret
$(MAKE) do_tests; ret=$$?; python -m cocotb_tools.combine_results && exit $$ret

COCOTB_MAKEFILES_DIR = $(realpath $(shell cocotb-config --makefiles))
AVAILABLE_SIMULATORS = $(patsubst .%,%,$(suffix $(wildcard $(COCOTB_MAKEFILES_DIR)/simulators/Makefile.*)))
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_cases/test_failure/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ MODULE := test_failure
override_for_this_test:
-$(MAKE) all
$(call check_for_results_file)
test $$(../../../bin/combine_results.py | grep "Failure in testsuite" | wc -l) -eq 5 && rm -f results.xml
test $$(python -m cocotb_tools.combine_results | grep "Failure in testsuite" | wc -l) -eq 5 && rm -f results.xml

include ../../designs/sample_module/Makefile
2 changes: 1 addition & 1 deletion tests/test_cases/test_fatal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ else
override_for_this_test:
-$(MAKE) all
$(call check_for_results_file)
../../../bin/combine_results.py &> /dev/null
python -m cocotb_tools.combine_results &> /dev/null
endif

include $(shell cocotb-config --makefiles)/Makefile.sim

0 comments on commit 30b769a

Please sign in to comment.