From: whitequark Date: Fri, 6 Nov 2020 01:38:03 +0000 (+0000) Subject: CI: run testsuite with -Werror. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=76f154c9e064abd163662c24232a766d10ae55b9;p=nmigen.git CI: run testsuite with -Werror. --- diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 9bda4c5..cbc50d6 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -33,6 +33,7 @@ jobs: - name: Run tests run: | export NMIGEN_USE_YOSYS=builtin YOSYS=yowasp-yosys SBY=yowasp-sby SMTBMC=yowasp-yosys-smtbmc + export PYTHONWARNINGS=error python -m coverage run -m unittest codecov document: diff --git a/tests/utils.py b/tests/utils.py index 6a50df0..0df4cab 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -74,9 +74,10 @@ class FHDLTestCase(unittest.TestCase): script=script, rtlil=rtlil.convert(Fragment.get(spec, platform="formal")) ) - with subprocess.Popen([require_tool("sby"), "-f", "-d", spec_name], cwd=spec_dir, - universal_newlines=True, - stdin=subprocess.PIPE, stdout=subprocess.PIPE) as proc: + with subprocess.Popen( + [require_tool("sby"), "-f", "-d", spec_name], + cwd=spec_dir, env={**os.environ, "PYTHONWARNINGS":"ignore"}, + universal_newlines=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE) as proc: stdout, stderr = proc.communicate(config) if proc.returncode != 0: self.fail("Formal verification failed:\n" + stdout)