From: Jacob Lifshay Date: Tue, 12 Sep 2023 00:51:05 +0000 (-0700) Subject: skip test_microwatt.BinaryTestCase.test_binary if file doesn't exist X-Git-Url: https://git.libre-soc.org/?p=soc.git;a=commitdiff_plain;h=da1138787e45da9fee67a31dc7b151c2cef25664 skip test_microwatt.BinaryTestCase.test_binary if file doesn't exist --- diff --git a/src/soc/simple/test/test_microwatt.py b/src/soc/simple/test/test_microwatt.py index d7a82b81..29d6acf6 100644 --- a/src/soc/simple/test/test_microwatt.py +++ b/src/soc/simple/test/test_microwatt.py @@ -20,6 +20,8 @@ from soc.fu.compunits.test.test_compunit import (check_sim_memory, from soc.simple.test.test_runner import setup_i_memory +from pathlib import Path + import sys sys.setrecursionlimit(10**6) @@ -36,6 +38,8 @@ class BinaryTestCase(FHDLTestCase): with Program("1.bin", bigendian) as program: self.run_tst_program(program) + @unittest.skipUnless(Path("hello_world.bin").exists(), + "missing hello_world.bin") def test_binary(self): with Program("hello_world.bin", bigendian) as program: self.run_tst_program(program)