Skip to content

Commit

Permalink
Merge pull request #2363 from rust-lang-nursery/appveyor
Browse files Browse the repository at this point in the history
Fix appveyor
  • Loading branch information
oli-obk committed Jan 19, 2018
2 parents 9a2c50f + d9063b7 commit e08d8e4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
18 changes: 9 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions tests/dogfood.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e08d8e4

Please sign in to comment.