| 1 |
#!/usr/bin/env bash |
| 2 |
# ===----------------------------------------------------------------------===## |
| 3 |
# |
| 4 |
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 5 |
# See https://llvm.org/LICENSE.txt for license information. |
| 6 |
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 7 |
# |
| 8 |
# ===----------------------------------------------------------------------===## |
| 9 |
|
| 10 |
set -e |
| 11 |
|
| 12 |
THIS_DIR="$(cd "$(dirname "$0")" && pwd)" |
| 13 |
. "${THIS_DIR}/emulator-functions.sh" |
| 14 |
|
| 15 |
# Cleanup the emulator if it's already running. |
| 16 |
if docker container inspect libcxx-ci-android-emulator &>/dev/null; then |
| 17 |
echo "Stopping existing emulator container..." |
| 18 |
docker stop libcxx-ci-android-emulator |
| 19 |
|
| 20 |
echo "Emulator container final logs:" |
| 21 |
docker logs libcxx-ci-android-emulator |
| 22 |
|
| 23 |
echo "Removing existing emulator container..." |
| 24 |
docker rm libcxx-ci-android-emulator |
| 25 |
fi |