]> git.proxmox.com Git - cargo.git/commitdiff
Remove CARGO_TEST_DISABLE_GIT_CLI
authorEric Huss <eric@huss.org>
Sun, 31 Jul 2022 02:36:30 +0000 (19:36 -0700)
committerEric Huss <eric@huss.org>
Sun, 31 Jul 2022 02:36:58 +0000 (19:36 -0700)
This appears to no longer be necessary since we have migrated to
GitHub Actions.

crates/cargo-test-macro/src/lib.rs
src/doc/contrib/src/tests/writing.md
tests/testsuite/git.rs

index e2f5f9eb9ef144970a87c210ad64ce6200e8ab07..c5c1b901edde80e6fe73219244c249ae558e3ebe 100644 (file)
@@ -43,9 +43,6 @@ pub fn cargo_test(attr: TokenStream, item: TokenStream) -> TokenStream {
                 requires_reason = true;
                 ignore |= is_not_nightly();
             }
-            "disable_git_cli" => {
-                ignore |= disable_git_cli();
-            }
             s if s.starts_with("requires_") => {
                 let command = &s[9..];
                 ignore |= !has_command(command);
@@ -155,13 +152,6 @@ fn version() -> &'static (u32, bool) {
     unsafe { &VERSION }
 }
 
-fn disable_git_cli() -> bool {
-    // mingw git on Windows does not support Windows-style file URIs.
-    // Appveyor in the rust repo has that git up front in the PATH instead
-    // of Git-for-Windows, which causes this to fail.
-    matches!(option_env!("CARGO_TEST_DISABLE_GIT_CLI"), Some("1"))
-}
-
 fn has_command(command: &str) -> bool {
     let output = match Command::new(command).arg("--version").output() {
         Ok(output) => output,
index 305101da99efd6b9288347a34f0d37eba9a7c3c5..12d00ddfd3fe02653963c4d2c9f50b5244c69bac 100644 (file)
@@ -92,8 +92,6 @@ The options it supports are:
 * `>=1.64` — This indicates that the test will only run with the given version of `rustc` or newer.
   This can be used when a new `rustc` feature has been stabilized that the test depends on.
   If this is specified, a `reason` is required to explain why it is being checked.
-* `disable_git_cli` — This is needed for `git-fetch-with-cli` tests.
-  This disables the test in rust-lang/rust's CI due to a compatibility issue.
 
 #### Testing Nightly Features
 
index 0c24ecd15be6b55cfa6582595595c4aa6b199ea6..f70f8d007a0ee0398e4d7ef6ce68a108acceb3f4 100644 (file)
@@ -2642,7 +2642,7 @@ fn failed_submodule_checkout() {
     t.join().unwrap();
 }
 
-#[cargo_test(disable_git_cli)]
+#[cargo_test]
 fn use_the_cli() {
     let project = project();
     let git_project = git::new("dep1", |project| {
@@ -2743,7 +2743,7 @@ fn templatedir_doesnt_cause_problems() {
     p.cargo("build").run();
 }
 
-#[cargo_test(disable_git_cli)]
+#[cargo_test]
 fn git_with_cli_force() {
     // Supports a force-pushed repo.
     let git_project = git::new("dep1", |project| {
@@ -2800,7 +2800,7 @@ fn git_with_cli_force() {
     p.rename_run("foo", "foo2").with_stdout("two").run();
 }
 
-#[cargo_test(disable_git_cli)]
+#[cargo_test]
 fn git_fetch_cli_env_clean() {
     // This tests that git-fetch-with-cli works when GIT_DIR environment
     // variable is set (for whatever reason).
@@ -3500,7 +3500,7 @@ fn corrupted_checkout() {
     _corrupted_checkout(false);
 }
 
-#[cargo_test(disable_git_cli)]
+#[cargo_test]
 fn corrupted_checkout_with_cli() {
     // Test what happens if the checkout is corrupted somehow with git cli.
     _corrupted_checkout(true);