Add a (Linux-only) test harness for gold-syntax programs. #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Requires Xvfb and VICE to be installed. Additionally, it uses the
pty
module, so it's Linux-only for now.From a test-writing perspective, all that's required is adding a decorator to the test, indicating a gold-syntax file. The decorator arranges for the contents of the C64 memory after the file is run to be passed to the test.
Functions by compiling the program, running it in VICE, and breaking at program exit. This activates the VICE monitor, which allows us to send a command to dump the contents of memory to a file, from whence we can read it and pass the bytes to the test. The VICE monitor doesn't work in console mode, so we run it under Xvfb to avoid the window popping up.