Skip to content

Un-hork the bots by removing intermediate files #9018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mk/clean.mk
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ clean-misc:
$(Q)rm -f $(RUSTLLVM_LIB_OBJS) $(RUSTLLVM_OBJS_OBJS) $(RUSTLLVM_DEF)
$(Q)rm -Rf $(DOCS)
$(Q)rm -Rf $(GENERATED)
$(Q)rm -f tmp/*
$(Q)rm -Rf tmp/*
$(Q)rm -Rf rust-stage0-*.tar.bz2 $(PKG_NAME)-*.tar.gz dist
$(Q)rm -Rf $(foreach ext, \
html aux cp fn ky log pdf pg toc tp vr cps, \
Expand Down
16 changes: 13 additions & 3 deletions src/libextra/glob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,21 @@ impl MatchOptions {
#[cfg(test)]
mod test {
use std::{io, os, unstable};
use std::unstable::finally::Finally;
use super::*;
use tempfile;
#[test]
fn test_relative_pattern() {
fn change_then_remove(p: &Path, f: &fn()) {
do (|| {
unstable::change_dir_locked(p, || f());
}).finally {
os::remove_dir_recursive(p);
}
}
fn mk_file(path: &str, directory: bool) {
if directory {
os::make_dir(&Path(path), 0xFFFF);
Expand All @@ -469,10 +479,10 @@ mod test {
glob(pattern).collect()
}
mk_file("tmp", true);
mk_file("tmp/glob-tests", true);
let root = tempfile::mkdtemp(&os::tmpdir(), "glob-tests");
let root = root.expect("Should have created a temp directory");
do unstable::change_dir_locked(&Path("tmp/glob-tests")) {
do change_then_remove(&root) {
mk_file("aaa", true);
mk_file("aaa/apple", true);
Expand Down