Instrumentation Test Listing fail to create JSON result |
|||||
Issue descriptionOur test runner would sometimes fail at listing instrumentation tests through device. Example log from: https://chromium-swarm.appspot.com/task?id=37e076893052b510&refresh=10&show_raw=1 I 56.522s TimeoutThread-1-for-list_tests(0384884f0ae5848c) [host]> /b/swarming/w/ir/third_party/android_tools/sdk/platform-tools/adb -s 0384884f0ae5848c pull /storage/emulated/legacy/temp_file-b71e40fa1846.json /b/swarming/w/itfg4qKF/tmpTm5jMG/list_tests.json C 56.585s list_tests(0384884f0ae5848c) (TimeoutThread-1-for-list_tests(0384884f0ae5848c)) Exception on PullFile(0384884f0ae5848c, /storage/emulated/legacy/temp_file-b71e40fa1846.json, /b/swarming/w/itfg4qKF/tmpTm5jMG/list_tests.json, retries=2, timeout=30), attempt 1 of 3: AdbCommandFailedError("(device: 0384884f0ae5848c) adb pull /storage/emulated/legacy/temp_file-b71e40fa1846.json /b/swarming/w/itfg4qKF/tmpTm5jMG/list_tests.json: failed with exit status 1 and output:\n- adb: error: remote object '/storage/emulated/legacy/temp_file-b71e40fa1846.json' does not exist\n",) I 56.586s TimeoutThread-2-for-list_tests(0384884f0ae5848c) [host]> /b/swarming/w/ir/third_party/android_tools/sdk/platform-tools/adb -s 0384884f0ae5848c pull /storage/emulated/legacy/temp_file-b71e40fa1846.json /b/swarming/w/itfg4qKF/tmpTm5jMG/list_tests.json C 56.649s list_tests(0384884f0ae5848c) (TimeoutThread-2-for-list_tests(0384884f0ae5848c)) Exception on PullFile(0384884f0ae5848c, /storage/emulated/legacy/temp_file-b71e40fa1846.json, /b/swarming/w/itfg4qKF/tmpTm5jMG/list_tests.json, retries=2, timeout=30), attempt 2 of 3: AdbCommandFailedError("(device: 0384884f0ae5848c) adb pull /storage/emulated/legacy/temp_file-b71e40fa1846.json /b/swarming/w/itfg4qKF/tmpTm5jMG/list_tests.json: failed with exit status 1 and output:\n- adb: error: remote object '/storage/emulated/legacy/temp_file-b71e40fa1846.json' does not exist\n",) I 56.649s TimeoutThread-3-for-list_tests(0384884f0ae5848c) [host]> /b/swarming/w/ir/third_party/android_tools/sdk/platform-tools/adb -s 0384884f0ae5848c pull /storage/emulated/legacy/temp_file-b71e40fa1846.json /b/swarming/w/itfg4qKF/tmpTm5jMG/list_tests.json I 56.713s TimeoutThread-1-for-delete_temporary_file(0384884f0ae5848c) [host]> /b/swarming/w/ir/third_party/android_tools/sdk/platform-tools/adb -s 0384884f0ae5848c shell 'rm -f /storage/emulated/legacy/temp_file-b71e40fa1846.json' I 56.721s TimeoutThread-1-for-individual_device_tear_down(0384884f0ae5848c) [host]> /b/swarming/w/ir/third_party/android_tools/sdk/platform-tools/adb -s 0384884f0ae5848c shell '( rm -f /data/local/tmp/chrome-command-line );echo %$?' I 56.785s TimeoutThread-1-for-individual_device_tear_down(0384884f0ae5848c) [host]> /b/swarming/w/ir/third_party/android_tools/sdk/platform-tools/adb -s 0384884f0ae5848c shell '( test -e /data/local/tmp/chrome-command-line );echo %$?' I 56.848s individual_device_tear_down(0384884f0ae5848c) Flags now set on the device: [] I 56.849s TimeoutThread-1-for-individual_device_tear_down(0384884f0ae5848c) [host]> /b/swarming/w/ir/third_party/android_tools/sdk/platform-tools/adb -s 0384884f0ae5848c shell '( am clear-debug-app );echo %$?' I 57.481s TimeoutThread-1-for-individual_device_tear_down(0384884f0ae5848c) [host]> /b/swarming/w/ir/third_party/android_tools/sdk/platform-tools/adb -s 0384884f0ae5848c shell '( rm -f /data/local/tmp/chrome_timeout_scale );echo %$?' I 57.556s tear_down_device(0384884f0ae5848c) Wrote device cache: /b/swarming/w/ir/out/Release/device_cache_0384884f0ae5848c.json I 57.679s Main Opening text logdog stream, unified_logcats I 57.679s Main Getting logdog client. C 57.687s Main Logcat: https://luci-logdog.appspot.com/v/?s=chromium%2Fandroid%2Fswarming%2Flogcats%2F37e076893052b511%2F%2B%2Funified_logcats E 57.688s Main Error occurred. Traceback (most recent call last): File "/b/swarming/w/ir/build/android/test_runner.py", line 983, in main return RunTestsCommand(args) File "/b/swarming/w/ir/build/android/test_runner.py", line 727, in RunTestsCommand return RunTestsInPlatformMode(args) File "/b/swarming/w/ir/build/android/test_runner.py", line 847, in RunTestsInPlatformMode raw_results = test_run.RunTests() File "/b/swarming/w/ir/build/android/pylib/local/device/local_device_test_run.py", line 79, in RunTests tests = self._GetTests() File "/b/swarming/w/ir/build/android/pylib/local/device/local_device_instrumentation_test_run.py", line 317, in _GetTests raw_tests = self._GetTestsFromRunner() File "/b/swarming/w/ir/build/android/pylib/local/device/local_device_instrumentation_test_run.py", line 595, in _GetTestsFromRunner raw_test_lists = self._env.parallel_devices.pMap(list_tests).pGet(None) File "/b/swarming/w/ir/third_party/catapult/devil/devil/utils/parallelizer.py", line 263, in pMap r.pFinish(None) File "/b/swarming/w/ir/third_party/catapult/devil/devil/utils/parallelizer.py", line 135, in pFinish self._objs.JoinAll() File "/b/swarming/w/ir/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 186, in JoinAll self._JoinAll(watcher, timeout) File "/b/swarming/w/ir/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 158, in _JoinAll thread.ReraiseIfException() File "/b/swarming/w/ir/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 81, in run self._ret = self._func(*self._args, **self._kwargs) File "/b/swarming/w/ir/build/android/pylib/local/device/local_device_instrumentation_test_run.py", line 591, in list_tests dev.PullFile(dev_test_list_json.name, host_file) File "/b/swarming/w/ir/third_party/catapult/devil/devil/android/decorators.py", line 57, in timeout_retry_wrapper retry_if_func=retry_if_func) File "/b/swarming/w/ir/third_party/catapult/devil/devil/utils/timeout_retry.py", line 159, in Run error_log_func=error_log_func) File "/b/swarming/w/ir/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 186, in JoinAll self._JoinAll(watcher, timeout) File "/b/swarming/w/ir/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 158, in _JoinAll thread.ReraiseIfException() File "/b/swarming/w/ir/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 81, in run self._ret = self._func(*self._args, **self._kwargs) File "/b/swarming/w/ir/third_party/catapult/devil/devil/utils/timeout_retry.py", line 152, in <lambda> child_thread = reraiser_thread.ReraiserThread(lambda: func(*args, **kwargs), File "/b/swarming/w/ir/third_party/catapult/devil/devil/android/decorators.py", line 47, in impl return f(*args, **kwargs) File "/b/swarming/w/ir/third_party/catapult/devil/devil/android/device_utils.py", line 1704, in PullFile self.adb.Pull(device_path, host_path) File "/b/swarming/w/ir/third_party/catapult/devil/devil/android/sdk/adb_wrapper.py", line 458, in Pull self._RunDeviceAdbCmd(cmd, timeout, retries) File "/b/swarming/w/ir/third_party/catapult/devil/devil/android/sdk/adb_wrapper.py", line 286, in _RunDeviceAdbCmd check_error=check_error) File "/b/swarming/w/ir/third_party/catapult/devil/devil/android/decorators.py", line 51, in timeout_retry_wrapper return impl() File "/b/swarming/w/ir/third_party/catapult/devil/devil/android/decorators.py", line 47, in impl return f(*args, **kwargs) File "/b/swarming/w/ir/third_party/catapult/devil/devil/android/sdk/adb_wrapper.py", line 266, in _RunAdbCmd args, output, status, device_serial) AdbCommandFailedError: (device: 0384884f0ae5848c) adb pull /storage/emulated/legacy/temp_file-b71e40fa1846.json /b/swarming/w/itfg4qKF/tmpTm5jMG/list_tests.json: failed with exit status 1 and output: - adb: error: remote object '/storage/emulated/legacy/temp_file-b71e40fa1846.json' does not exist Logcat: Device(0384884f0ae5848c) 08-09 15:38:42.679 5651 5651 I MonitoringInstrumentation: Instrumentation Started! Device(0384884f0ae5848c) 08-09 15:38:42.679 5651 5651 I MonitoringInstrumentation: Setting context classloader to 'dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/org.chromium.chrome.tests-1.apk", zip file "/data/data/org.chromium.chrome/code_cache/test-multidex/code_cache/secondary-dexes/org.chromium.chrome.tests-1.apk.classes2.zip", zip file "/data/app/org.chromium.chrome-1.apk"],nativeLibraryDirectories=[/data/app-lib/org.chromium.chrome.tests-1, /data/app-lib/org.chromium.chrome-1, /vendor/lib, /system/lib]]]', Original: 'dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/org.chromium.chrome.tests-1.apk", zip file "/data/data/org.chromium.chrome/code_cache/test-multidex/code_cache/secondary-dexes/org.chromium.chrome.tests-1.apk.classes2.zip", zip file "/data/app/org.chromium.chrome-1.apk"],nativeLibraryDirectories=[/data/app-lib/org.chromium.chrome.tests-1, /data/app-lib/org.chromium.chrome-1, /vendor/lib, /system/lib]]]' Device(0384884f0ae5848c) 08-09 15:38:42.679 5651 5651 I MonitoringInstrumentation: No JSBridge. .... Device(0384884f0ae5848c) 08-09 15:38:47.449 5651 5669 I TestRunner: started: testPlayMp3(org.chromium.chrome.browser.AudioTest) Device(0384884f0ae5848c) 08-09 15:38:47.449 5651 5651 I MonitoringInstrumentation: Activities that are still in CREATED to STOPPED: 0 Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5669 I TestRunner: finished: testPlayMp3(org.chromium.chrome.browser.AudioTest) Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5651 I MonitoringInstrumentation: Activities that are still in CREATED to STOPPED: 0 Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5669 I TestRunner: started: testDefaultNoLaunch(org.chromium.chrome.browser.BackgroundSyncLauncherTest) Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5651 I MonitoringInstrumentation: Activities that are still in CREATED to STOPPED: 0 Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5669 I TestRunner: finished: testDefaultNoLaunch(org.chromium.chrome.browser.BackgroundSyncLauncherTest) Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5651 I MonitoringInstrumentation: Activities that are still in CREATED to STOPPED: 0 Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5669 I TestRunner: started: testHasInstance(org.chromium.chrome.browser.BackgroundSyncLauncherTest) Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5651 I MonitoringInstrumentation: Activities that are still in CREATED to STOPPED: 0 Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5669 I TestRunner: finished: testHasInstance(org.chromium.chrome.browser.BackgroundSyncLauncherTest) Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5651 I MonitoringInstrumentation: Activities that are still in CREATED to STOPPED: 0 Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5669 I TestRunner: started: testSetLaunchWhenNextOnline(org.chromium.chrome.browser.BackgroundSyncLauncherTest) Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5651 I MonitoringInstrumentation: Activities that are still in CREATED to STOPPED: 0 Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5669 I TestRunner: finished: testSetLaunchWhenNextOnline(org.chromium.chrome.browser.BackgroundSyncLauncherTest) Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5651 I MonitoringInstrumentation: Activities that are still in CREATED to STOPPED: 0 Device(0384884f0ae5848c) 08-09 15:38:47.459 5651 5669 I TestRunner: started: testNewLauncherDisablesNextOnline(org.chromium.chrome.browser.BackgroundSyncLauncherTest) Device(0384884f0ae5848c) 08-09 15:38:47.469 5651 5651 I MonitoringInstrumentation: Activities that are still in CREATED to STOPPED: 0 Device(0384884f0ae5848c) 08-09 15:38:47.469 5651 5669 I TestRunner: finished: ....
,
Aug 11 2017
Issue 754772 has been merged into this issue.
,
Aug 11 2017
,
Aug 11 2017
,
Aug 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f047e609aef253079caeb04468324e13008524b7 commit f047e609aef253079caeb04468324e13008524b7 Author: Yoland Yan <yolandyan@chromium.org> Date: Mon Aug 14 04:45:52 2017 Add logging to instrumentation test listing through device This CL helps to provide more info when instrumentation test listing fails to provide java test information BUG: 754015 Change-Id: I80d6982a22e795dee76f0f395f11d74c6cae56d9 Reviewed-on: https://chromium-review.googlesource.com/609315 Commit-Queue: Yoland Yan <yolandyan@chromium.org> Reviewed-by: John Budorick <jbudorick@chromium.org> Cr-Commit-Position: refs/heads/master@{#494010} [modify] https://crrev.com/f047e609aef253079caeb04468324e13008524b7/base/test/android/javatests/src/org/chromium/base/test/BaseChromiumAndroidJUnitRunner.java [modify] https://crrev.com/f047e609aef253079caeb04468324e13008524b7/build/android/pylib/local/device/local_device_instrumentation_test_run.py
,
Nov 14
Issue 905230 has been merged into this issue.
,
Nov 14
,
Nov 20
Archiving old issue. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by yolandyan@chromium.org
, Aug 9 2017