From 83631d69d8f37b72a571b9ae3ea7bb45e8520f3f Mon Sep 17 00:00:00 2001 From: Justin Yun Date: Fri, 5 Oct 2018 14:24:12 +0900 Subject: [PATCH] Remove retry routines from mixed_build The retry routines are added for testing purpose (aosp/730971). We may now remove this because it has no effect to remove the flaky build errors. Bug: 112250435 Test: build_mixed system_dir device_dir out_dir Change-Id: Ibdefb7da3188ce42b6cd2deb5e40ad777c2fe5b0 --- vndk/tools/build_mixed | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/vndk/tools/build_mixed b/vndk/tools/build_mixed index f4441437e..399aabe4e 100755 --- a/vndk/tools/build_mixed +++ b/vndk/tools/build_mixed @@ -80,32 +80,17 @@ readonly DIST_DIR="$3" readonly CHECK_TOOL="$4" readonly TEMP_DIR="$(mktemp -d /tmp/"$(basename $0)"_XXXXXXXX)" -# Retry command until a certain limit. -# Usage: retry "command" -retry () { - NEXT_WAIT_TIME=0 - until ($1 && [[ -n "$($1)" ]]) || [[ $NEXT_WAIT_TIME -eq 4 ]]; do - sleep $(( ++NEXT_WAIT_TIME )) - done -} - -command="find "$SYSTEM_DIR" -name "*-target_files-*.zip" -print" -retry "$command" -readonly SYSTEM_TARGET_FILES_ARCHIVE="$($command)" +readonly SYSTEM_TARGET_FILES_ARCHIVE="$(find "$SYSTEM_DIR" -name "*-target_files-*.zip" -print)" if [[ ! -f "$SYSTEM_TARGET_FILES_ARCHIVE" ]]; then exit_badparam "Could not find system target files archive in $SYSTEM_DIR." fi -command="find "$DEVICE_DIR" -name "*-img-*.zip" -print" -retry "$command" -readonly DEVICE_ARCHIVE="$($command)" +readonly DEVICE_ARCHIVE="$(find "$DEVICE_DIR" -name "*-img-*.zip" -print)" if [[ ! -f "$DEVICE_ARCHIVE" ]]; then exit_badparam "Could not find device img archive in $DEVICE_DIR." fi -command="find "$DEVICE_DIR" -name "*-target_files-*.zip" -print" -retry "$command" -readonly DEVICE_TARGET_FILES_ARCHIVE="$($command)" +readonly DEVICE_TARGET_FILES_ARCHIVE="$(find "$DEVICE_DIR" -name "*-target_files-*.zip" -print)" if [[ ! -f "$DEVICE_TARGET_FILES_ARCHIVE" ]]; then exit_badparam "Could not find device target_files archive in $DEVICE_DIR." fi