| .. | ||
| src | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
A smaller version of compiletest-rs
Magic behavior
- Tests are run in order of their filenames (files first, then recursing into folders). So if you have any slow tests, prepend them with a small integral number to make them get run first, taking advantage of parallelism as much as possible (instead of waiting for the slow tests at the end).
Supported magic comment annotations
Note that the space after //, when it is present, is not optional -- it must be exactly one.
// ignore-XXXavoids running the test on targets whose triple containsXXXXXXcan also be one of64bit,32bitor16bit
// only-XXXavoids running the test on targets whose triple does not containXXXXXXcan also be one of64bit,32bitor16bit
// stderr-per-bitwidthproduces one stderr file per bitwidth, as they may differ significantly sometimes// error-pattern: XXXmake sure the stderr output containsXXX//~ ERROR: XXXmake sure the stderr output containsXXXfor an error in the line where this comment is written- Also supports
HELP,WARNorNOTEfor different kind of message- if one of those levels is specified explicitly, all diagnostics of this level or higher need an annotation. If you want to avoid this, just leave out the all caps level note entirely.
- If the all caps note is left out, a message of any level is matched. Leaving it out is not allowed for
ERRORlevels. - This checks the output before normalization, so you can check things that get normalized away, but need to be careful not to accidentally have a pattern that differs between platforms.
- Also supports
// revisions: XXX YYYruns the test once for each space separated name in the list- emits one stderr file per revision
//~comments can be restricted to specific revisions by adding the revision name before the~in square brackets://[XXX]~
// compile-flags: XXXappendsXXXto the command line arguments passed to the rustc driver// rustc-env: XXX=YYYsets the env varXXXtoYYYfor the rustc driver execution.- for Miri these env vars are used during compilation via rustc and during the emulation of the program
// normalize-stderr-test: "REGEX" -> "REPLACEMENT"replaces all matches ofREGEXin the stderr withREPLACEMENT. The replacement may specify$1and similar backreferences to paste captures.
Significant differences to compiletest-rs
ignore-*andonly-*opereate solely on the triple, instead of supporting things likemacos- only
//~comments can be individualized per revision