• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash -eux
2# Verifies mixed builds succeeds when building "droid".
3# This verification script is designed to be used for continuous integration
4# tests, though may also be used for manual developer verification.
5
6if [[ -z ${DIST_DIR+x} ]]; then
7  echo "DIST_DIR not set. Using out/dist. This should only be used for manual developer testing."
8  DIST_DIR="out/dist"
9fi
10
11# Run a mixed build of "droid"
12build/soong/soong_ui.bash --make-mode \
13  --mk-metrics \
14  BP2BUILD_VERBOSE=1 \
15  USE_BAZEL_ANALYSIS=1 \
16  BAZEL_STARTUP_ARGS="--max_idle_secs=5" \
17  BAZEL_BUILD_ARGS="--color=no --curses=no --show_progress_rate_limit=5" \
18  TARGET_PRODUCT=aosp_arm64 \
19  TARGET_BUILD_VARIANT=userdebug \
20  droid platform_tests \
21  dist DIST_DIR=$DIST_DIR
22
23# Verify there are artifacts under the out directory that originated from bazel.
24echo "Verifying OUT_DIR contains bazel-out..."
25if find out/ -type d -name bazel-out &>/dev/null; then
26  echo "bazel-out found."
27else
28  echo "bazel-out not found. This may indicate that mixed builds are silently not running."
29  exit 1
30fi
31