Skip to content

Commit

Permalink
Rewrite orphan-tests.rb as a make target
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Aug 12, 2023
1 parent 445454b commit f2cece6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ jobs:
make -C build bin/jitperf
export ASAN_OPTIONS=detect_leaks=0 # XXX: remove this
./build/bin/jitperf -L build/lib/ test/perf/simple.vhd
- name: Check for orphan tests
run: make -C build orphan-tests
- name: Coverage report
run: make -C build cov-generate
- name: Coveralls
Expand Down
12 changes: 12 additions & 0 deletions test/Makemodule.am
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,18 @@ update-test-dist:
'test/*.gtkw' 'test/*.tcl' 'test/*.v' \
| sort | sed -e 's/^/\t/' -e '$$ ! s/$$/ \\/' ; \
) > $(top_srcdir)/test/dist.mk

orphan-tests:
( \
cd $(top_srcdir) ; \
missing=$$(comm -23 \
<(git ls-files -- 'test/regress/*.vhd' 'test/regress/*.v' \
| sed 's|.*/\([[:alnum:]]*\)\..*|\1|' | sort | uniq) \
<(cut -d' ' -f1 test/regress/testlist.txt | sort) \
| tee /dev/stderr | wc -l) ; \
[ "$$missing" = 0 ] || exit 1 ; \
)

endif

.PHONY: update-test-dist
Expand Down
1 change: 1 addition & 0 deletions test/regress/testlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -849,3 +849,4 @@ issue750 normal,2008
order3 shell
driver18 normal,2008
vhpi9 normal,vhpi
issue730 normal,2008
20 changes: 0 additions & 20 deletions tools/orphan-tests.rb

This file was deleted.

0 comments on commit f2cece6

Please sign in to comment.