aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
Diffstat (limited to 'ci')
-rwxr-xr-xci/diffs.sh6
-rwxr-xr-xci/mixed_mode_toggle.sh31
2 files changed, 31 insertions, 6 deletions
diff --git a/ci/diffs.sh b/ci/diffs.sh
index 9eafe1c0..2752f71d 100755
--- a/ci/diffs.sh
+++ b/ci/diffs.sh
@@ -16,7 +16,7 @@ readonly DIFFTOOL_ZIP="$(realpath bazel-bin/build/bazel/scripts/difftool/difftoo
# the following 2 arrays must be of the same size
MODULES=(
- libnativehelper
+ # libnativehelper # TODO(b/266245044) re-enable the test
)
OUTPUTS=(
JNIHelp.o
@@ -48,8 +48,8 @@ mkdir -p "$MIXED_COLLECTION"
function findIn() {
result=$(find "$1" -name "$3" | grep "$2")
count=$(echo "$result" | wc -l)
- if [ "$count" != 1 ]; then
- printf "multiple files found instead of exactly ONE:\n%s\n" "$result" 1>&2
+ if [[ "$count" -ne "1" || -z "$result" ]]; then
+ printf "Expected 1 file, found:\n%s\nCommand run: find $1 -name $3 | grep $2\n" "$result" >&2
exit 1
fi
echo "$result"
diff --git a/ci/mixed_mode_toggle.sh b/ci/mixed_mode_toggle.sh
index f61d4944..50fba89c 100755
--- a/ci/mixed_mode_toggle.sh
+++ b/ci/mixed_mode_toggle.sh
@@ -36,9 +36,18 @@ build/soong/soong_ui.bash --make-mode \
BAZEL_BUILD_ARGS="--color=no --curses=no --show_progress_rate_limit=5" \
TARGET_PRODUCT=aosp_arm64 \
TARGET_BUILD_VARIANT=userdebug \
- nothing \
+ com.android.tzdata \
dist DIST_DIR=$DIST_DIR
+
+# PLEASE NOTE - IF TZDATA IS EVER REMOVED FROM THE PROD ALLOWLIST, THIS _WILL_ FAIL
+# Should that happen, look into reverting to the assertions on bazel-out or switching
+
+if [[ ! $(ls out/bazel/output/execroot/__main__/bazel-out/aosp_arm64-userdebug-opt-ST-743b56eaae08/bin/system/timezone/apex/com.android.tzdata_staging_dir/etc/tz/tzdata) ]] ; then
+ echo "Expected tzdata files under bazel-out"
+ exit 1
+fi
+
# Default setting should contain bazel-out, as *at least* tzdata is allowlisted for
# default prod mode.
if [[ $(grep -L "bazel-out" ${OUT_DIR}/soong/build.ninja) ]]; then
@@ -59,11 +68,15 @@ build/soong/soong_ui.bash --make-mode \
nothing \
dist DIST_DIR=$DIST_DIR
+# Note - we could m clean and assert that the bazel build doesn't exist, but this is
+# a better use of time
if [[ ! $(grep -L "bazel-out" ${OUT_DIR}/soong/build.ninja) ]]; then
echo "Expected BUILD_BROKEN override to not reference bazel-out"
exit 1
fi
+build/soong/soong_ui.bash --make-mode clean
+
# Rerun default setting. This verifies that removing BUILD_BROKEN_DISABLE_BAZEL
# causes analysis to be rerun.
build/soong/soong_ui.bash --make-mode \
@@ -72,14 +85,21 @@ build/soong/soong_ui.bash --make-mode \
BAZEL_BUILD_ARGS="--color=no --curses=no --show_progress_rate_limit=5" \
TARGET_PRODUCT=aosp_arm64 \
TARGET_BUILD_VARIANT=userdebug \
- nothing \
+ com.android.tzdata \
dist DIST_DIR=$DIST_DIR
+if [[ ! $(ls out/bazel/output/execroot/__main__/bazel-out/aosp_arm64-userdebug-opt-ST-743b56eaae08/bin/system/timezone/apex/com.android.tzdata_staging_dir/etc/tz/tzdata) ]] ; then
+ echo "Expected tzdata files under bazel-out"
+ exit 1
+fi
+
if [[ $(grep -L "bazel-out" ${OUT_DIR}/soong/build.ninja) ]]; then
echo "Expected default build rerun to reference bazel-out"
exit 1
fi
+build/soong/soong_ui.bash --make-mode clean
+
# Regen ninja file with mixed builds dev mode.
build/soong/soong_ui.bash --make-mode \
--mk-metrics \
@@ -88,9 +108,14 @@ build/soong/soong_ui.bash --make-mode \
BAZEL_BUILD_ARGS="--color=no --curses=no --show_progress_rate_limit=5" \
TARGET_PRODUCT=aosp_arm64 \
TARGET_BUILD_VARIANT=userdebug \
- nothing \
+ com.android.tzdata \
dist DIST_DIR=$DIST_DIR
+if [[ ! $(ls out/bazel/output/execroot/__main__/bazel-out/aosp_arm64-userdebug-opt-ST-743b56eaae08/bin/system/timezone/apex/com.android.tzdata_staging_dir/etc/tz/tzdata) ]] ; then
+ echo "Expected tzdata files under bazel-out"
+ exit 1
+fi
+
if [[ $(grep -L "bazel-out" ${OUT_DIR}/soong/build.ninja) ]]; then
echo "Expected dev mode build to reference bazel-out"
exit 1