summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-12-09 00:12:14 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-12-09 00:12:14 +0000
commit9f4328b17399d1fc9a0e9b3d646f43f9ce005924 (patch)
tree6d28a0c436b9570670154d604444070b21e7f791
parenta183ddb0feb4024a2dad9275593bcb3f331636c7 (diff)
downloadbcm5719-llvm-9f4328b17399d1fc9a0e9b3d646f43f9ce005924.tar.gz
bcm5719-llvm-9f4328b17399d1fc9a0e9b3d646f43f9ce005924.zip
Modify testit to use the local headers and lib. Thanks go to Jeffrey Yasskin.
llvm-svn: 169686
-rwxr-xr-xlibcxx/test/testit28
1 files changed, 28 insertions, 0 deletions
diff --git a/libcxx/test/testit b/libcxx/test/testit
index eea3858a628..748c24666ea 100755
--- a/libcxx/test/testit
+++ b/libcxx/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
OpenPOWER on IntegriCloud