blob: 3a1849ca045c80a3a816e5ec8801abec2de33548 [file] [log] [blame]
#!/bin/bash
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# A helper script that launches Trade Federation for atest
shdir=`dirname $0`/
source "${shdir}/script_help.sh"
checkpath adb
# TODO b/63295046 (sbasi) - Remove this when LOCAL_JAVA_LIBRARIES includes
# installation.
# Include any host-side dependency jars.
if [ ! -z "${ANDROID_HOST_OUT}" ]; then
deps="compatibility-host-util.jar hosttestlib.jar cts-tradefed.jar host-libprotobuf-java-full.jar"
for dep in $deps; do
if [ -f "${ANDROID_HOST_OUT}"/framework/$dep ]; then
TF_PATH=${TF_PATH}:"${ANDROID_HOST_OUT}"/framework/$dep
fi
done
fi
# Note: must leave $RDBG_FLAG and $TRADEFED_OPTS unquoted so that they go away when unset
java $RDBG_FLAG -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow $TRADEFED_OPTS \
-cp "${TF_PATH}" -DTF_JAR_DIR=${TF_JAR_DIR} com.android.tradefed.command.Console "$@"