aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/main.rs')
-rw-r--r--xtask/src/main.rs23
1 files changed, 18 insertions, 5 deletions
diff --git a/xtask/src/main.rs b/xtask/src/main.rs
index 2bfe851..2b45f23 100644
--- a/xtask/src/main.rs
+++ b/xtask/src/main.rs
@@ -23,10 +23,7 @@ use log::{error, info, log_enabled, trace, Level};
use crate::{
argument_parsing::{Backends, BuildOrCheck, Cli, Commands},
build::init_build_dir,
- cargo_commands::{
- build_and_check_size, cargo, cargo_book, cargo_clippy, cargo_doc, cargo_example,
- cargo_format, cargo_test, run_test,
- },
+ cargo_commands::*,
command::{handle_results, run_command, run_successful, CargoCommand},
};
@@ -152,6 +149,12 @@ fn main() -> anyhow::Result<()> {
trace!("default logging level: {0}", globals.verbose);
+ log::debug!(
+ "Stderr of child processes is inherited: {}",
+ globals.stderr_inherited
+ );
+ log::debug!("Partial features: {}", globals.partial);
+
let backend = if let Some(backend) = globals.backend {
backend
} else {
@@ -285,6 +288,14 @@ fn main() -> anyhow::Result<()> {
info!("Running mdbook");
cargo_book(globals, &args.arguments)
}
+ Commands::UsageExamplesCheck(examples) => {
+ info!("Checking usage examples");
+ cargo_usage_example(globals, BuildOrCheck::Check, examples.examples()?)
+ }
+ Commands::UsageExampleBuild(examples) => {
+ info!("Building usage examples");
+ cargo_usage_example(globals, BuildOrCheck::Build, examples.examples()?)
+ }
};
handle_results(globals, final_run_results)
@@ -347,7 +358,9 @@ fn command_parser(
| CargoCommand::Doc { .. }
| CargoCommand::Test { .. }
| CargoCommand::Book { .. }
- | CargoCommand::ExampleSize { .. } => {
+ | CargoCommand::ExampleSize { .. }
+ | CargoCommand::BuildInDir { .. }
+ | CargoCommand::CheckInDir { .. } => {
let cargo_result = run_command(command, output_mode)?;
Ok(cargo_result)
}