-
Notifications
You must be signed in to change notification settings - Fork 17
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
Prototype Rust Autotesting #482
Conversation
for more information, see https://pre-commit.ci
Tested the behaviour of tests on compilation failure, and made the mentioned tweaks for running certain modules only. It's one rust module per test group now. Removing draft marker. |
if module is not None and "-" not in module: | ||
command.append(module) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@1whatleytay I see on nextest's documentation that you're treating module
as "[FILTERS]
". I wasn't able to figure out exactly how that part worked, but at the very least it seems to match more than just the module name? With the sample files you added on your MarkUs PR, using a value of test_enqueue
does a filter based on test name.
But, I also see the -E '...'
test filter expression option, which seems clearly defined. I wonder if this is a better target for user configuration, if it supports filtering both by package name (e.g. package(test)
?) and test function name (e.g. test(dequeue)
). It would require the instructor to understand this syntax, but I think that's okay?
Rust has a standard testing framework called
cargo test
(previously libtest). This pull request pulls support for this target into MarkUs. Tests are automatically inferred and run.Some caveats:
cargo-nextest
, an alternative test runner is used instead ofcargo-test
. Machine readable test output is nightly-only forcargo-test
, butcargo-nextest
supports it (experimentally) in all versions. It is also built from source so it may add time to project setup.test-scripts
schema property is present but ignored. Information about test files seems to be elided when built (only the names of modules are kept). I might replace this with arun-modules
property instead if possible.