From be60373be479bce0b97511f0deb44d3210494779 Mon Sep 17 00:00:00 2001 From: Tim Stirrat Date: Sun, 28 Jul 2024 14:36:00 +0200 Subject: [PATCH] revert runner --- tests/bgb_get_snapshot.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/bgb_get_snapshot.py b/tests/bgb_get_snapshot.py index f1c6509..d458f68 100644 --- a/tests/bgb_get_snapshot.py +++ b/tests/bgb_get_snapshot.py @@ -41,12 +41,12 @@ def make_and_run(rom_relative): rom_path_full = base_path.joinpath(rom_relative) screenshot_path = rom_path_full.with_suffix('.bmp') - result = subprocess.call([ + subprocess.run([ "../bgb/bgb64.exe", "-set \"DebugSrcBrk=1\"", "-hf", "-stateonexit", - "-screenonexit", screenshot_path, + "-screenonexit", screenshot_path, rom_relative, ], cwd=base_dir, @@ -54,12 +54,8 @@ def make_and_run(rom_relative): # stderr=subprocess.DEVNULL, ) - if result != 0: - raise Exception("Rom execution failed " + rom_relative) - if not rom_path_full.with_suffix(".sna").is_file(): - raise Exception( - "Snapshot not found after execution " + rom_relative) + raise Exception("Tried to run rom, failed " + rom_relative) def make_rom(rom_relative):