# The conformance suite against the reference emulator: the RRDC fork of # x16emu in the image, launched headless by the suite on a loopback port. set -eu export RRDC_PORT=8391 export RRDC_BOOT_TIMEOUT=60 export RRDC_EMU_CMD="SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=dummy /opt/x16emu/x16emu -rom /opt/x16emu/rom.bin -warp -controlport {port}" status=0 python3 -m pytest -v -rs --junitxml=/src/junit.xml conformance || status=$? # A suite that skipped every test never reached the emulator: that is a # failure here, where one is always there to reach. python3 - <<'PY' import sys import xml.etree.ElementTree as ET root = ET.parse("/src/junit.xml").getroot() suites = [root] if root.tag == "testsuite" else list(root) tests = sum(int(s.get("tests", 0)) for s in suites) skipped = sum(int(s.get("skipped", 0)) for s in suites) print(f"conformance: {tests} tests, {skipped} skipped") if tests == 0 or skipped == tests: sys.exit("conformance: every test skipped: the emulator did not answer on its control port") PY exit $status