mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
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:
parent
1c3640e05c
commit
9d43ffc02a
@ -43,9 +43,6 @@ pub fn cargo_test(attr: TokenStream, item: TokenStream) -> TokenStream {
|
|||||||
requires_reason = true;
|
requires_reason = true;
|
||||||
ignore |= is_not_nightly();
|
ignore |= is_not_nightly();
|
||||||
}
|
}
|
||||||
"disable_git_cli" => {
|
|
||||||
ignore |= disable_git_cli();
|
|
||||||
}
|
|
||||||
s if s.starts_with("requires_") => {
|
s if s.starts_with("requires_") => {
|
||||||
let command = &s[9..];
|
let command = &s[9..];
|
||||||
ignore |= !has_command(command);
|
ignore |= !has_command(command);
|
||||||
@ -155,13 +152,6 @@ fn version() -> &'static (u32, bool) {
|
|||||||
unsafe { &VERSION }
|
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 {
|
fn has_command(command: &str) -> bool {
|
||||||
let output = match Command::new(command).arg("--version").output() {
|
let output = match Command::new(command).arg("--version").output() {
|
||||||
Ok(output) => output,
|
Ok(output) => output,
|
||||||
|
@ -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.
|
* `>=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.
|
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.
|
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
|
#### Testing Nightly Features
|
||||||
|
|
||||||
|
@ -2642,7 +2642,7 @@ fn failed_submodule_checkout() {
|
|||||||
t.join().unwrap();
|
t.join().unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cargo_test(disable_git_cli)]
|
#[cargo_test]
|
||||||
fn use_the_cli() {
|
fn use_the_cli() {
|
||||||
let project = project();
|
let project = project();
|
||||||
let git_project = git::new("dep1", |project| {
|
let git_project = git::new("dep1", |project| {
|
||||||
@ -2743,7 +2743,7 @@ fn templatedir_doesnt_cause_problems() {
|
|||||||
p.cargo("build").run();
|
p.cargo("build").run();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cargo_test(disable_git_cli)]
|
#[cargo_test]
|
||||||
fn git_with_cli_force() {
|
fn git_with_cli_force() {
|
||||||
// Supports a force-pushed repo.
|
// Supports a force-pushed repo.
|
||||||
let git_project = git::new("dep1", |project| {
|
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();
|
p.rename_run("foo", "foo2").with_stdout("two").run();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cargo_test(disable_git_cli)]
|
#[cargo_test]
|
||||||
fn git_fetch_cli_env_clean() {
|
fn git_fetch_cli_env_clean() {
|
||||||
// This tests that git-fetch-with-cli works when GIT_DIR environment
|
// This tests that git-fetch-with-cli works when GIT_DIR environment
|
||||||
// variable is set (for whatever reason).
|
// variable is set (for whatever reason).
|
||||||
@ -3500,7 +3500,7 @@ fn corrupted_checkout() {
|
|||||||
_corrupted_checkout(false);
|
_corrupted_checkout(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cargo_test(disable_git_cli)]
|
#[cargo_test]
|
||||||
fn corrupted_checkout_with_cli() {
|
fn corrupted_checkout_with_cli() {
|
||||||
// Test what happens if the checkout is corrupted somehow with git cli.
|
// Test what happens if the checkout is corrupted somehow with git cli.
|
||||||
_corrupted_checkout(true);
|
_corrupted_checkout(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user