| # Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file |
| # for details. All rights reserved. Use of this source code is governed by a |
| # BSD-style license that can be found in the LICENSE file. |
| # Helper script for tools/test_android_cts.py |
| readonly AOSP_PRESET="$1" |
| if [[ "$TASK" == "make" ]]; then |
| elif [[ "$TASK" == "m" ]]; then |
| elif [[ "$TASK" == "mmm" ]]; then |
| elif [[ "$TASK" == "mmma" ]]; then |
| elif [[ "$TASK" == "emulator" ]]; then |
| # Launch emulator in bg and kill it in a trap |
| # otherwise it won't get killed when this parent process is killed |
| trap "kill $emulator_pid; exit 1" 2 15 |
| while true; do sleep 5; done |
| elif [[ "$TASK" == "emulator_fg" ]]; then |
| elif [[ "$TASK" == "run-cts" ]]; then |
| adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82' |
| echo "Invalid task: '$TASK'" >&2 |