(
workspace: &Workspace,
trace_cfg: &[(&Package, cfg::Trace)],
package: &Package,
testcase: &str,
args: Vec<String>,
output: Option<String>,
firedbg_home: Option<String>,
)
| 715 | } |
| 716 | |
| 717 | async 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 | |
| 752 | async fn run_example( |
| 753 | workspace: &Workspace, |
no test coverage detected