]> git.proxmox.com Git - cargo.git/commitdiff
Opt-out all other failing tests
authorDale Wijnand <dale.wijnand@gmail.com>
Tue, 24 Jul 2018 12:59:42 +0000 (13:59 +0100)
committerDale Wijnand <dale.wijnand@gmail.com>
Tue, 24 Jul 2018 12:59:42 +0000 (13:59 +0100)
Looks like cargo traverses the filesystem & fails if it runs into a
Cargo.toml that doesn't declare a target.  I couldn't find a nice way to
re-engineer the test to avoid this issue.  So I'll leave that as someone
else's exercise.

tests/testsuite/concurrent.rs
tests/testsuite/directory.rs
tests/testsuite/fix.rs
tests/testsuite/freshness.rs
tests/testsuite/package.rs
tests/testsuite/path.rs
tests/testsuite/publish.rs
tests/testsuite/run.rs
tests/testsuite/tool_paths.rs
tests/testsuite/workspaces.rs

index dbc3249a9710b39ec3828e26f16a7da8d0613553..750d18379b70cd195ae35b86c3cbfe3499465e2d 100644 (file)
@@ -24,6 +24,7 @@ fn pkg(name: &str, vers: &str) {
 #[test]
 fn multiple_installs() {
     let p = project()
+        .no_manifest()
         .file(
             "a/Cargo.toml",
             r#"
@@ -103,6 +104,7 @@ fn concurrent_installs() {
 #[test]
 fn one_install_should_be_bad() {
     let p = project()
+        .no_manifest()
         .file(
             "a/Cargo.toml",
             r#"
@@ -169,6 +171,7 @@ fn multiple_registry_fetches() {
     pkg.publish();
 
     let p = project()
+        .no_manifest()
         .file(
             "a/Cargo.toml",
             r#"
@@ -255,6 +258,7 @@ fn git_same_repo_different_tags() {
     git::tag(&repo, "tag2");
 
     let p = project()
+        .no_manifest()
         .file(
             "a/Cargo.toml",
             &format!(
@@ -334,6 +338,7 @@ fn git_same_branch_different_revs() {
     }).unwrap();
 
     let p = project()
+        .no_manifest()
         .file(
             "a/Cargo.toml",
             &format!(
index 5ca5a0c62299b404779ffe9265d84461882f617c..ea1aef152a75e028a9b04ef3ddba7a2d11c4ff73 100644 (file)
@@ -60,6 +60,11 @@ impl VendorPackage {
         self
     }
 
+    fn no_manifest(mut self) -> Self {
+        self.p = self.p.map(|pb| pb.no_manifest());
+        self
+    }
+
     fn build(&mut self) {
         let p = self.p.take().unwrap();
         let json = serde_json::to_string(&self.cksum).unwrap();
@@ -604,7 +609,7 @@ fn only_dot_files_ok() {
         )
         .file("src/lib.rs", "")
         .build();
-    VendorPackage::new("foo").file(".bar", "").build();
+    VendorPackage::new("foo").no_manifest().file(".bar", "").build();
 
     let p = project()
         .file(
@@ -642,6 +647,7 @@ fn random_files_ok() {
         .file("src/lib.rs", "")
         .build();
     VendorPackage::new("foo")
+        .no_manifest()
         .file("bar", "")
         .file("../test", "")
         .build();
index bce8bf8fffdef88968f6b5e9df90871ab620be0b..41bfe56d12f7fe0ec3394a33ea69a43cfcb1a5bd 100644 (file)
@@ -237,6 +237,7 @@ fn fix_path_deps() {
 #[test]
 fn do_not_fix_non_relevant_deps() {
     let p = project()
+        .no_manifest()
         .file(
             "foo/Cargo.toml",
             r#"
index 02946b08636344904a3954424660f3193aee744c..6c4a2c6ebe8910ae0ec388beaff7b8d521667750 100644 (file)
@@ -320,6 +320,7 @@ fn changing_profiles_caches_targets() {
 fn changing_bin_paths_common_target_features_caches_targets() {
     // Make sure dep_cache crate is built once per feature
     let p = project()
+        .no_manifest()
         .file(
             ".cargo/config",
             r#"
@@ -731,6 +732,7 @@ fn rerun_if_changed_in_dep() {
 #[test]
 fn same_build_dir_cached_packages() {
     let p = project()
+        .no_manifest()
         .file(
             "a1/Cargo.toml",
             r#"
index 6eb1e0f15fdf209972978eb1547a8bd31c9600ef..4891048db660aa5c6f91f6f9296b6aff1bae4f58 100644 (file)
@@ -540,7 +540,7 @@ fn package_git_submodule() {
             )
             .file("src/lib.rs", "pub fn foo() {}")
     }).unwrap();
-    let library = git::new("bar", |library| library.file("Makefile", "all:")).unwrap();
+    let library = git::new("bar", |library| library.no_manifest().file("Makefile", "all:")).unwrap();
 
     let repository = git2::Repository::open(&project.root()).unwrap();
     let url = path2url(library.root()).to_string();
index 590947208cc65481b15658fd78c811fa9e0f57e0..900ab7e9a04999a0f2a492975821fde99add37e2 100644 (file)
@@ -1085,6 +1085,7 @@ fn custom_target_no_rebuild() {
 #[test]
 fn override_and_depend() {
     let p = project()
+        .no_manifest()
         .file(
             "a/a1/Cargo.toml",
             r#"
index a55b84cbc28ce7b61841fa940665216777fb6dab..7ea87869953a604b87a2de60b9ce7d6f9f7dfd9e 100644 (file)
@@ -512,7 +512,7 @@ fn publish_clean() {
 fn publish_in_sub_repo() {
     publish::setup();
 
-    let p = project().file("baz", "").build();
+    let p = project().no_manifest().file("baz", "").build();
 
     let _ = repo(&paths::root().join("foo"))
         .file(
@@ -578,7 +578,7 @@ fn publish_when_ignored() {
 fn ignore_when_crate_ignored() {
     publish::setup();
 
-    let p = project().file("bar/baz", "").build();
+    let p = project().no_manifest().file("bar/baz", "").build();
 
     let _ = repo(&paths::root().join("foo"))
         .file(".gitignore", "bar")
index 51519e589c411697f6b3b8fb8f9a2a396db1bf88..99a77a33c26b73e1335c3ed513c67fccec1fdf6e 100644 (file)
@@ -1329,6 +1329,7 @@ fn fail_no_extra_verbose() {
 #[test]
 fn run_multiple_packages() {
     let p = project()
+        .no_manifest()
         .file(
             "foo/Cargo.toml",
             r#"
index b859af6aa45ddfe30f086504a55265ba9e77a9a9..d8794fadfddec485000bd4f0a018be618b72c2c2 100644 (file)
@@ -127,6 +127,7 @@ fn relative_tools() {
     // Funky directory structure to test that relative tool paths are made absolute
     // by reference to the `.cargo/..` directory and not to (for example) the CWD.
     let p = project()
+        .no_manifest()
         .file(
             "bar/Cargo.toml",
             r#"
index 32358f8319036813e9f37e158959d5c45081da16..bad541c051877fb0e74eb78142f9532525a680b6 100644 (file)
@@ -1544,6 +1544,7 @@ fn relative_path_for_root_works() {
 #[test]
 fn path_dep_outside_workspace_is_not_member() {
     let p = project()
+        .no_manifest()
         .file(
             "ws/Cargo.toml",
             r#"
@@ -1580,6 +1581,7 @@ fn path_dep_outside_workspace_is_not_member() {
 #[test]
 fn test_in_and_out_of_workspace() {
     let p = project()
+        .no_manifest()
         .file(
             "ws/Cargo.toml",
             r#"