CI: run testsuite with -Werror.
authorwhitequark <whitequark@whitequark.org>
Fri, 6 Nov 2020 01:38:03 +0000 (01:38 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 31 Dec 2021 15:20:16 +0000 (15:20 +0000)
.github/workflows/main.yaml
tests/utils.py

index 9bda4c5cc5e897c394066410a5a2859f1be5cca0..cbc50d6fdde4ea42b6d30c01370efdea83f330dd 100644 (file)
@@ -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:
index 6a50df0399cee3525b819fdb422393650a87e278..0df4cab9593701ad9407ee05ae150d38b6f02ba9 100644 (file)
@@ -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)