MCPcopy Create free account
hub / github.com/SeaQL/FireDBG.for.Rust / run_unit_test

Function run_unit_test

command/src/main.rs:717–750  ·  view source on GitHub ↗
(
    workspace: &Workspace,
    trace_cfg: &[(&Package, cfg::Trace)],
    package: &Package,
    testcase: &str,
    args: Vec<String>,
    output: Option<String>,
    firedbg_home: Option<String>,
)

Source from the content-addressed store, hash-verified

715}
716
717async fn run_unit_test(
718 workspace: &Workspace,
719 trace_cfg: &[(&Package, cfg::Trace)],
720 package: &Package,
721 testcase: &str,
722 args: Vec<String>,
723 output: Option<String>,
724 firedbg_home: Option<String>,
725) -> Result<()> {
726 let sub_command = "unit-test";
727 let build_cmd_output = package
728 .build_unit_test()
729 .context("Fail to build unit test")?;
730 if !build_cmd_output.status.success() {
731 panic!("Fail to compile unit test");
732 }
733 let executable = package
734 .get_unit_test_path(workspace)
735 .context("Fail to get unit test executable")?;
736 let name = &format!("{}-{}", package.name, testcase.replace("::", "_"));
737 run_debugger(
738 workspace,
739 trace_cfg,
740 sub_command,
741 executable,
742 name,
743 &package.name,
744 Some(testcase),
745 args,
746 output,
747 firedbg_home,
748 )
749 .await
750}
751
752async fn run_example(
753 workspace: &Workspace,

Callers 1

mainFunction · 0.85

Calls 3

run_debuggerFunction · 0.85
build_unit_testMethod · 0.80
get_unit_test_pathMethod · 0.80

Tested by

no test coverage detected