[DRAFT] Rewrite DragonRunner in Rust? - #21
Conversation
also attach missing run_tests.sh script from many changes ago
| impl Validate for SubPackage { | ||
| fn validate(&self) -> Vec<DragonError> { | ||
| self.tests.iter().flat_map(|t| t.validate()).collect() | ||
| } | ||
| } |
There was a problem hiding this comment.
Does this ensure that there are matching .test/.out files? Could be nice to emit the warning here.
There was a problem hiding this comment.
This recurses into validations for individual test files, and no it does not validate that any expected output is supplied. If there is neither a CHECK: nor CHECK_FILE then the test assumes no output is expected.
| /// Implemented by any `TestHarness` which makes a single, sequential iteration | ||
| /// over the tests in each package and subpackage. Applies to all except for | ||
| /// the `TournamentHarness`, which iterates in a cross product. | ||
| pub trait SequentialTestHarness { |
There was a problem hiding this comment.
This is nice, I think this will make multithreading quite easy to implement.
|
...... merge time @JustinMeimar ? ...... |
|
@Sir-NoChill Yes, sorry I should have allocated a bit more time to get this across the finish line. Have you been able to test the Gazprea implementation with this version of |
|
Lol, silly question, should we maybe just port the original to mojo? it might... like.... just run..... The whole bloody toolchain is installable via pip... we can even install globally in cmput415 for people to use |
|
Porting to Mojo would be easy. Though from my experience last year, it is actually the pip installations which are finicky. Under the group permissions model 415-resources uses, re-installations overwrite the r-x perms of python libraries and require manually chmod'ing them back. It is a bit of a pain. I've also fixed a number of bugs in this rewrite, and added some of the features you mentioned. However, if you're keen on trying Mojo it wouldn't be too difficult to re-implement the features atop the original runner. I'll let today be my final day to work on this PR, then it can be entirely up to you. |
|
Final thoughts:
|
Motivations:
dragon-runneron the lab machines had some issues.chmodin the CMPUT415 users' local python packages to getthe binary to unlock (now we have a single statically linked executable.)
Refactors:
dragon-runnerfrom python to rust driven by Claude Opus 4.6The lingering config files on the lab machines will need to be updated (along with the executable.)
try_foldpipeline rather than imperative hair ball.READMEto reflect changes.Fixes:
memcheckmode is now decoupled from valgrind-specific configs. This was a hazard last year,running
memcheckw/o the specific config gave false positives.information at the beginning of a semester, then automatically drive cloning, building, testfile
pruning, config synthesis, etc, which require some alignment with student info.
Features:
files in lieu of "Gazbolt" (not sure if we want to bring a svelte dependecy into this project.)
--full-pathflag to log absolute test paths on failure. (closes [FEAT] Print full failing test paths #19)Todo: