d0be2109cf
Add a cuj_tests binary that runs through a sequence of critical user journey builds and collects metrics. Bug: 145688720 Test: cuj_tests Change-Id: I6bb1a3fc4a458fd8cea7b7c924f565d0cf3e6df3
29 lines
566 B
Bash
Executable file
29 lines
566 B
Bash
Executable file
#!/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
|