Skip to content

Commit 196cc6d

Browse files
committed
Teach compiletest to construct the PATH variable correctly on win32
1 parent b61e17b commit 196cc6d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/test/compiletest/util.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ fn make_new_path(path: str) -> str {
1010
// Windows just uses PATH as the library search path, so we have to
1111
// maintain the current value while adding our own
1212
alt getenv(lib_path_env_var()) {
13-
option::some(curr) { #fmt["%s:%s", path, curr] }
13+
option::some(curr) {
14+
#fmt["%s%s%s", path, path_div(), curr]
15+
}
1416
option::none. { path }
1517
}
1618
}
@@ -24,6 +26,13 @@ fn lib_path_env_var() -> str { "DYLD_LIBRARY_PATH" }
2426
#[cfg(target_os = "win32")]
2527
fn lib_path_env_var() -> str { "PATH" }
2628

29+
#[cfg(target_os = "linux")]
30+
#[cfg(target_os = "macos")]
31+
fn path_div() -> str { ":" }
32+
33+
#[cfg(target_os = "win32")]
34+
fn path_div() -> str { ";" }
35+
2736
fn logv(config: config, s: str) {
2837
log s;
2938
if config.verbose { io::stdout().write_line(s); }

0 commit comments

Comments
 (0)