Skip to content

Commit 04b3669

Browse files
committed
---
yaml --- r: 174935 b: refs/heads/snap-stage3 c: 7f45dc9 h: refs/heads/master i: 174933: fa9bc72 174931: f2e0ac1 174927: 38ccc48 v: v3
1 parent f47bd3b commit 04b3669

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: a0f86de49748b472d4d189d9688b0d856c000914
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 918dd3488f450383c5ce27f0a27f45fa3fc9d0d6
4+
refs/heads/snap-stage3: 7f45dc9e68ffe80d399560644af48383a25427fd
55
refs/heads/try: 08f6380a9f0b866796080094f44fe25ea5636547
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/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)