]> git.lizzy.rs Git - rust.git/commitdiff
Test with different sysroots dependent on the OS
authorflip1995 <hello@philkrones.com>
Sat, 13 Jul 2019 09:42:44 +0000 (11:42 +0200)
committerflip1995 <hello@philkrones.com>
Sat, 13 Jul 2019 10:48:43 +0000 (12:48 +0200)
.travis.yml
ci/base-tests.sh

index b2ad9d5b7e593a1d305cbb7cc25e9e3daaac0bfc..3f7c856a7f762ebb158d06a14c34333b58ee709d 100644 (file)
@@ -45,7 +45,7 @@ matrix:
     - os: linux
       env: BASE_TESTS=true
     - os: windows
-      env: CARGO_INCREMENTAL=0 BASE_TESTS=true
+      env: CARGO_INCREMENTAL=0 BASE_TESTS=true OS_WINDOWS=true
 
     # Builds that are only executed when a PR is r+ed or a try build is started
     # We don't want to run these always because they go towards
index 34bc9a8eca2c280f78bd2a08acf22136e9757220..a53a0ea52be62274e346d4660ae1ab0bf930241a 100755 (executable)
@@ -31,11 +31,16 @@ export CARGO_TARGET_DIR=`pwd`/target/
   sysroot=$(./target/debug/clippy-driver --print sysroot)
   test $sysroot = $(rustc --print sysroot)
 
-  sysroot=$(./target/debug/clippy-driver --sysroot /tmp --print sysroot)
-  test $sysroot = /tmp
-
-  sysroot=$(SYSROOT=/tmp ./target/debug/clippy-driver --print sysroot)
-  test $sysroot = /tmp
+  if [ -z $OS_WINDOWS ]; then
+    desired_sysroot=/tmp
+  else
+    desired_sysroot=C:/tmp
+  fi
+  sysroot=$(./target/debug/clippy-driver --sysroot $desired_sysroot --print sysroot)
+  test $sysroot = $desired_sysroot
+
+  sysroot=$(SYSROOT=$desired_sysroot ./target/debug/clippy-driver --print sysroot)
+  test $sysroot = $desired_sysroot
 
   # Make sure this isn't set - clippy-driver should cope without it
   unset CARGO_MANIFEST_DIR