[cfe-commits] [libcxx] r169686 - /libcxx/trunk/test/testit

Howard Hinnant hhinnant at apple.com
Sat Dec 8 16:12:15 PST 2012


Author: hhinnant
Date: Sat Dec  8 18:12:14 2012
New Revision: 169686

URL: http://llvm.org/viewvc/llvm-project?rev=169686&view=rev
Log:
Modify testit to use the local headers and lib.  Thanks go to Jeffrey Yasskin.

Modified:
    libcxx/trunk/test/testit

Modified: libcxx/trunk/test/testit
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/testit?rev=169686&r1=169685&r2=169686&view=diff
==============================================================================
--- libcxx/trunk/test/testit (original)
+++ libcxx/trunk/test/testit Sat Dec  8 18:12:14 2012
@@ -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 @@
 	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





More information about the cfe-commits mailing list