Skip to content

Commit

Permalink
tests: Fail on CI when any required tool is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
jix committed Jun 2, 2022
1 parent ccd2a89 commit 9185652
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
- uses: actions/checkout@v2
- uses: YosysHQ/setup-oss-cad-suite@v1
- name: Run checks
run: tabbypip install xmlschema && make ci
run: tabbypip install xmlschema && make ci NOSKIP=1
6 changes: 6 additions & 0 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ make/rules/collect.mk: make/collect_tests.py
make/rules/test/%.mk:
python3 make/test_rules.py $<

ifdef NOSKIP
SKIP_COMMAND := echo "NOSKIP was set, treating this as an error"; echo; false
else
SKIP_COMMAND := echo
endif

ifneq (help,$(MAKECMDGOALS))

# This should run every time but only trigger anything depending on it whenever
Expand Down
2 changes: 1 addition & 1 deletion tests/make/test_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def parse_engine(engine):

if missing_tools:
print(
f"\t@echo; echo 'SKIPPING {target}: {', '.join(missing_tools)} not found'; echo",
f"\t@echo; echo 'SKIPPING {target}: {', '.join(missing_tools)} not found'; $(SKIP_COMMAND)",
file=rules,
)

Expand Down

0 comments on commit 9185652

Please sign in to comment.