Skip to content

Commit 1ca07b9

Browse files
committed
Fix running simple-raytracer benchmark on Windows
1 parent 6c88b08 commit 1ca07b9

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,6 @@ jobs:
186186
run: |
187187
# WIP Disable some tests
188188
189-
# This fails due to some weird argument handling by hyperfine, not an actual regression
190-
# more of a build system issue
191-
(Get-Content config.txt) -replace '(bench.simple-raytracer)', '# $1' | Out-File config.txt
192-
193189
# This fails with a different output than expected
194190
(Get-Content config.txt) -replace '(test.regex-shootout-regex-dna)', '# $1' | Out-File config.txt
195191

build_system/tests.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::build_sysroot;
22
use super::config;
33
use super::path::{Dirs, RelPath};
44
use super::prepare::GitRepo;
5-
use super::rustc_info::get_wrapper_file_name;
5+
use super::rustc_info::{get_file_name, get_wrapper_file_name};
66
use super::utils::{
77
hyperfine_command, is_ci, spawn_and_wait, spawn_and_wait_with_input, CargoProject, Compiler,
88
};
@@ -318,13 +318,20 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
318318

319319
eprintln!("[BENCH RUN] ebobby/simple-raytracer");
320320
fs::copy(
321-
target_dir.join("debug").join("main"),
322-
RelPath::BUILD.to_path(&runner.dirs).join("raytracer_cg_clif"),
321+
target_dir.join("debug").join(get_file_name("main", "bin")),
322+
RelPath::BUILD
323+
.to_path(&runner.dirs)
324+
.join(get_file_name("raytracer_cg_clif", "bin")),
323325
)
324326
.unwrap();
325327

326-
let mut bench_run =
327-
hyperfine_command(0, run_runs, None, "./raytracer_cg_llvm", "./raytracer_cg_clif");
328+
let mut bench_run = hyperfine_command(
329+
0,
330+
run_runs,
331+
None,
332+
Path::new(".").join(get_file_name("raytracer_cg_llvm", "bin")).to_str().unwrap(),
333+
Path::new(".").join(get_file_name("raytracer_cg_clif", "bin")).to_str().unwrap(),
334+
);
328335
bench_run.current_dir(RelPath::BUILD.to_path(&runner.dirs));
329336
spawn_and_wait(bench_run);
330337
} else {

0 commit comments

Comments
 (0)