From: Jannis Harder Date: Thu, 2 Jun 2022 14:25:11 +0000 (+0200) Subject: tests: Fail on CI when any required tool is missing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d398a3c2df7b3761cda5e768b6881ca6186f0429;p=SymbiYosys.git tests: Fail on CI when any required tool is missing --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea48d06..67abe1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/tests/Makefile b/tests/Makefile index ccb983c..6b02872 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -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 diff --git a/tests/make/test_rules.py b/tests/make/test_rules.py index d03fc6c..4871b11 100644 --- a/tests/make/test_rules.py +++ b/tests/make/test_rules.py @@ -66,7 +66,7 @@ with rules_file.open("w") as rules: 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, )