Skip to content

Commit c9f93ea

Browse files
committed
---
yaml --- r: 176815 b: refs/heads/tmp c: 7f45dc9 h: refs/heads/master i: 176813: 43253ef 176811: 211aa2e 176807: 85082ed 176799: e23fec8 v: v3
1 parent 537446a commit c9f93ea

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: 918dd3488f450383c5ce27f0a27f45fa3fc9d0d6
37+
refs/heads/tmp: 7f45dc9e68ffe80d399560644af48383a25427fd

branches/tmp/src/test/run-pass/issue-15149.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::path::BytesContainer;
1211
use std::io::{Command, fs, USER_RWX};
1312
use std::os;
13+
use std::path::BytesContainer;
14+
use std::rand::random;
1415

1516
fn main() {
1617
// If we're the child, make sure we were invoked correctly
@@ -28,8 +29,10 @@ fn test() {
2829
let my_path = os::self_exe_name().unwrap();
2930
let my_dir = my_path.dir_path();
3031

31-
let child_dir = Path::new(my_dir.join("issue-15149-child"));
32-
drop(fs::mkdir(&child_dir, USER_RWX));
32+
let random_u32: u32 = random();
33+
let child_dir = Path::new(my_dir.join(format!("issue-15149-child-{}",
34+
random_u32)));
35+
fs::mkdir(&child_dir, USER_RWX).unwrap();
3336

3437
let child_path = child_dir.join(format!("mytest{}",
3538
os::consts::EXE_SUFFIX));
@@ -48,4 +51,7 @@ fn test() {
4851
format!("child assertion failed\n child stdout:\n {}\n child stderr:\n {}",
4952
child_output.output.container_as_str().unwrap(),
5053
child_output.error.container_as_str().unwrap()));
54+
55+
fs::rmdir_recursive(&child_dir).unwrap();
56+
5157
}

0 commit comments

Comments
 (0)