view maketests.py @ 2444:ab577e2ed66a

Update some 68K test harness scripts to Python 3
author Michael Pavone <pavone@retrodev.com>
date Tue, 13 Feb 2024 21:18:31 -0800
parents f7ff02eeec2f
children
line wrap: on
line source

#!/usr/bin/env python3
from glob import glob
import subprocess
from sys import exit

sources = set()
for path in glob('generated_tests/*/*.s68'):
	sources.add(path)

bins = set()
for path in glob('generated_tests/*/*.bin'):
	bins.add(path)

for path in sources:
	binpath = path.replace('.s68', '.bin')
	if not binpath in bins:
		print(binpath)
		res = subprocess.call(['vasmm68k_mot', '-Fbin', '-m68000', '-no-opt', '-spaces', '-o', binpath, path])
		if res != 0:
			print('vasmm68k_mot returned non-zero status code', res)
			exit(1)