Skip to content

Commit e29aacc

Browse files
committed
Add a way to skip the use_the_cli test for rust repo.
1 parent b714d42 commit e29aacc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/testsuite/git.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use git2;
2+
use std::env;
23
use std::fs::{self, File};
34
use std::io::prelude::*;
45
use std::net::{TcpListener, TcpStream};
@@ -2575,6 +2576,12 @@ fn failed_submodule_checkout() {
25752576

25762577
#[test]
25772578
fn use_the_cli() {
2579+
if env::var("CARGO_TEST_DISABLE_GIT_CLI") == Ok("1".to_string()) {
2580+
// mingw git on Windows does not support Windows-style file URIs.
2581+
// Appveyor in the rust repo has that git up front in the PATH instead
2582+
// of Git-for-Windows, which causes this to fail.
2583+
return;
2584+
}
25782585
let project = project();
25792586
let git_project = git::new("dep1", |project| {
25802587
project

0 commit comments

Comments
 (0)