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

Fix test_runner.c modern warning #3451

Merged
merged 3 commits into from
Oct 23, 2023

Conversation

mrgriffin
Copy link
Collaborator

gTestRunnerState.test = __start_tests - 1; is UB. Rearranged the test runner code so that we can initialize to __start_tests instead.

Also:

  • Creates a separate modern-test directory so that you can switch between make check MODERN=0 and make check MODERN=1.
  • Buffers GBA: -prefixed lines, so that something like an illegal opcode error gets reported as belonging to the right test.

Once this lands we should merge master with upcoming so that we can switch to building with MODERN=1 by default. The "CreateNPCTrainerPartyForTrainer generates customized Pokémon" test fails when built with modern, but not with agbcc. I haven't looked into this, and I don't think it's related to this PR(?)

TODO: Detect illegal opcodes in the test runner because mgba-rom-test
evaluates them very slowly, making the TIMEOUT mechanism effectively
realtime.
Silences a warning about an invalid pointer when building with modern.
@AsparagusEduardo AsparagusEduardo added this to the 1.6.2 milestone Oct 23, 2023
@SBird1337 SBird1337 merged commit 4aabd09 into rh-hideout:master Oct 23, 2023
1 check passed
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.

3 participants