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 basic test suite #1908

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

JesseTG
Copy link
Contributor

@JesseTG JesseTG commented Dec 6, 2023

This PR adds a test suite that is powered by CTest. It is adapted from the test suite for melonDS DS.

All you have to do is write a program that returns 0 upon success, or something else upon failure. No test suite library is necessary.

It does not add any new dependencies except that the test utility library requires C++20 for std::counting_semaphore (as I didn't want to pull in Qt or add a third-party library).

This PR is not intended to do any of the following:

  • Add comprehensive tests. It will add some basic ones that exercise the test suite's features plus documentation on how to write more tests.
  • Provide audio or video output. Future tests are welcome to do this with something like SDL. You can still retrieve audio and video from NDS instances and use them yourself.
  • Test the UI. There's no inherent reason that couldn't be done, but you'd need a way to fake input. That may come directly by feeding simulated input, or it may come by triggering events manually in sequence.

There are still a few things I'd like to add before it's ready for merge:

  • Integrate this into the GitHub pipeline so that the build fails if any test fails
  • Add a few that use ROMs and/or system files
  • Copy any provided ROMs and system files into a temporary directory so that tests don't clobber them
  • Write documentation on adding tests, and on running the test suite locally

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.

1 participant