3 # Copyright (C) 2015 The Android Open Source Project
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.
17 # Helper script for running unit tests for compatibility libraries
20 if [ ! -f "$1" ]; then
21 echo "Unable to locate $1"
26 # check if in Android build env
27 if [ ! -z ${ANDROID_BUILD_TOP} ]; then
29 if [ "$HOST" == "Linux" ]; then
31 elif [ "$HOST" == "Darwin" ]; then
34 echo "Unrecognized OS"
39 JAR_DIR=${ANDROID_HOST_OUT}/framework
40 TF_CONSOLE=com.android.tradefed.command.Console
42 ############### Run the cts tests ###############
44 compatibility-host-util\
53 checkFile ${JAR_DIR}/${JAR}.jar
54 JAR_PATH=${JAR_PATH}:${JAR_DIR}/${JAR}.jar
58 com.drawelements.deqp.runner.DeqpTestRunnerTest"
60 for CLASS in ${TEST_CLASSES}; do
61 java $RDBG_FLAG -cp ${JAR_PATH} ${TF_CONSOLE} run singleCommand host -n --class ${CLASS} "$@"