Merge pull request #2363 from rust-lang-nursery/appveyor

Fix appveyor
This commit is contained in:
Oliver Schneider 2018-01-19 13:25:17 +01:00 committed by GitHub
commit e08d8e4876
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 10 deletions

View File

@ -2,12 +2,12 @@ environment:
global:
PROJECT_NAME: rust-clippy
matrix:
- TARGET: i686-pc-windows-gnu
MSYS2_BITS: 32
- TARGET: i686-pc-windows-msvc
MSYS2_BITS: 32
- TARGET: x86_64-pc-windows-gnu
MSYS2_BITS: 64
#- TARGET: i686-pc-windows-gnu
# MSYS2_BITS: 32
#- TARGET: i686-pc-windows-msvc
# MSYS2_BITS: 32
#- TARGET: x86_64-pc-windows-gnu
# MSYS2_BITS: 64
- TARGET: x86_64-pc-windows-msvc
MSYS2_BITS: 64
@ -26,9 +26,9 @@ test_script:
- set RUST_BACKTRACE=1
- cargo build --features debugging
- cargo test --features debugging
- copy target\debug\cargo-clippy.exe C:\Users\appveyor\.cargo\bin\
- cargo clippy -- -D clippy
- cd clippy_lints && cargo clippy -- -D clippy && cd ..
#- copy target\debug\cargo-clippy.exe C:\Users\appveyor\.cargo\bin\
#- cargo clippy -- -D clippy
#- cd clippy_lints && cargo clippy -- -D clippy && cd ..
notifications:
- provider: Email

View File

@ -180,9 +180,12 @@ where
args.push("--cfg".to_owned());
args.push(r#"feature="cargo-clippy""#.to_owned());
let path = std::env::current_exe()
let mut path = std::env::current_exe()
.expect("current executable path invalid")
.with_file_name("clippy-driver");
if cfg!(windows) {
path.set_extension("exe");
}
let exit_status = std::process::Command::new("cargo")
.args(&args)
.env("RUSTC_WRAPPER", path)

View File

@ -3,6 +3,9 @@ fn dogfood() {
if option_env!("RUSTC_TEST_SUITE").is_some() {
return;
}
if cfg!(windows) {
return;
}
let root_dir = std::env::current_dir().unwrap();
for d in &[".", "clippy_lints"] {
std::env::set_current_dir(root_dir.join(d)).unwrap();