Mangle expected sysroot output to match MSYS shell

MSYS mangles UNIX paths on execution such that it prepends its root in
Windows format. This affects PKG_CONFIG_SYSROOT_DIR and thus the
check-sysroot test. Detect MSYS from the OSTYPE environment variable and
adjust the expected test results to match. This likely means that
sysroot support doesn't actually work on MSYS, but there probably aren't
any toolchains that support sysroot there, anyway.
This commit is contained in:
Dan Nicholson 2013-03-27 01:58:15 +01:00
parent 5f9116931d
commit bfe139da8c

View file

@ -6,6 +6,11 @@ set -e
export PKG_CONFIG_SYSROOT_DIR=/sysroot
# MSYS mangles / paths to its own root in windows format. This probably
# means sysroot doesn't work there, but match what pkg-config passes
# back anyway.
[ "$OSTYPE" = msys ] && root=$(cd / && pwd -W) || root=
RESULT=""
run_test --cflags simple
@ -20,8 +25,8 @@ if [ "$list_indirect_deps" = yes ]; then
fi
run_test --libs --static simple
RESULT="-I/sysroot/public-dep/include"
RESULT="-I$root/sysroot/public-dep/include"
run_test --cflags public-dep
RESULT="-L/sysroot/public-dep/lib -lpublic-dep"
RESULT="-L$root/sysroot/public-dep/lib -lpublic-dep"
run_test --libs public-dep