Skip to content

Commit

Permalink
test(transformer): add --debug option to transform conformance
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Nov 21, 2024
1 parent 0918e52 commit be24ab0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions tasks/transform_conformance/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ fn test() {

#[derive(Default, Clone)]
pub struct TestRunnerOptions {
pub debug: bool,
pub filter: Option<String>,
pub exec: bool,
}
Expand Down
1 change: 1 addition & 0 deletions tasks/transform_conformance/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ fn main() {
let mut args = Arguments::from_env();

let options = TestRunnerOptions {
debug: args.contains("--debug"),
filter: args.opt_value_from_str("--filter").unwrap(),
exec: args.contains("--exec"),
};
Expand Down
4 changes: 4 additions & 0 deletions tasks/transform_conformance/src/test_case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ impl TestCase {
}

pub fn test(&mut self, options: &TestRunnerOptions) {
if options.debug {
println!("{}", self.path.to_string_lossy());
}

let filtered = options.filter.is_some();
match self.kind {
TestCaseKind::Conformance => self.test_conformance(filtered),
Expand Down

0 comments on commit be24ab0

Please sign in to comment.