INNER CODE UNIT · Java

IFS

alibaba/ARouter · gradle/verify-device-tests.sh:19

while IFS= read -r serial; do
    [[ -z "${serial}" ]] || devices+=("${serial}")
done < <(awk 'NR > 1 && NF { print $1 }' <<< "${device_list}")

# AGP's connected tasks must not accidentally include another device. This
# verifier deliberately requires one booted emulator, including on local runs.
if [[ ${#devices[@]} -ne 1 || "${devices[0]}" != emulator-* ]]; then
    echo "Connect exactly one booted emulator before running device tests." >&2
    exit 1
fi
serial="${devices[0]}"
if [[ -n "${ANDROID_SERIAL:-}" && "${ANDROID_SERIAL}" != "${serial}" ]]; then
    echo "ANDROID_SERIAL does not match the connected emulator." >&2
    exit 1
fi
export ANDROID_SERIAL="${serial}"
if [[ "$("${adb}" -s "${serial}" shell getprop sys.boot_completed | tr -d '\r')" != 1 ]]; then
    echo "The emulator has not finished booting." >&2

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…