From 7fa77a701f066c745e3887b0938a5b039718d399 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Sun, 9 Dec 2012 00:12:14 +0000 Subject: [PATCH] Modify testit to use the local headers and lib. Thanks go to Jeffrey Yasskin. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@169686 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/testit | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/testit b/test/testit index eea3858a6..748c24666 100755 --- a/test/testit +++ b/test/testit @@ -8,6 +8,24 @@ # // # //===--------------------------------------------------------------------===// +currentpath=`pwd` +origpath=$currentpath +currentdir=`basename $currentpath` +while [ $currentdir != "test" ]; do + if [ $currentdir == "/" ] + then + echo "current directory must be in or under \"test\"." + exit 1 + fi + cd .. + currentpath=`pwd` + currentdir=`basename $currentpath` +done + +cd .. +LIBCXX_ROOT=`pwd` +cd $origpath + if [ -z "$CC" ] then if which xcrun >/dev/null @@ -23,6 +41,16 @@ then OPTIONS="-std=c++0x -stdlib=libc++" fi +if [ -z "$HEADER_INCLUDE" ] +then + HEADER_INCLUDE="-I$LIBCXX_ROOT/include" +fi + +if [ -z "$SOURCE_LIB" ] +then + SOURCE_LIB="-L$LIBCXX_ROOT/lib" +fi + case $TRIPLE in *-*-mingw* | *-*-cygwin* | *-*-win*) TEST_EXE=test.exe