File: run_cuj_tests.sh

package info (click to toggle)
golang-android-soong 0.0~git20201014.17e97d9-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 7,680 kB
  • sloc: python: 3,000; sh: 1,780; cpp: 66; makefile: 5
file content (29 lines) | stat: -rwxr-xr-x 566 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash -e

readonly UNAME="$(uname)"
case "$UNAME" in
Linux)
    readonly OS='linux'
    ;;
Darwin)
    readonly OS='darwin'
    ;;
*)
    echo "Unsupported OS '$UNAME'"
    exit 1
    ;;
esac

readonly ANDROID_TOP="$(cd $(dirname $0)/../../..; pwd)"
cd "$ANDROID_TOP"

export OUT_DIR="${OUT_DIR:-out}"
readonly SOONG_OUT="${OUT_DIR}/soong"

build/soong/soong_ui.bash --make-mode "${SOONG_OUT}/host/${OS}-x86/bin/cuj_tests"

"${SOONG_OUT}/host/${OS}-x86/bin/cuj_tests" || true

if [ -n "${DIST_DIR}" ]; then
  cp -r "${OUT_DIR}/cuj_tests/logs" "${DIST_DIR}"
fi