Update testit to default to clang

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@125498 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant 2011-02-14 18:06:10 +00:00
parent 621ee222d9
commit c4cbb5b6b7

View File

@ -8,51 +8,14 @@
# // # //
# //===--------------------------------------------------------------------===// # //===--------------------------------------------------------------------===//
BACKUP="../"
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`
BACKUP="../"$BACKUP
done
cd $origpath
if [ -z $CC ] if [ -z $CC ]
then then
CC=g++ CC=clang++
fi
auto_header=0
if [ -z $HEADER_INCLUDE ]
then
HEADER_INCLUDE=$BACKUP"include"
let "auto_header+=1"
fi
auto_lib=0
SOURCE_LIB=/usr/lib/libc++.dylib
#SOURCE_LIB=/Users/hinnant/Development/libcpp/lib/libc++.a
if [ -z $SOURCE_LIB ]
then
SOURCE_LIB=$BACKUP"lib/libc++.dylib"
let "auto_lib+=1"
fi fi
if [ -z "$OPTIONS" ] if [ -z "$OPTIONS" ]
then then
OPTIONS="-nostdinc++ -nodefaultlibs /usr/lib/libSystem.B.dylib -arch `arch`" OPTIONS="-std=c++0x -stdlib=libc++"
fi fi
FAIL=0 FAIL=0
@ -68,7 +31,7 @@ function afunc
if (ls *.fail.cpp &> /dev/null) if (ls *.fail.cpp &> /dev/null)
then then
for FILE in $(ls *.fail.cpp); do for FILE in $(ls *.fail.cpp); do
if $CC $OPTIONS -I$HEADER_INCLUDE $SOURCE_LIB $FILE &> /dev/null if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE &> /dev/null
then then
rm ./a.out rm ./a.out
echo "$FILE should not compile" echo "$FILE should not compile"
@ -82,7 +45,7 @@ function afunc
if (ls *.pass.cpp &> /dev/null) if (ls *.pass.cpp &> /dev/null)
then then
for FILE in $(ls *.pass.cpp); do for FILE in $(ls *.pass.cpp); do
if $CC $OPTIONS -I$HEADER_INCLUDE $SOURCE_LIB $FILE if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE
then then
if ./a.out if ./a.out
then then
@ -127,27 +90,7 @@ function afunc
if [ -d "$FILE" ]; if [ -d "$FILE" ];
then then
cd $FILE cd $FILE
if [ $auto_header -eq 1 ]
then
SAVE_HEADER_INCLUDE=$HEADER_INCLUDE
HEADER_INCLUDE="../"$HEADER_INCLUDE
fi
if [ $auto_lib -eq 1 ]
then
SAVE_SOURCE_LIB=$SOURCE_LIB
SOURCE_LIB="../"$SOURCE_LIB
fi
afunc afunc
if [ $auto_header -eq 1 ]
then
HEADER_INCLUDE=${HEADER_INCLUDE:3}
fi
if [ $auto_lib -eq 1 ]
then
SOURCE_LIB=${SOURCE_LIB:3}
fi
cd .. cd ..
fi fi
done done
@ -158,7 +101,7 @@ afunc
echo "****************************************************" echo "****************************************************"
echo "Results for `pwd`:" echo "Results for `pwd`:"
echo "using `$CC --version`" echo "using `$CC --version`"
echo "with $OPTIONS -I$HEADER_INCLUDE $SOURCE_LIB" echo "with $OPTIONS $HEADER_INCLUDE $SOURCE_LIB"
echo "----------------------------------------------------" echo "----------------------------------------------------"
echo "sections without tests : $UNIMPLEMENTED" echo "sections without tests : $UNIMPLEMENTED"
echo "sections with failures : $IMPLEMENTED_FAIL" echo "sections with failures : $IMPLEMENTED_FAIL"