From bfe139da8cf56bcad20dc396db9e38e5838556e7 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Wed, 27 Mar 2013 01:58:15 +0100 Subject: 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. --- check/check-sysroot | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/check/check-sysroot b/check/check-sysroot index 0820206..7b72ed9 100755 --- a/check/check-sysroot +++ b/check/check-sysroot @@ -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 -- cgit v1.2.1