Repository navigation
Add exec mode for compiletest - #2102
Conversation
zhassan-aws
left a comment
There was a problem hiding this comment.
Thanks! I have a few comments. Can we also add this to the documentation?
There was a problem hiding this comment.
It is nice to be able to check that newly tests are running, but the inability to add tests under sub-directories could be a bit restrictive.
There was a problem hiding this comment.
Yes, but I wouldn't like to allow tests like these ones (which are quite complex) to be missed. Of course, this can be changed if it becomes too restrictive.
|
Thanks @zhassan-aws for the review! I'm still working on documentation for this, but feel free to provide more comments in the meantime. |
790de42 to
11cacc2
Compare
|
Added some documentation in the "regression testing" section and rebased the PR against |
| > `exec` mode. The `exec` mode allows us to take advantage of `compiletest` | ||
| > features while executing script-based tests (e.g., parallel execution). | ||
|
|
||
| ### The `exec` mode |
There was a problem hiding this comment.
Much clearer as a separate section! Thanks!
Description of changes:
This PR adds a new
execmode forcompiletest. This mode is useful to execute script-based tests, and allows checking expected output and exit codes at the same time.Unlike
cargo-kanitests, this mode expects a folder with aconfig.ymlfile within (not adding one will cause an error). Theconfig.ymlfile should contain:script: The path to the script to be executed.expected(optional): The path to the.expectedfile to use for output comparison.exit_code(optional): The exit code to be returned by executing the script (a zero exit code is expected if not specified).A new test
error-codehas been added with the purpose of testing theexecmode itself. This PR also migrates thecheck-outputtest that used to run at the beginning of our regression. Other scripts can be migrated in subsequent PRs, but I'm not doing it here since it might require some work.Resolved issues:
Resolves #2059
Call-outs:
compiletestactually runstime script, since runningscriptalone didn't seem to be successful. However, many of our existing script-based tests run withtime, so I figured that's the best to do there (previously was just runningsh script).Testing:
How is this change tested? CI + new tests.
Is this a refactor change? No.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.