Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
e00E committed Nov 9, 2024
1 parent fa942a2 commit 3acb98c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt-get install gcc-multilib qemu-system-x86
- run: sudo apt-get install -qq gcc-multilib qemu-user
- run: cargo fmt --check
- run: cargo fetch --quiet --locked
- run: cargo --quiet xtask
Expand Down
17 changes: 1 addition & 16 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,6 @@ fn show_asm(target: &Target) -> Result<()> {
Ok(())
}

fn find_qemu_binary(target: &str) -> Result<String> {
let prefixes = ["qemu", "qemu-system"];
for prefix in prefixes {
let name = format!("{prefix}-{target}");
let Ok(output) = run_command(Command::new(name.as_str()).arg("--help")) else {
continue;
};
if output.status.success() {
return Ok(name);
}
}
Err(anyhow!("did not find qemu binary for target {target}"))
}

fn qemu_test(target: &Target) -> Result<()> {
let output = run_command(cargo_with_target(target, "test").args([
"--no-run",
Expand All @@ -224,8 +210,7 @@ fn qemu_test(target: &Target) -> Result<()> {
.strip_suffix(')')
.context("unexpected output")?;

let qemu = find_qemu_binary(target.qemu)?;
run_command(Command::new(qemu).arg(test_binary_path))?;
run_command(Command::new(format!("qemu-{}", target.qemu)).arg(test_binary_path))?;

Ok(())
}
Expand Down

0 comments on commit 3acb98c

Please sign in to comment.