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

[WIP] Tests via CTest/CMake #199

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open

[WIP] Tests via CTest/CMake #199

wants to merge 34 commits into from

Conversation

Neui
Copy link
Contributor

@Neui Neui commented Oct 3, 2018

Tests using CMakes CTest. Builds upon PR #184 (so that should be merged first), originally from PR #164. Would help #105. Still Work In Progress.

  • Using some simple file checks it builds and checks the output of the commands and (optionally) compares with an expected.bin. (Partly Add checksums to test cases. #165, since there is no test with such file yet)
  • No negative tests yet (aka tests that should fail)
  • 2 example tests included that can be fixed in later PRs
  • No support for Makefile-based tests
  • Only uses the binaries wla-* and wlalink for the moment (doesn't test functions alone)
  • Uses the example directory as tests
    • Note: gb-z80 has been renamed to gb
    • gb-z80/linker_test/main.s doesn't assemble, but makefile references exmain.s instead. So main.s has been replaced by exmain.s.
    • Note: spc-700 has been renamed to spc700
  • Removes bug_exhibition in favour of the tests (but template projects has been migrated over)

I tried to document some internals and info in test/README.md. Also Work In Progress, but feedback appreciated.

What I still want to do:

  • Include other example projects for testing
  • Split tests into smaller units
  • Port ongoing additions to the tests in the examples folder
  • Testing with libraries
  • Try to fix some existing bugs that causes tests to fail

Note: Github seems to sort the commits NOT by their "internal" order but rather by something else (date?). So some commits may appear not logically.

Neui added 21 commits November 10, 2019 23:02
This adds an simple 'framework' for testing small projects. It basically
assembled small projects. It doesn't do any test on the functions inside
wla. Please read `README.md` for more information.
Exporting and using a variable in a section that is getting discarded
produces the following error:

    The computation of definition "FAULTY_VAR" hasn't been solved.
It hasn't been fixed yet and so this is disabled for now till it has
been fixed. If that is the case (or you're working on a fix), please
revert this commit.
Redefinition with a negative number fails.
For some reason, the makefile uses `exmain.s` to assemble `main.o`,
which was very annoying to debug since I thought it assembled `main.s`
and not `exmain.s`.

For now I've replaced `main.s` with `exmain.s`. I don't see a reason to
keep the old `main.s`.
`wla_filename` was just too long because the test framework uses
absolute paths, which are long and thus don't fit into the ROM.
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