Skip to content

Commit

Permalink
console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tstirrat committed Jul 28, 2024
1 parent 08356fa commit 03256bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
14 changes: 13 additions & 1 deletion tests/bgb_get_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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)

Expand Down

0 comments on commit 03256bd

Please sign in to comment.