3 # Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
19 echo "Usage: ./$0 [--install-path=Product/out]"
22 INSTALL_PATH=Product/out
42 # List of gtest binaries
44 unittest_standalone/nnfw_api_gtest
45 unittest_standalone/test_compute
46 unittest_standalone/test_onert
47 unittest_standalone/test_onert_backend_cpu_common
48 unittest_standalone/test_onert_frontend_nnapi
49 unittest_standalone/tflite_test
53 echo "Install Path : '$INSTALL_PATH'"
55 for GTEST_BIN in ${GTEST_BINS[@]}; do
56 GTEST_PATH=$INSTALL_PATH/$GTEST_BIN
57 echo "Collecting test cases from '$GTEST_PATH'"
58 TESTS=$($GTEST_PATH --gtest_list_tests | grep '^ ')
59 if [ "$?" -ne 0 ]; then
60 echo "Error collecting test cases from '$GTEST_PATH'"
63 TEST_LIST=$TEST_LIST$TESTS
67 TOTAL_TCS=$(echo "$TEST_LIST" | wc -l)
68 TOTAL_NEG_TCS=$(echo "$TEST_LIST" | grep '^ neg_' | wc -l)
69 TOTAL_POS_TCS=$(echo "$TEST_LIST" | grep '^ neg_' -v | wc -l)
72 echo "TOTAL NUMBER OF TEST CASES : $TOTAL_TCS"
73 echo "TOTAL NUMBER OF POSTIVE TEST CASES : $TOTAL_NEG_TCS"
74 echo "TOTAL NUMBER OF NEGATIVE TEST CASES : $TOTAL_POS_TCS"