Colin Cross | d0be210 | 2019-11-26 16:16:57 -0800 | [diff] [blame^] | 1 | #!/bin/bash -e |
| 2 | |
| 3 | readonly UNAME="$(uname)" |
| 4 | case "$UNAME" in |
| 5 | Linux) |
| 6 | readonly OS='linux' |
| 7 | ;; |
| 8 | Darwin) |
| 9 | readonly OS='darwin' |
| 10 | ;; |
| 11 | *) |
| 12 | echo "Unsupported OS '$UNAME'" |
| 13 | exit 1 |
| 14 | ;; |
| 15 | esac |
| 16 | |
| 17 | readonly ANDROID_TOP="$(cd $(dirname $0)/../../..; pwd)" |
| 18 | cd "$ANDROID_TOP" |
| 19 | |
| 20 | export OUT_DIR="${OUT_DIR:-out}" |
| 21 | readonly SOONG_OUT="${OUT_DIR}/soong" |
| 22 | |
| 23 | build/soong/soong_ui.bash --make-mode "${SOONG_OUT}/host/${OS}-x86/bin/cuj_tests" |
| 24 | |
| 25 | "${SOONG_OUT}/host/${OS}-x86/bin/cuj_tests" || true |
| 26 | |
| 27 | if [ -n "${DIST_DIR}" ]; then |
| 28 | cp -r "${OUT_DIR}/cuj_tests/logs" "${DIST_DIR}" |
| 29 | fi |