diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4be99ca..a1bd5e7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.12" + cache: "pip" - name: wget gbdk uses: robinraju/release-downloader@v1 with: @@ -41,7 +42,7 @@ jobs: cd tests ../bgb/bgb64.exe -set "DebugSrcBrk=1" -hf -stateonexit -screenonexit build/wav_test_load_and_play.bmp build/wav_test_load_and_play.gb - name: pytest - # shell: bash + shell: bash run: | cd tests pytest -v -s diff --git a/tests/bgb_get_snapshot.py b/tests/bgb_get_snapshot.py index d458f68..a4b910f 100644 --- a/tests/bgb_get_snapshot.py +++ b/tests/bgb_get_snapshot.py @@ -41,7 +41,14 @@ def make_and_run(rom_relative): rom_path_full = base_path.joinpath(rom_relative) screenshot_path = rom_path_full.with_suffix('.bmp') - subprocess.run([ + print("executing bgb: ", "../bgb/bgb64.exe", + "-set \"DebugSrcBrk=1\"", + "-hf", + "-stateonexit", + "-screenonexit", screenshot_path, + rom_relative) + + subprocess.call([ "../bgb/bgb64.exe", "-set \"DebugSrcBrk=1\"", "-hf", @@ -54,17 +61,22 @@ def make_and_run(rom_relative): # stderr=subprocess.DEVNULL, ) + print("bgb: finished") + if not rom_path_full.with_suffix(".sna").is_file(): raise Exception("Tried to run rom, failed " + rom_relative) def make_rom(rom_relative): + print("calling make", rom_relative) result = subprocess.call( ["make", rom_relative], cwd=base_dir, # stdout=subprocess.DEVNULL ) + print("make: finished", rom_relative) + if result != 0: raise Exception("Rom make failed " + rom_relative)