1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00
devlib/tools/docker/run_tests.sh
Metin Kaya de84a08bf8 tools/docker: Fixup test config file name
Apparently commit

492d42dddb63 ("target: tests: Address review comments on PR#667")

erroneously renamed target_configs.yaml to target_configs.yml.
Rename it to test_config.yml.

Also address 2 Docker warnings related to environment variables while we
are here.

Signed-off-by: Metin Kaya <metin.kaya@arm.com>
2024-06-26 15:27:07 -05:00

42 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
#
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2024, ARM Limited and contributors.
#
# 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.
#
# Prepare the groundwork and run tests/test_target.py on the Docker image.
#
set -eu
ANDROID_HOME="/devlib/tools/android/android-sdk-linux"
export ANDROID_HOME
export ANDROID_USER_HOME="${ANDROID_HOME}/.android"
export ANDROID_EMULATOR_HOME="${ANDROID_HOME}/.android"
export PATH=${ANDROID_HOME}/platform-tools/:${PATH}
EMULATOR="${ANDROID_HOME}/emulator/emulator"
EMULATOR_ARGS="-no-window -no-snapshot -memory 2048"
${EMULATOR} -avd devlib-p6-12 ${EMULATOR_ARGS} &
${EMULATOR} -avd devlib-p6-14 ${EMULATOR_ARGS} &
${EMULATOR} -avd devlib-chromeos ${EMULATOR_ARGS} &
echo "Waiting 30 seconds for Android virtual devices to finish boot up..."
sleep 30
cd /devlib
cp -f tools/docker/test_config.yml tests/
python3 -m pytest --log-cli-level DEBUG ./tests/test_target.py