-
Notifications
You must be signed in to change notification settings - Fork 242
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
Add Rust Autotest (DB Entries) #6906
Conversation
# copy test scripts and specs files into the destination directory | ||
FileUtils.cp @test_scripts, test_file_destination | ||
FileUtils.copy_entry @script_dir, test_file_destination |
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.
This will copy folders too. Rust expects the default library file to be called src/lib.rs
(within the src folder). This is configurable in Cargo.toml, but I thought I would provide an example that uses the default project structure for clarity 👍
@@ -127,6 +129,24 @@ class AutotestSetup | |||
) | |||
end | |||
|
|||
def create_submission_files(transaction, glob) |
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.
Same here, this recursive definition is designed to support the src
folder in the rust submission.
Pull Request Test Coverage Report for Build 8309673167Details
💛 - Coveralls |
@1whatleytay I'm closing this for now, but please feel free to reopen if you'd like to continue working on this. |
This PR is paired with markus-autotesting PR. It adds an example autotest target to
rake db:autotest
.Motivation and Context
Rust autotesting allows courses or universities that are experimenting with Rust an easy platform to auto test their students submissions.
Your Changes
I have added an auto test target for Rust on the markus-autotesting server. With an updated auto test schema (you may have to wipe the
autotest_settings
table for therust
target to show up on MarkUs after updating the server), MarkUs now supports the Rust language viacargo-test
. For more details on implementation, see the autotesting PR.Type of change (select all that apply):
Including the changes to markus-autotesting. I believe this specific PR only modifies development tests.
Testing
I tested this PR in a couple ways. Using docker and a fresh DB, I ran:
rake db:autotest
and ran tests manually on theautotest-rust
project by selecting a submission and clicking onRun Tests
(via MarkUs GUI).Questions and Comments (if applicable)
I wanted to avoid parsing "human-readable" output of cargo test. Machine readable output is nightly-only for
cargo test
(which means we would have to use an unstable Rust version). I had to use an alternative test runnercargo-nextest
that had a more stable Machine Readable test output, and was compatible withcargo-test
formatted tests.I don't think it makes sense to have a
test-script
schema property (neithercargo-test
norcargo-nextest
seems to keep information about the file names to my knowledge). I can add a "modules to run" option, which works better with the input for both runners.Checklist
db:autotest_run
as tests. Seems to match the coverage of the other testers.Pull request to make documentation changes (if applicable)
MarkUsProject/Wiki#204