Test with different sysroots dependent on the OS

This commit is contained in:
flip1995 2019-07-13 11:42:44 +02:00
parent c100c70822
commit 4817c2c381
No known key found for this signature in database
GPG Key ID: 693086869D506637
2 changed files with 10 additions and 5 deletions

View 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

View File

@ -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
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=/tmp ./target/debug/clippy-driver --print sysroot)
test $sysroot = /tmp
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