diff options
author | Artem Serov <artem.serov@linaro.org> | 2021-11-30 13:18:21 +0000 |
---|---|---|
committer | Linaro Android Code Review <android-review@review.linaro.org> | 2021-11-30 13:18:21 +0000 |
commit | 36f8a793c9ba744966aa0af530907e997b64adfd (patch) | |
tree | 90d1314c941f1a30d0a6eacf6710b4e80e596492 | |
parent | 7acc95cad1ac8865e9e7d287872223337c8bccf3 (diff) | |
parent | 8ccd13b385231f6d59983c0d09beb90bc392d894 (diff) | |
download | art-build-scripts-36f8a793c9ba744966aa0af530907e997b64adfd.tar.gz |
Merge "Remove test_boot_to_gui_emulator.sh and adjust README."
-rw-r--r-- | README.md | 63 | ||||
-rwxr-xr-x | tests/test_boot_to_gui_emulator.sh | 146 |
2 files changed, 0 insertions, 209 deletions
@@ -26,69 +26,6 @@ Requirements Note: you don't need to have shellcheck installed, presubmit.sh will download it if necessary. -Directory Structure -=================== - -(mostly output from `tree -Fn`) - . - ├── benchmarks/ - │ ├── benchmarks_run_target.sh* Runs benchmarks on a target device. - │ ├── boot_oat_measurements_host.sh* Runs boot.oat measurements on the host. - │ ├── calibrate_benchmark_target.sh* Calibrates a benchmark run on a target device. - │ ├── report_html.sh* Wrapper for simpleperf report_html.py. - │ ├── report.sh* Wrapper for simpleperf report.py. - │ └── perf_profile_benchmarks_target.sh* Gets performance profiles of benchmarks. - ├── devices/ Device specific scripts. - │ ├── config/ Contains the configuration for each device. - │ ├── cpu_freq_utils.sh Utilities to work with cpu frequencies. - │ ├── flash_device.sh Helper script sourced by flash_${device}.sh scripts - │ │ below: - │ ├── flash_nexus5x.sh* -=| - │ ├── flash_nexus6p.sh* | Use these scripts to flash - │ ├── flash_nexus9.sh* | a particular device. - │ ├── flash_pixel2.sh* | - │ ├── flash_pixel3.sh* | - │ ├── flash_pixel.sh* -=| - │ ├── set_cpu_freq.sh* Sets the CPU frequency of a target device. - │ ├── setup/ - │ └── support/ - ├── jenkins/ - │ ├── presubmit_art_testing.sh* Presubmit test for art-testing repo (benchmarks). - │ ├── presubmit_vixl_test_mac.sh* Presubmit test for the vixl project (Mac OS only). - │ ├── presubmit_vixl_test.sh* Presubmit test for the vixl project. - │ ├── setup_adb.sh* Script to setup adb configuration for CI jobs. - │ ├── setup_android.sh* Used by Jenkins to apply your patch & setup an - │ │ Android env. - │ ├── setup_host.sh* Used by Jenkins to set-up the Jenkins host. - │ └── test_launcher.pl* Used by Jenkins as a wrapper for running the scripts, - │ so that every script gets its new process group ID. - ├── perf/ - │ └── sperf_target_dalvikvm.sh* Runs simpleperf for dalvikvm on a target device. - ├── presubmit.sh* Presubmit script that uses shellcheck and a few - │ other checkers. - ├── README.md This file. - ├── tests/ - │ ├── monkey/ - │ │ ├── blacklist - │ │ ├── monkey.sh* - │ │ └── whitelist - │ ├── test_art_fuzzer.sh* The fuzzer script. - │ ├── test_art_host.sh* The host tests script. - │ ├── test_art_simulator.sh* - │ ├── test_art_target.sh* The target tests script. - │ ├── test_art_vixl.sh* The VIXL tests script. - │ └── test_boot_to_gui_emulator.sh* The Boot to GUI script. - └── utils/ - ├── internal/ - │ └── utils.sh - ├── utils_android_root.sh Utilities to setup android_root configuration. - ├── utils_android.sh Utilities for android tree manipulation. - ├── utils_benchmarks.sh Utilities for running benchmarks. - ├── utils_git.sh - ├── utils_perf.sh Utilities for collecting performance profile. - ├── utils.sh Common utilities. - └── utils_test.sh Common test functions. - Guidelines ========== diff --git a/tests/test_boot_to_gui_emulator.sh b/tests/test_boot_to_gui_emulator.sh deleted file mode 100755 index c51c9af6..00000000 --- a/tests/test_boot_to_gui_emulator.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2016-2017, Linaro Ltd. -# All rights reserved. -# -# 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. - -# AOSP Emulator Boot to GUI Test. -# https://android-build.linaro.org/jenkins/view/ART-Tip/job/linaro-art-tip-build-BootToGui-aosp_arm64/ - -readonly local_path=$(dirname "$0") -source "${local_path}/../utils/utils.sh" -source "${local_path}/../utils/utils_android.sh" - -readonly watchdog_timer="5m" # 5 minutes watchdog timer. -readonly test_timer_name="Boot to GUI Test" -readonly boot_timer_name="Time to GUI" -readonly test_timer_file="$(get_workspace)/time_test.txt" -readonly boot_timer_file="$(get_workspace)/time_boot.txt" -readonly logcat_file="$(get_workspace)/log_logcat.txt" -declare -A pid - -# shellcheck disable=SC2034 -declare -A options_format=( - ["help"]="p:usage()" - ["h"]="r:&help" - ["verbose"]="p:enable_verbose()" - ["v"]="r:&verbose" -) -# shellcheck disable=SC2034 -declare -A options=() - -usage() { - log I "$0" - log I "This script is used to run the boot Jenkins test." - log I "By default the lunch target is inferred from the environment as" - log I "\${TARGET_PRODUCT}-\${TARGET_BUILD_VARIANT} (as set up by the \`lunch\`" - log I "command). If those are not defined default lunch target is used" - log I "instead. (current environment's default: $(lunch_target_from_env))" - log I " -h - help" - log I " -v - verbose" - exit 0 -} - -build_target() { - log I "Building the default lunch target." - - make_build -} - -check_boot_to_gui() { - start_timer "${boot_timer_name}" - - # Keep on checking until the watchdog timer kicks in. - while true; do - local boot_completed=$(adb_shell getprop sys.boot_completed) - if [[ ${boot_completed} =~ 1 ]]; then - stop_timer "${boot_timer_name}" - dump_timer "${boot_timer_name}" "${boot_timer_file}" - return 0 - fi - # Don't spam ADB. Wait 10 seconds before checking again. - sleep 10s - done -} - -start_watchdog_timer() { - log I "Starting the Watchdog Timer." - - sleep "${watchdog_timer}" - # Target has failed to boot in the expected time. - log E "${TARGET_PRODUCT} failed to boot in the expected time ${watchdog_timer}." - kill "${pid["boot_loop"]}" - clean_up -} - -clean_up() { - local -a pids_to_kill - pids_to_kill+=(${pid["emulator"]}) - pids_to_kill+=(${pid["logcat"]}) - pids_to_kill+=($(pgrep -P "${pid["emulator"]}")) - pids_to_kill+=($(pgrep -P "${pid["logcat"]}")) - - # Kill the emulator, logcat, and all related processes. - kill "${pids_to_kill[@]}" -} - -main() { - exit_on_failure arguments_parser options_format options -- "$@" - start_timer "${test_timer_name}" - - # The Boot to GUI test does not need to be run in an Android environment. - # But if run in an interactive mode ask the user if he is OK to run with the - # default target. - source_android_environment_default - setup_android_target_to_environment_or_default - - build_target - - # Launch emulator. - safe emulator -no-window & - pid["emulator"]=$! - - # Start logcat. - adb logcat > "${logcat_file}" & - pid["logcat"]=$! - - # Run the boot-to-gui loop. - check_boot_to_gui & - pid["boot_loop"]=$! - - # Have the watchdog kick in and stop everything else if it lapses. - start_watchdog_timer & - pid["watchdog"]=$! - - wait "${pid["boot_loop"]}" - ret=$? - - # Boot loop ended. Watchdog not needed anymore. - kill "${pid["watchdog"]}" - clean_up - - stop_timer "${test_timer_name}" - dump_timer "${test_timer_name}" "${test_timer_file}" - - if [[ ${ret} == 0 ]]; then - log S "Test finished!" - else - log E "Test failed!" - ret=1 - fi - - return ${ret} -} - -main "$@" |