Skip to content

Commit

Permalink
debugbrk
Browse files Browse the repository at this point in the history
  • Loading branch information
tstirrat committed Jul 28, 2024
1 parent 03256bd commit 8582f24
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions tests/bgb_get_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,30 @@ def make_and_run(rom_relative):
rom_path_full = base_path.joinpath(rom_relative)
screenshot_path = rom_path_full.with_suffix('.bmp')

print("executing bgb: ", "../bgb/bgb64.exe",
"-set \"DebugSrcBrk=1\"",
"-hf",
"-stateonexit",
"-screenonexit", screenshot_path,
rom_relative)

subprocess.call([
"../bgb/bgb64.exe",
"-set \"DebugSrcBrk=1\"",
bgb_exe = ["wine", "../bgb/bgb64.exe"]

if os.name == 'Windows':
bgb_exe = ["../bgb/bgb64.exe"]

cmd = [
*bgb_exe,
'-set DebugSrcBrk=1',
"-hf",
"-stateonexit",
"-screenonexit", screenshot_path,
"-screenonexit", screenshot_path.absolute().as_posix(),
rom_relative,
],
cwd=base_dir,
# stdout=subprocess.DEVNULL,
# stderr=subprocess.DEVNULL,
)
]

print("executing bgb: ", cmd)
my_env = os.environ.copy()
my_env["WINEDEBUG"] = "fixme-all"

subprocess.call(cmd,
cwd=base_dir,
env=my_env,
# stdout=subprocess.DEVNULL,
# stderr=subprocess.DEVNULL,
)

print("bgb: finished")

Expand Down

0 comments on commit 8582f24

Please sign in to comment.