(
workspace: &Workspace,
trace_cfg: &[(&Package, cfg::Trace)],
package: &Package,
example: &Example,
args: Vec<String>,
output: Option<String>,
firedbg_home: Option<String>
| 750 | } |
| 751 | |
| 752 | async fn run_example( |
| 753 | workspace: &Workspace, |
| 754 | trace_cfg: &[(&Package, cfg::Trace)], |
| 755 | package: &Package, |
| 756 | example: &Example, |
| 757 | args: Vec<String>, |
| 758 | output: Option<String>, |
| 759 | firedbg_home: Option<String>, |
| 760 | ) -> Result<()> { |
| 761 | let sub_command = "example"; |
| 762 | let build_cmd_output = example.build(package).context("Fail to build example")?; |
| 763 | if !build_cmd_output.status.success() { |
| 764 | panic!("Fail to compile example"); |
| 765 | } |
| 766 | let executable = example.get_example_path(workspace); |
| 767 | let name = &example.name; |
| 768 | run_debugger( |
| 769 | workspace, |
| 770 | trace_cfg, |
| 771 | sub_command, |
| 772 | executable, |
| 773 | name, |
| 774 | &package.name, |
| 775 | None, |
| 776 | args, |
| 777 | output, |
| 778 | firedbg_home, |
| 779 | ) |
| 780 | .await |
| 781 | } |
| 782 | |
| 783 | async fn run_debugger( |
| 784 | workspace: &Workspace, |
no test coverage detected