blob: a746bd59eaa3653c6d7c493c538feabd44698195 [file] [log] [blame]
Colin Crossd0be2102019-11-26 16:16:57 -08001#!/bin/bash -e
2
3readonly UNAME="$(uname)"
4case "$UNAME" in
5Linux)
6 readonly OS='linux'
7 ;;
8Darwin)
9 readonly OS='darwin'
10 ;;
11*)
12 echo "Unsupported OS '$UNAME'"
13 exit 1
14 ;;
15esac
16
17readonly ANDROID_TOP="$(cd $(dirname $0)/../../..; pwd)"
18cd "$ANDROID_TOP"
19
20export OUT_DIR="${OUT_DIR:-out}"
Colin Crossd0be2102019-11-26 16:16:57 -080021
Colin Cross6a4d3ba2021-11-05 14:07:48 -070022build/soong/soong_ui.bash --make-mode "${OUT_DIR}/host/${OS}-x86/bin/cuj_tests"
Colin Crossd0be2102019-11-26 16:16:57 -080023
Colin Cross6a4d3ba2021-11-05 14:07:48 -070024"${OUT_DIR}/host/${OS}-x86/bin/cuj_tests" || true
Colin Crossd0be2102019-11-26 16:16:57 -080025
26if [ -n "${DIST_DIR}" ]; then
27 cp -r "${OUT_DIR}/cuj_tests/logs" "${DIST_DIR}"
28fi