about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-11-10 20:05:17 -0800
committerAlex Crichton <alex@alexcrichton.com>2013-11-10 20:43:08 -0800
commit681ea93d52dd74a5626b9b9d714dd264b0d7ebc7 (patch)
treedb52702dae3f2f8bc97895ae79b16140084dc5fe /src/libstd/rt
parentb5e602ac563422e13a18be9f79100f96359d582a (diff)
downloadrust-681ea93d52dd74a5626b9b9d714dd264b0d7ebc7.tar.gz
rust-681ea93d52dd74a5626b9b9d714dd264b0d7ebc7.zip
Enable uv pipe tests on windows
Turns out the pipe names must have special names on windows. Once we have
special names, all the tests pass just fine.

Closes #10386
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/test.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstd/rt/test.rs b/src/libstd/rt/test.rs
index 55a8db89d3c..aa680cddf2a 100644
--- a/src/libstd/rt/test.rs
+++ b/src/libstd/rt/test.rs
@@ -375,7 +375,11 @@ pub fn next_test_port() -> u16 {
 /// Get a temporary path which could be the location of a unix socket
 #[fixed_stack_segment] #[inline(never)]
 pub fn next_test_unix() -> Path {
-    os::tmpdir().join(rand::task_rng().gen_ascii_str(20))
+    if cfg!(unix) {
+        os::tmpdir().join(rand::task_rng().gen_ascii_str(20))
+    } else {
+        Path::new(r"\\.\pipe\" + rand::task_rng().gen_ascii_str(20))
+    }
 }
 
 /// Get a unique IPv4 localhost:port pair starting at 9600