2 # //===--------------------------- testit ---------------------------------===//
4 # // The LLVM Compiler Infrastructure
6 # // This file is distributed under the University of Illinois Open Source
7 # // License. See LICENSE.TXT for details.
9 # //===--------------------------------------------------------------------===//
18 OPTIONS="-std=c++0x -stdlib=libc++"
22 *-*-mingw* | *-*-cygwin* | *-*-win*)
40 if (ls *.fail.cpp > /dev/null 2>&1)
42 for FILE in $(ls *.fail.cpp); do
43 if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS -o ./$TEST_EXE > /dev/null 2>&1
46 echo "$FILE should not compile"
54 if (ls *.cpp > /dev/null 2>&1)
56 for FILE in $(ls *.cpp); do
57 if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS -o ./$TEST_EXE
64 echo "$FILE failed at run time"
69 echo "$FILE failed to compile"
77 echo "failed $fail tests in `pwd`"
78 IMPLEMENTED_FAIL=$(($IMPLEMENTED_FAIL + 1))
82 echo "passed $pass tests in `pwd`"
85 IMPLEMENTED_PASS=$(($IMPLEMENTED_PASS + 1))
88 if [ $fail -eq 0 -a $pass -eq 0 ]
90 echo "not implemented: `pwd`"
91 UNIMPLEMENTED=$(($UNIMPLEMENTED + 1))
94 FAIL=$(($FAIL + $fail))
95 PASS=$(($PASS + $pass))
110 echo "****************************************************"
111 echo "Results for `pwd`:"
112 echo "using `$CC --version`"
113 echo "with $OPTIONS $HEADER_INCLUDE $SOURCE_LIB"
114 echo "----------------------------------------------------"
115 echo "sections without tests : $UNIMPLEMENTED"
116 echo "sections with failures : $IMPLEMENTED_FAIL"
117 echo "sections without failures: $IMPLEMENTED_PASS"
119 echo "total number of sections : $(($UNIMPLEMENTED+$IMPLEMENTED_FAIL+$IMPLEMENTED_PASS))"
120 echo "----------------------------------------------------"
121 echo "number of tests failed : $FAIL"
122 echo "number of tests passed : $PASS"
124 echo "total number of tests : $(($FAIL+$PASS))"
125 echo "****************************************************"