Skip to content

Commit

Permalink
rustpkg: Add a test that rustpkg install doesn't copy a non-changed…
Browse files Browse the repository at this point in the history
… file

This bug was already fixed, just needed a test.

Closes #9569
  • Loading branch information
catamorphism committed Nov 9, 2013
1 parent a594a99 commit b60de8a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/librustpkg/tests.rs
Expand Up @@ -1096,6 +1096,24 @@ fn no_rebuilding() {
}
}

#[test]
fn no_recopying() {
let p_id = PkgId::new("foo");
let workspace = create_local_package(&p_id);
let workspace = workspace.path();
command_line_test([~"install", ~"foo"], workspace);
let foo_lib = installed_library_in_workspace(&p_id.path, workspace);
assert!(foo_lib.is_some());
// Now make `foo` read-only so that subsequent attempts to copy to it will fail
assert!(chmod_read_only(&foo_lib.unwrap()));

match command_line_test_partial([~"install", ~"foo"], workspace) {
Success(*) => (), // ok
Fail(65) => fail!("no_recopying failed: it tried to re-copy foo"),
Fail(_) => fail!("no_copying failed for some other reason")
}
}

#[test]
fn no_rebuilding_dep() {
let p_id = PkgId::new("foo");
Expand Down

9 comments on commit b60de8a

@bors
Copy link
Contributor

@bors bors commented on b60de8a Nov 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from catamorphism
at catamorphism@b60de8a

@bors
Copy link
Contributor

@bors bors commented on b60de8a Nov 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging catamorphism/rust/rustpkg-issue-9482 = b60de8a into auto

@bors
Copy link
Contributor

@bors bors commented on b60de8a Nov 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catamorphism/rust/rustpkg-issue-9482 = b60de8a merged ok, testing candidate = b2085fc2

@bors
Copy link
Contributor

@bors bors commented on b60de8a Nov 9, 2013

@bors
Copy link
Contributor

@bors bors commented on b60de8a Nov 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from catamorphism
at catamorphism@b60de8a

@bors
Copy link
Contributor

@bors bors commented on b60de8a Nov 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging catamorphism/rust/rustpkg-issue-9482 = b60de8a into auto

@bors
Copy link
Contributor

@bors bors commented on b60de8a Nov 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catamorphism/rust/rustpkg-issue-9482 = b60de8a merged ok, testing candidate = 7bb668d

@bors
Copy link
Contributor

@bors bors commented on b60de8a Nov 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on b60de8a Nov 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 7bb668d

Please sign in to comment.