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

expand tester's features #8

Merged
merged 2 commits into from
Jul 25, 2024
Merged

Conversation

zerbina
Copy link
Collaborator

@zerbina zerbina commented Jul 25, 2024

Summary

  • support multiple runner output fragments
  • support custom runner arguments (provided by arguments)
    specification

Details

  • prepare the tester for supporting an arbitrary number of runner
    output fragments
  • output fragments are delimited by the !BREAK! substring in the
    runner's output
  • more fragments than what the specification requires is not an error
  • the output specification specifies what the last output fragment
    has to be
  • a file with the .expected extension and the same name as the test
    specifies an additional output fragment

Notes For Reviewers

Both features are a preparation for implementing bytecode output comparison for the pass0 tests in #7. The idea is that the expected bytecode is provided by a t0x_xxx.expected file alongside the main test file.

The various expected output fragments could also be specified via the test specification (like how tests in NimSkull usually do it), but this tends to be awkward to read (i.e., the expected output comes before the actual test). Having the expected output be part of the test file but appear after the main test content could work, but using a separate file was somewhat simpler to implement.

* prepare the tester for supporting an arbitrary number of output
  fragments
* the runner signals the end of an output fragment via the `!BREAK!`
  string
* more fragments than what the specification requires is not an error
* the `output` specification specifies what the *last* output fragment
  has to be
* a file with the `.expected` extension and the same name as the test
  specifies and additional output fragment
@zerbina zerbina added the enhancement New feature or request label Jul 25, 2024
@saem saem merged commit c056609 into nim-works:main Jul 25, 2024
4 checks passed
@zerbina zerbina deleted the tester-improvements branch July 27, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants