New issue
Advanced search Search tips

Issue 839134 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug

Blocking:
issue 799950



Sign in to add a comment

run_telemetry_tests --browser parameter is disregarded if an Android device is attached to the machine

Project Member Reported by nasko@chromium.org, May 2 2018

Issue description

If I have an Android device attached to my development machine, the --browser parameter to run_telemetry_tests is ignored:

~/chromium/src$ adb devices
List of devices attached
05851810        device

~/chromium/src$ ./tools/perf/run_telemetry_tests --browser=list                                                                                            
CRITICAL:root:(TimeoutThread-1-for-MainThread) Exception on EnableRoot(05851810, retries=3, timeout=30), attempt 1 of 4: CommandFailedError('(device: 05851810) Unable to root device with user build.',)
CRITICAL:root:(TimeoutThread-2-for-MainThread) Exception on EnableRoot(05851810, retries=3, timeout=30), attempt 2 of 4: CommandFailedError('(device: 05851810) Unable to root device with user build.',)
CRITICAL:root:(TimeoutThread-3-for-MainThread) Exception on EnableRoot(05851810, retries=3, timeout=30), attempt 3 of 4: CommandFailedError('(device: 05851810) Unable to root device with user build.',)
WARNING:root:Unable to root 05851810                                                                                                                                    
ERROR:root:Fail to create platform instance for Android device 05851810.                                                                                                
                                                                                                                                                                        
Traceback (most recent call last):
  <module> at /usr/local/google/home/nasko/chromium/src/third_party/catapult/telemetry/telemetry/testing/run_tests.py:300
    ret_code = RunTestsCommand.main()
  main at /usr/local/google/home/nasko/chromium/src/third_party/catapult/telemetry/telemetry/testing/run_tests.py:112
    options, positional_args = parser.parse_args(args)
  ParseArgs at /usr/local/google/home/nasko/chromium/src/third_party/catapult/telemetry/telemetry/internal/browser/browser_options.py:216
    device)
  Cacher at /usr/local/google/home/nasko/chromium/src/third_party/catapult/telemetry/telemetry/decorators.py:35
    cacher.__cache[key] = obj(*args, **kwargs)
  GetAllAvailableBrowsers at /usr/local/google/home/nasko/chromium/src/third_party/catapult/telemetry/telemetry/internal/browser/browser_finder.py:148
    browser_finder.FindAllAvailableBrowsers(options, device))
  FindAllAvailableBrowsers at /usr/local/google/home/nasko/chromium/src/third_party/catapult/telemetry/telemetry/internal/backends/chrome/android_browser_finder.py:348
    android_platform = platform.GetPlatformForDevice(device, finder_options)
  GetPlatformForDevice at /usr/local/google/home/nasko/chromium/src/third_party/catapult/telemetry/telemetry/core/platform.py:63
    finder_options))
  CreatePlatformForDevice at /usr/local/google/home/nasko/chromium/src/third_party/catapult/telemetry/telemetry/internal/platform/android_platform_backend.py:118
    platform_backend = AndroidPlatformBackend(device)
  __init__ at /usr/local/google/home/nasko/chromium/src/third_party/catapult/telemetry/telemetry/internal/platform/android_platform_backend.py:81
    'Android device must be rooted to run Telemetry')
AssertionError: Android device must be rooted to run Telemetry

Locals:
  device : <telemetry.internal.platform.android_device.AndroidDevice object at 0x7fc617231510>

**Non zero exit code**
If you don't see any error stack, this could have been a native crash. Consider installing faulthandler (https://faulthandler.readthedocs.io/) for more useful error message

--- disconnect device

~/chromium/src$ adb devices                                                                                                                                
List of devices attached                                                                                                                                                
                                                                                                                                                                        
~/chromium/src$ ./tools/perf/run_telemetry_tests --browser=list                                                                                            
WARNING:root:Chrome build location for linux_x86_64 not found. Browser will be run without Flash.                                                                       
Available browsers:                                                                                                                                                     
   desktop
     beta
     content-shell-release
     dev
     release
     stable
     system


In addition, if a device is connected, one cannot run the telemetry tests against an actually build browser on the local machine, as the presence of a device still ignores the --browser=exact --browser-executable=/path/to/chrome parameters. This makes it impossible to run these tests unless one is physically present at the machine to connect and disconnect the device.

It will be great if these commands work more intuitively and specifying an exact browser to use does not get ignored.
 
Cc: perezju@chromium.org sullivan@chromium.org
Owner: ----
Labels: Hotlist-GoodFirstBug
Blocking: 799950
Not sure if this should block or be blocked-by, but whatever the solution is here, it should keep in mind the broader picture of fixing --browser selection in general from issue 799950.

Comment 4 by benhenry@google.com, Jan 16 (6 days ago)

Components: Test>Telemetry

Comment 5 by benhenry@google.com, Jan 16 (6 days ago)

Components: -Tests>Telemetry

Sign in to add a comment