aboutsummaryrefslogtreecommitdiff
path: root/xtask
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-10-23 16:17:24 +0100
committerAleksey Kladov <[email protected]>2019-10-23 16:57:18 +0100
commita669049ef327db5be04f076eff83932ac1f95d91 (patch)
treeecc21b23217780ef7ca9279694170f4359b50150 /xtask
parentb5f13d8d51ef9107363a60b894a741ab596921ce (diff)
xtask: fold gen-tests and gen-ast into codegen
Diffstat (limited to 'xtask')
-rw-r--r--xtask/src/help.rs1
-rw-r--r--xtask/src/main.rs10
-rw-r--r--xtask/tests/tidy-tests/cli.rs2
3 files changed, 3 insertions, 10 deletions
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:
13 format-hook 13 format-hook
14 fuzz-tests 14 fuzz-tests
15 codegen 15 codegen
16 gen-tests
17 install 16 install
18 lint"; 17 lint";
19 18
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<()> {
57 }; 57 };
58 install(opts)? 58 install(opts)?
59 } 59 }
60 "gen-tests" => {
61 if matches.contains(["-h", "--help"]) {
62 help::print_no_param_subcommand_help(&subcommand);
63 return Ok(());
64 }
65 codegen::generate_parser_tests(Mode::Overwrite)?
66 }
67 "codegen" => { 60 "codegen" => {
68 if matches.contains(["-h", "--help"]) { 61 if matches.contains(["-h", "--help"]) {
69 help::print_no_param_subcommand_help(&subcommand); 62 help::print_no_param_subcommand_help(&subcommand);
70 return Ok(()); 63 return Ok(());
71 } 64 }
72 codegen::generate_syntax(Mode::Overwrite)? 65 codegen::generate_syntax(Mode::Overwrite)?;
66 codegen::generate_parser_tests(Mode::Overwrite)?;
73 } 67 }
74 "format" => { 68 "format" => {
75 if matches.contains(["-h", "--help"]) { 69 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() {
14#[test] 14#[test]
15fn generated_tests_are_fresh() { 15fn generated_tests_are_fresh() {
16 if let Err(error) = codegen::generate_parser_tests(Mode::Verify) { 16 if let Err(error) = codegen::generate_parser_tests(Mode::Verify) {
17 panic!("{}. Please update tests by running `cargo xtask gen-tests`", error); 17 panic!("{}. Please update tests by running `cargo xtask codegen`", error);
18 } 18 }
19} 19}
20 20