From a669049ef327db5be04f076eff83932ac1f95d91 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 23 Oct 2019 18:17:24 +0300 Subject: xtask: fold gen-tests and gen-ast into codegen --- xtask/src/help.rs | 1 - xtask/src/main.rs | 10 ++-------- xtask/tests/tidy-tests/cli.rs | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) (limited to 'xtask') diff --git a/xtask/src/help.rs b/xtask/src/help.rs index 4c6bf6b53..730eb5c61 100644 --- a/xtask/src/help.rs +++ b/xtask/src/help.rs @@ -13,7 +13,6 @@ SUBCOMMANDS: format-hook fuzz-tests codegen - gen-tests install lint"; diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 0b19c34f4..db901ced2 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -57,19 +57,13 @@ fn main() -> Result<()> { }; install(opts)? } - "gen-tests" => { - if matches.contains(["-h", "--help"]) { - help::print_no_param_subcommand_help(&subcommand); - return Ok(()); - } - codegen::generate_parser_tests(Mode::Overwrite)? - } "codegen" => { if matches.contains(["-h", "--help"]) { help::print_no_param_subcommand_help(&subcommand); return Ok(()); } - codegen::generate_syntax(Mode::Overwrite)? + codegen::generate_syntax(Mode::Overwrite)?; + codegen::generate_parser_tests(Mode::Overwrite)?; } "format" => { if matches.contains(["-h", "--help"]) { diff --git a/xtask/tests/tidy-tests/cli.rs b/xtask/tests/tidy-tests/cli.rs index 304d77d89..543c7d7c4 100644 --- a/xtask/tests/tidy-tests/cli.rs +++ b/xtask/tests/tidy-tests/cli.rs @@ -14,7 +14,7 @@ fn generated_grammar_is_fresh() { #[test] fn generated_tests_are_fresh() { if let Err(error) = codegen::generate_parser_tests(Mode::Verify) { - panic!("{}. Please update tests by running `cargo xtask gen-tests`", error); + panic!("{}. Please update tests by running `cargo xtask codegen`", error); } } -- cgit v1.2.3