Remove CARGO_TEST_DISABLE_GIT_CLI

This appears to no longer be necessary since we have migrated to
GitHub Actions.
This commit is contained in:
Eric Huss 2022-07-30 19:36:30 -07:00
parent 1c3640e05c
commit 9d43ffc02a
3 changed files with 4 additions and 16 deletions

View 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,

View 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

View 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);