Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a (Linux-only) test harness for gold-syntax programs. #59

Merged
merged 4 commits into from
Aug 20, 2018

Conversation

jdpage
Copy link
Collaborator

@jdpage jdpage commented Aug 20, 2018

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.

jdpage added 4 commits August 20, 2018 00:10
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.
Also, tell Travis that it needs to install VICE.
Ubuntu doesn't ship with the ROM binaries necessary to run VICE, so we
grab them from sourceforge.
I don't have the energy to get these working with the old version of
VICE that Ubuntu ships.
@coveralls
Copy link

coveralls commented Aug 20, 2018

Pull Request Test Coverage Report for Build 317

  • 1 of 3 (33.33%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage remained the same at 89.037%

Changes Missing Coverage Covered Lines Changed/Added Lines %
jeff65/init.py 1 3 33.33%
Files with Coverage Reduction New Missed Lines %
jeff65/init.py 1 28.79%
Totals Coverage Status
Change from base Build 309: 0.0%
Covered Lines: 1496
Relevant Lines: 1669

💛 - Coveralls

@jdpage jdpage merged commit 06fa3bc into master Aug 20, 2018
@jdpage jdpage deleted the integration-tests branch August 20, 2018 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants