android / testing-samples

A collection of samples demonstrating different frameworks and techniques for automated testing
Apache License 2.0
9.18k stars 3.61k forks source link

Breaks on Bazel CI #279

Closed laszlocsomor closed 5 years ago

laszlocsomor commented 5 years ago

The Android Testing project breaks with Bazel at HEAD.

CI log: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/1026#398ee489-4f4a-4af9-9859-04fa0d0a9f30 Source tree: https://github.com/googlesamples/android-testing/commit/b8b6f3445645e955db4d94953e0b22052d238bbc Bazel version: built at https://github.com/bazelbuild/bazel/commit/12c7942f45185e15ac26c383644b5d63a3c25269

Example test log:

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //ui/espresso/CustomMatcherSample:CustomMatcherSampleInstrumentationTest_19_x86
-----------------------------------------------------------------------------
+ '[' -z '' ']'
+ ANDROID_TESTBRIDGE_TEST_ONLY=
+ test_label=//ui/espresso/CustomMatcherSample:CustomMatcherSampleInstrumentationTest_19_x86
+ test_entry_point=../android_test_support/instrumentation_test_runner
+ WORKSPACE_DIR=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__
+ adb=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../androidsdk/platform-tools/adb
+ aapt=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../androidsdk/aapt_binary
+ device_script=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../android_test_support/tools/android/emulated_devices/generic_phone/android_19_x86_qemu2
+ data_deps=
++ join_paths /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__ ,
++ local base_dir=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__
++ local sep=,
++ shift 2
++ local paths=
++ local result=
++ echo
+ data_deps=
+ device_broker_type=WRAPPED_EMULATOR
+ target_apk=ui/espresso/CustomMatcherSample/CustomMatcherSample.apk
+ instrumentation_apk=ui/espresso/CustomMatcherSample/CustomMatcherSampleTest.apk
+ support_apks=
++ join_paths /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__ ,
++ local base_dir=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__
++ local sep=,
++ shift 2
++ local paths=
++ local result=
++ echo
+ support_apks=
+ apks_to_install=ui/espresso/CustomMatcherSample/CustomMatcherSample.apk,ui/espresso/CustomMatcherSample/CustomMatcherSampleTest.apk
+ device_script_fixtures=()
+ declare -A device_script_fixtures
+ host_service_fixture=
+ host_service_fixture_services=
+ test_suite_property_name=bazel.test_suite
++ cat
+ bazel_only_argv=--install_test_services=true
++ cat
+++ printf %s,
+++ printf %s,
+ argv='--aapt=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../androidsdk/aapt_binary --adb=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../androidsdk/platform-tools/adb --device_broker_type=WRAPPED_EMULATOR --device_script=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../android_test_support/tools/android/emulated_devices/generic_phone/android_19_x86_qemu2 --data_deps= --test_label=//ui/espresso/CustomMatcherSample:CustomMatcherSampleInstrumentationTest_19_x86 --apks_to_install=ui/espresso/CustomMatcherSample/CustomMatcherSample.apk,ui/espresso/CustomMatcherSample/CustomMatcherSampleTest.apk --fixture_scripts=, --hermetic_server_script= --hermetic_servers= --data_deps=, --test_filter= '
+ ../android_test_support/instrumentation_test_runner --wrapper_script_flag=--jvm_flag=-Dbazel.test_suite=com.google.android.apps.common.testing.suite.AndroidDeviceTestSuite '--wrapper_script_flag=--jvm_flag=-Dargv=--install_test_services=true --aapt=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../androidsdk/aapt_binary --adb=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../androidsdk/platform-tools/adb --device_broker_type=WRAPPED_EMULATOR --device_script=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../android_test_support/tools/android/emulated_devices/generic_phone/android_19_x86_qemu2 --data_deps= --test_label=//ui/espresso/CustomMatcherSample:CustomMatcherSampleInstrumentationTest_19_x86 --apks_to_install=ui/espresso/CustomMatcherSample/CustomMatcherSample.apk,ui/espresso/CustomMatcherSample/CustomMatcherSampleTest.apk --fixture_scripts=, --hermetic_server_script= --hermetic_servers= --data_deps=, --test_filter= ' --aapt=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../androidsdk/aapt_binary --adb=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../androidsdk/platform-tools/adb --device_broker_type=WRAPPED_EMULATOR --device_script=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../android_test_support/tools/android/emulated_devices/generic_phone/android_19_x86_qemu2 --data_deps= --test_label=//ui/espresso/CustomMatcherSample:CustomMatcherSampleInstrumentationTest_19_x86 --apks_to_install=ui/espresso/CustomMatcherSample/CustomMatcherSample.apk,ui/espresso/CustomMatcherSample/CustomMatcherSampleTest.apk --fixture_scripts=, --hermetic_server_script= --hermetic_servers= --data_deps=, --test_filter=
JUnit4 Test Runner
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/external/android_test_support/opensource/entry_point_deploy.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Jun 07, 2019 2:08:14 AM com.google.android.apps.common.testing.broker.WrappedEmulatedDeviceBroker runEmulatorLaunchScript
INFO: Running emulator launch script: [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../android_test_support/tools/android/emulated_devices/generic_phone/android_19_x86_qemu2, --action=start, --adb_server_port=34937, --adb_port=49296, --emulator_port=41924, --logcat_path=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/testlogs/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86/test.outputs/device_logcat/logcat3762075597033503372.txt, --apks=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/ui/espresso/CustomMatcherSample/CustomMatcherSample.apk /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/ui/espresso/CustomMatcherSample/CustomMatcherSampleTest.apk /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/_tmp/710d4a16776e7598605f0ba3747293fe/10751775944722634522/services/test_services.apk /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/_tmp/710d4a16776e7598605f0ba3747293fe/10751775944722634522/runner/android_test_orchestrator/stubapp/stubapp.apk, --system_apks=, --subprocess_log_dir=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/testlogs/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86/test.outputs/broker_logs/exec-1, --nolaunch_in_seperate_session, --start_vnc_on_port=0, --initial_locale=en-US, --initial_ime=com.android.inputmethod.latin/.LatinIME, --kvm_device=/dev/kvm, --grant_runtime_permissions=true, --logcat_filter='*:I', --enable_display, --nopreverify_apks, --noenable_console_auth, --enable_gps, --export_launch_metadata_path=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/_tmp/710d4a16776e7598605f0ba3747293fe/emulator_meta11579350986944447379.pb, --net_type=fastnet, --long_press_timeout=5000]
Jun 07, 2019 2:08:28 AM com.google.android.apps.common.testing.suite.AndroidDeviceTestSuite$Builder build
WARNING: AndroidDeviceTestSuite Native suite creation failed!
.E
Time: 0.004
There was 1 failure:
1) initializationError(com.google.android.apps.common.testing.suite.AndroidDeviceTestSuite)
java.lang.IllegalStateException: Bad exit code: 1. Command: [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../android_test_support/tools/android/emulated_devices/generic_phone/android_19_x86_qemu2, --action=start, --adb_server_port=34937, --adb_port=49296, --emulator_port=41924, --logcat_path=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/testlogs/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86/test.outputs/device_logcat/logcat3762075597033503372.txt, --apks=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/ui/espresso/CustomMatcherSample/CustomMatcherSample.apk /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/ui/espresso/CustomMatcherSample/CustomMatcherSampleTest.apk /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/_tmp/710d4a16776e7598605f0ba3747293fe/10751775944722634522/services/test_services.apk /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/_tmp/710d4a16776e7598605f0ba3747293fe/10751775944722634522/runner/android_test_orchestrator/stubapp/stubapp.apk, --system_apks=, --subprocess_log_dir=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/testlogs/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86/test.outputs/broker_logs/exec-1, --nolaunch_in_seperate_session, --start_vnc_on_port=0, --initial_locale=en-US, --initial_ime=com.android.inputmethod.latin/.LatinIME, --kvm_device=/dev/kvm, --grant_runtime_permissions=true, --logcat_filter='*:I', --enable_display, --nopreverify_apks, --noenable_console_auth, --enable_gps, --export_launch_metadata_path=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/_tmp/710d4a16776e7598605f0ba3747293fe/emulator_meta11579350986944447379.pb, --net_type=fastnet, --long_press_timeout=5000].
=====Error begin:
...
I0607 02:08:15.792164 140260490483520 emulated_device.py:568] Copying system image to /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/_tmp/710d4a16776e7598605f0ba3747293fe/launcher_tmp4933197534612474522/tmp7WChn8android-emulator-launch/images/session/system.img
I0607 02:08:16.119126 140260490483520 emulated_device.py:3465] Running debugfs commands: ['unlink /vendor/lib/egl']
debugfs 1.44.1 (24-Mar-2018)
/vendor/lib: File not found by ext2_lookup
I0607 02:08:17.718348 140260490483520 emulated_device.py:717] Making sdcard on the fly due to a nonstandard size
I0607 02:08:18.378766 140260490483520 emulated_device.py:288] Emulator type: 2
I0607 02:08:18.412534 140260490483520 emulated_device.py:1790] Executing: ['/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/androidsdk/emulator/emulator', '-ports', '41924,49296', '-skin', u'480x800', '-timezone', 'America/Los_Angeles', '-cache', 'cache.img', '-memory', '1536', '-sdcard', 'sdcard.img', '-ramdisk', 'ramdisk.img', '-partition-size', '2047', '-no-snapshot-save', '-verbose', '-unix-pipe', 'sockets/qemu.mgmt', '-unix-pipe', 'sockets/device-forward-server', '-unix-pipe', 'sockets/tar-pull-server', '-unix-pipe', 'sockets/exec-server', '-unix-pipe', 'sockets/tar-push-server', '-unix-pipe', 'sockets/h2o', '-writable-system', '-show-kernel', '-engine', 'qemu2', '-kernel', 'kernel-ranchu', '-system', 'system.img', '-feature', 'AllowSnapshotMigration', '-feature', '-GLDMA', '-feature', '-OnDemandSnapshotLoad', '-data', 'userdata-qemu.img', '-gpu', 'swiftshader_indirect', '-no-audio', '-no-boot-anim', '-selinux', u'disabled', '-scale', '1.0', '-fixed-scale', '-netdelay', 'none', '-netspeed', 'full', '-avd', 'mobile_ninjas.adb.49296', '-qemu', u'-enable-kvm', '-L', '/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/_tmp/710d4a16776e7598605f0ba3747293fe/launcher_tmp4933197534612474522/tmp7WChn8android-emulator-launch/bios', '-append', 'enable_test_harness=1']
I0607 02:08:18.415244 140260490483520 emulated_device.py:1824] Launching emulator in: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/_tmp/710d4a16776e7598605f0ba3747293fe/launcher_tmp4933197534612474522/tmp7WChn8android-emulator-launch/images/session
I0607 02:08:18.415657 140260490483520 emulated_device.py:1830] Write emulator log to /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/testlogs/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86/test.outputs/emulator_KA1H5M.log
I0607 02:08:18.417277 140260490483520 emulated_device.py:2401] system: False pm: False adb: False sdcard: False boot_complete: False launcher: False pipes: False current step attempts: 0 total attempts: 0
I0607 02:08:18.418116 140260490483520 emulated_device.py:3937] Checking if adb is listening.
I0607 02:08:19.420387 140260490483520 emulated_device.py:2401] system: False pm: False adb: False sdcard: False boot_complete: False launcher: False pipes: False current step attempts: 1 total attempts: 1
I0607 02:08:19.420754 140260490483520 emulated_device.py:3937] Checking if adb is listening.
I0607 02:08:20.421593 140260490483520 emulated_device.py:2401] system: False pm: False adb: False sdcard: False boot_complete: False launcher: False pipes: False current step attempts: 2 total attempts: 2
I0607 02:08:20.421921 140260490483520 emulated_device.py:3937] Checking if adb is listening.
I0607 02:08:21.423521 140260490483520 emulated_device.py:2401] system: False pm: False adb: False sdcard: False boot_complete: False launcher: False pipes: False current step attempts: 3 total attempts: 3
I0607 02:08:21.423810 140260490483520 emulated_device.py:3937] Checking if adb is listening.
I0607 02:08:22.425446 140260490483520 emulated_device.py:2401] system: False pm: False adb: False sdcard: False boot_complete: False launcher: False pipes: False current step attempts: 4 total attempts: 4
I0607 02:08:22.425735 140260490483520 emulated_device.py:3937] Checking if adb is listening.
I0607 02:08:23.427300 140260490483520 emulated_device.py:2401] system: False pm: False adb: False sdcard: False boot_complete: False launcher: False pipes: False current step attempts: 5 total attempts: 5
I0607 02:08:23.427550 140260490483520 emulated_device.py:3937] Checking if adb is listening.
I0607 02:08:24.429081 140260490483520 emulated_device.py:2401] system: False pm: False adb: False sdcard: False boot_complete: False launcher: False pipes: False current step attempts: 6 total attempts: 6
I0607 02:08:24.429356 140260490483520 emulated_device.py:3937] Checking if adb is listening.
I0607 02:08:25.430963 140260490483520 emulated_device.py:2401] system: False pm: False adb: False sdcard: False boot_complete: False launcher: False pipes: False current step attempts: 7 total attempts: 7
I0607 02:08:25.431291 140260490483520 emulated_device.py:3937] Checking if adb is listening.
I0607 02:08:26.432909 140260490483520 emulated_device.py:2401] system: False pm: False adb: False sdcard: False boot_complete: False launcher: False pipes: False current step attempts: 8 total attempts: 8
I0607 02:08:26.433258 140260490483520 emulated_device.py:3937] Checking if adb is listening.
I0607 02:08:27.435127 140260490483520 emulated_device.py:2401] system: False pm: False adb: False sdcard: False boot_complete: False launcher: False pipes: False current step attempts: 9 total attempts: 9
I0607 02:08:27.435518 140260490483520 emulated_device.py:3937] Checking if adb is listening.
I0607 02:08:28.437149 140260490483520 emulated_device.py:2401] system: False pm: False adb: False sdcard: False boot_complete: False launcher: False pipes: False current step attempts: 10 total attempts: 10
E0607 02:08:28.437630 140260490483520 emulated_device.py:3904] Emulator failed to launch: [Errno 10] No child processes
I0607 02:08:28.438083 140260490483520 emulated_device.py:3883] Emulator log below ==================================================
emulator: Android emulator version 29.0.9.0 (build_id 5537588) (CL:N/A)
emulator: Found AVD name 'mobile_ninjas.adb.49296'
emulator: Found AVD target architecture: x86
emulator: argv[0]: '/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/androidsdk/emulator/emulator'; program directory: '/opt/android-sdk-linux/emulator'
emulator:  Found directory: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/_tmp/710d4a16776e7598605f0ba3747293fe/launcher_tmp4933197534612474522/tmp7WChn8android-emulator-launch/images/session

emulator: emuDirName: '/opt/android-sdk-linux/emulator'
emulator:  Found directory: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/_tmp/710d4a16776e7598605f0ba3747293fe/launcher_tmp4933197534612474522/tmp7WChn8android-emulator-launch/images/session

emulator: Probing for /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/_tmp/710d4a16776e7598605f0ba3747293fe/launcher_tmp4933197534612474522/tmp7WChn8android-emulator-launch/images/session/kernel-ranchu-64: file missing
emulator: try dir /opt/android-sdk-linux/emulator
emulator: Trying emulator path '/opt/android-sdk-linux/emulator/qemu/linux-x86_64/qemu-system-i386'
emulator: Found target-specific 64-bit emulator binary: /opt/android-sdk-linux/emulator/qemu/linux-x86_64/qemu-system-i386
emulator: Adding library search path: '/opt/android-sdk-linux/emulator/lib64'
emulator: Adding library search path: '/opt/android-sdk-linux/emulator/lib64/gles_swiftshader'
emulator: Adding library search path: '/opt/android-sdk-linux/emulator/lib64/gles_angle'
emulator: Adding library search path: '/opt/android-sdk-linux/emulator/lib64/gles_angle9'
emulator: Adding library search path: '/opt/android-sdk-linux/emulator/lib64/gles_angle11'
emulator: Adding library search path: '/opt/android-sdk-linux/emulator/lib64/libstdc++'
emulator: Adding library search path for Qt: '/opt/android-sdk-linux/emulator/lib64/qt/lib'
emulator: Setting Qt plugin search path: QT_QPA_PLATFORM_PLUGIN_PATH=/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/__main__/../androidsdk/emulator/lib64/qt/plugins
emulator: Setting Qt to use software OpenGL: QT_OPENGL=software
emulator: Overriding pre-existing bad Qt high dpi settings...
emulator: Running :/opt/android-sdk-linux/emulator/qemu/linux-x86_64/qemu-system-i386
emulator: qemu backend: argv[00] = "/opt/android-sdk-linux/emulator/qemu/linux-x86_64/qemu-system-i386"
emulator: qemu backend: argv[01] = "-ports"
emulator: qemu backend: argv[02] = "41924,49296"
emulator: qemu backend: argv[03] = "-skin"
emulator: qemu backend: argv[04] = "480x800"
emulator: qemu backend: argv[05] = "-timezone"
emulator: qemu backend: argv[06] = "America/Los_Angeles"
emulator: qemu backend: argv[07] = "-cache"
emulator: qemu backend: argv[08] = "cache.img"
emulator: qemu backend: argv[09] = "-memory"
emulator: qemu backend: argv[10] = "1536"
emulator: qemu backend: argv[11] = "-sdcard"
emulator: qemu backend: argv[12] = "sdcard.img"
emulator: qemu backend: argv[13] = "-ramdisk"
emulator: qemu backend: argv[14] = "ramdisk.img"
emulator: qemu backend: argv[15] = "-partition-size"
emulator: qemu backend: argv[16] = "2047"
emulator: qemu backend: argv[17] = "-no-snapshot-save"
emulator: qemu backend: argv[18] = "-verbose"
emulator: qemu backend: argv[19] = "-unix-pipe"
emulator: qemu backend: argv[20] = "sockets/qemu.mgmt"
emulator: qemu backend: argv[21] = "-unix-pipe"
emulator: qemu backend: argv[22] = "sockets/device-forward-server"
emulator: qemu backend: argv[23] = "-unix-pipe"
emulator: qemu backend: argv[24] = "sockets/tar-pull-server"
emulator: qemulator: autoconfig: -skindir (null)
emulator: Target arch = 'x86'
emulator: Auto-config: -qemu -cpu qemu32
emulator: Auto-detect: Kernel image requires new device naming scheme.
emulator: Auto-detect: Kernel does support YAFFS2 partitions.
emulator: Using initial system image: system.img
emulator: No vendor image
emulator: autoconfig: -initdata (null)
emulator: Physical RAM size: 1536MB

emulator: WARNING: System image is writable
emulator: Found 1 DNS servers: 169.254.169.254
emulator: [FeatureControl] Feature 'AllowSnapshotMigration' (13) state set to enabled
emulator: [FeatureControl] Feature 'GLDMA' (30) state set to disabled
emulator: [FeatureControl] Feature 'OnDemandSnapshotLoad' (21) state set to disabled
emulator: found magic skin width=480 height=800 bpp=16

emulator: ERROR: no init encryptionkey.img
emulator: ERROR: Encryption is requested but failed to create encrypt partition.
WARNING: engine selection is no longer supported, always using RACNHU.
WARNING: unexpected system image feature string, emulator might not function correctly, please try updating the emulator.
Unexpected feature list: AllowSnapshotMigration CarPropertyTable FastSnapshotV1 ForceANGLE ForceSwiftshader GLPipeChecksum GenericSnapshotsUI HAXM HVF HYPERV IgnoreHostOpenGLErrors KVM LocationUiV2 OnDemandSnapshotLoad QuickbootFileBacked ScreenRecording SnapshotAdb VideoPlayback VirtualScene Vulkan WindowsHypervisorPlatform WindowsOnDemandSnapshotLoad

I0607 02:08:28.438200 140260490483520 emulated_device.py:3884] Emulator log end ==================================================
I0607 02:08:28.438338 140260490483520 emulated_device.py:3897] cannot show log watchdog.out: file does not exist
I0607 02:08:28.438427 140260490483520 emulated_device.py:3897] cannot show log watchdog.err: file does not exist
Traceback (most recent call last):
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/android_test_support/tools/android/emulator/unified_launcher.py", line 1129, in <module>
app.run(main)
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/absl_py/absl/app.py", line 262, in run
_run_main(main, argv)
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/absl_py/absl/app.py", line 227, in _run_main
sys.exit(main(argv))
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/android_test_support/tools/android/emulator/unified_launcher.py", line 1099, in main
EntryPoint(reporter)
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/android_test_support/tools/android/emulator/unified_launcher.py", line 935, in EntryPoint
mini_boot, FLAGS.sim_access_rules_file, FLAGS.phone_number)
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/android_test_support/tools/android/emulator/unified_launcher.py", line 663, in _Run
snapshot_file=FLAGS.snapshot_file)
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/android_test_support/tools/android/emulator/unified_launcher.py", line 523, in _RestartDevice
snapshot_file=snapshot_file)
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/android_test_support/tools/android/emulator/emulated_device.py", line 1267, in StartDevice
loading_from_snapshot=loading_from_snapshot)
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/android_test_support/tools/android/emulator/emulated_device.py", line 1838, in _StartEmulator
self._PollEmulatorStatus(timer, loading_from_snapshot=loading_from_snapshot)
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/android_test_support/tools/android/emulator/emulated_device.py", line 2402, in _PollEmulatorStatus
self._EnsureEmuRunning()
File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/cd8fcf134279e0ce6de1215b0c6b1711/execroot/__main__/bazel-out/k8-fastbuild/bin/ui/espresso/CustomMatcherSample/CustomMatcherSampleInstrumentationTest_19_x86.runfiles/android_test_support/tools/android/emulator/emulated_device.py", line 3906, in _EnsureEmuRunning
raise Exception('Emulator has died')
Exception: Emulator has died
=====Error end

    at com.google.common.base.Preconditions.checkState(Preconditions.java:853)
    at com.google.android.apps.common.testing.broker.WrappedEmulatedDeviceBroker.runEmulatorLaunchScript(WrappedEmulatedDeviceBroker.java:555)
    at com.google.android.apps.common.testing.broker.WrappedEmulatedDeviceBroker.leaseDevice(WrappedEmulatedDeviceBroker.java:264)
    at com.google.android.apps.common.testing.suite.AndroidDeviceTestSuite$Builder.makeNativeTestSuite(AndroidDeviceTestSuite.java:140)
    at com.google.android.apps.common.testing.suite.AndroidDeviceTestSuite$Builder.build(AndroidDeviceTestSuite.java:103)
    at com.google.android.apps.common.testing.suite.AndroidDeviceTestSuite.suite(AndroidDeviceTestSuite.java:64)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.junit.internal.runners.SuiteMethod.testFromSuiteMethod(SuiteMethod.java:35)
    at org.junit.internal.runners.SuiteMethod.<init>(SuiteMethod.java:24)
    at org.junit.internal.builders.SuiteMethodBuilder.runnerForClass(SuiteMethodBuilder.java:11)
    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
    at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
    at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
    at com.google.testing.junit.runner.internal.junit4.MemoizingRequest.createRunner(MemoizingRequest.java:48)
    at com.google.testing.junit.runner.internal.junit4.MemoizingRequest.getRunner(MemoizingRequest.java:34)
    at com.google.testing.junit.runner.junit4.JUnit4TestModelBuilder.get(JUnit4TestModelBuilder.java:49)
    at com.google.testing.junit.runner.junit4.JUnit4TestModelBuilder.get(JUnit4TestModelBuilder.java:27)
    at com.google.testing.junit.runner.util.MemoizingSupplier.get(MemoizingSupplier.java:42)
    at com.google.testing.junit.runner.junit4.JUnit4Runner.run(JUnit4Runner.java:92)
    at com.google.testing.junit.runner.BazelTestRunner.runTestsInSuite(BazelTestRunner.java:144)
    at com.google.testing.junit.runner.BazelTestRunner.main(BazelTestRunner.java:82)

FAILURES!!!
Tests run: 1,  Failures: 1

BazelTestRunner exiting with a return value of 1
JVM shutdown hooks (if any) will run now.
The JVM will exit once they complete.

-- JVM shutdown starting at 2019-06-07 02:08:28 --
laurentlb commented 5 years ago

cc @brandjon - is it caused by your flag flip?

laurentlb commented 5 years ago

cc @jin also Is it related to https://github.com/googlesamples/android-testing/issues/266?

brandjon commented 5 years ago

I don't see anything here pointing to python...

jin commented 5 years ago

This is not #266. Also see https://github.com/bazelbuild/rules_jvm_external/issues/165

jin commented 5 years ago

Bisected culprit commit: https://github.com/bazelbuild/bazel/commit/bc6f7cb330bb531f062bb301f3703876051191f5

Will rollback.

laurentlb commented 5 years ago

Thanks a lot!

(Jon, a Python script was failing and I wasn't aware of any other incompatible change)