2 #===------------------------------ testit ----------------------------------===#
4 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 # See https://llvm.org/LICENSE.txt for license information.
6 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 #===------------------------------------------------------------------------===#
17 OPTIONS
="-std=c++0x -stdlib=libc++"
21 *-*-mingw* |
*-*-cygwin* |
*-*-win*)
39 if (ls *.fail.cpp
> /dev
/null
2>&1)
41 for FILE
in $
(ls *.fail.cpp
); do
42 if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS -o .
/$TEST_EXE > /dev
/null
2>&1
45 echo "$FILE should not compile"
53 if (ls *.cpp
> /dev
/null
2>&1)
55 for FILE
in $
(ls *.pass.cpp
); do
56 if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS -o .
/$TEST_EXE
63 echo "$FILE failed at run time"
68 echo "$FILE failed to compile"
76 echo "failed $fail tests in `pwd`"
77 IMPLEMENTED_FAIL
=$
(($IMPLEMENTED_FAIL + 1))
81 echo "passed $pass tests in `pwd`"
84 IMPLEMENTED_PASS
=$
(($IMPLEMENTED_PASS + 1))
87 if [ $fail -eq 0 -a $pass -eq 0 ]
89 echo "not implemented: `pwd`"
90 UNIMPLEMENTED
=$
(($UNIMPLEMENTED + 1))
93 FAIL
=$
(($FAIL + $fail))
94 PASS
=$
(($PASS + $pass))
109 echo "****************************************************"
110 echo "Results for `pwd`:"
111 echo "using `$CC --version`"
112 echo "with $OPTIONS $HEADER_INCLUDE $SOURCE_LIB"
113 echo "----------------------------------------------------"
114 echo "sections without tests : $UNIMPLEMENTED"
115 echo "sections with failures : $IMPLEMENTED_FAIL"
116 echo "sections without failures: $IMPLEMENTED_PASS"
118 echo "total number of sections : $(($UNIMPLEMENTED+$IMPLEMENTED_FAIL+$IMPLEMENTED_PASS))"
119 echo "----------------------------------------------------"
120 echo "number of tests failed : $FAIL"
121 echo "number of tests passed : $PASS"
123 echo "total number of tests : $(($FAIL+$PASS))"
124 echo "****************************************************"