New issue
Advanced search Search tips

Issue 703204 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

tools/android/loading/run_tests is broken

Project Member Reported by perezju@chromium.org, Mar 20 2017

Issue description

Chrome checkout synced at: 3aaf78725a83d3bd67c30ae3e2cf32eb8ba35ac8 (r457638)
Catapult checkout at: 04bd283195375fd3c2ee62b9b08ce9a51276f13c

What steps will reproduce the problem?
(1) cd $SRC/android/tools/loading
(2) ./run_tests

What is the expected result?

All tests pass.

What happens instead?

The following 5 fail:
- sandwich_prefetch_unittest
- chrome_cache_unittest
- trace_test.webserver_unittest
- wpr_backend_unittest
- sandwich_metrics_unittest


All of the errors appear to have the same root, a python stack similar to:

ImportError: Failed to import test module: sandwich_metrics_unittest
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/loader.py", line 254, in _find_tests
    module = self._get_module_from_name(name)
  File "/usr/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name
    __import__(name)
  File "/usr/local/google/code/clankium/src/tools/android/loading/trace_test/../sandwich_metrics_unittest.py", line 15, in <module>
    import sandwich_metrics as puller
  File "/usr/local/google/code/clankium/src/tools/android/loading/trace_test/../sandwich_metrics.py", line 26, in <module>
    from telemetry.internal.image_processing import video
  File "/usr/local/google/code/clankium/src/third_party/catapult/telemetry/telemetry/internal/image_processing/video.py", line 9, in <module>
    from telemetry.core import platform
  File "/usr/local/google/code/clankium/src/third_party/catapult/telemetry/telemetry/core/platform.py", line 14, in <module>
    from telemetry.internal.platform import (platform_backend as
  File "/usr/local/google/code/clankium/src/third_party/catapult/telemetry/telemetry/internal/platform/platform_backend.py", line 11, in <module>
    from telemetry.internal.platform import tracing_controller_backend
  File "/usr/local/google/code/clankium/src/third_party/catapult/telemetry/telemetry/internal/platform/tracing_controller_backend.py", line 23, in <module>
    from tracing.trace_data import trace_data as trace_data_module
ImportError: No module named trace_data


Looks like there is a "tracing.py" in $SRC/tools/android/loading clashing with a "tracing/__init__.py" in $CATAPULT/tracing.

Not sure for how long these tests have been failing, are they run continuously on some bots?

They are failing now for me on presubmit when trying to upload a CL that touches some files in tools/android/loading.
 

Comment 1 by pasko@chromium.org, Mar 20 2017

Cc: -pasko@chromium.org mattcary@chromium.org
Owner: pasko@chromium.org
Status: Assigned (was: Untriaged)
Thanks! Tentative fix: https://codereview.chromium.org/2763733002

What would be the easiest way to make this part of CQ and regular buildbots? I am not up to the tech.
Cc: jbudorick@chromium.org nednguyen@chromium.org
+jbudorick, +nednguyen: any ideas or suggestions of where these tests should run?

Note they appear to be broken initially by a catapult side CL (https://codereview.chromium.org/2736903005).
Cc: -nednguyen@chromium.org nedngu...@google.com
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3dbc3c920c87dec8803e217cc12c8ef286799fab

commit 3dbc3c920c87dec8803e217cc12c8ef286799fab
Author: pasko <pasko@chromium.org>
Date: Tue Mar 21 10:59:12 2017

tools/android/loading: rename tracing to tracing_track

There is a "tracing.py" in $SRC/tools/android/loading clashing with a
"tracing/__init__.py" in $CATAPULT/tracing, which makes
android/tools/loading/run_tests FAIL.

Probable cause: https://codereview.chromium.org/2736903005

This was not caught on CQ/bots because the tests are not run
continuously (perhaps they should).

This renaming makes the tests pass.

Note: LoadingTrace objects have the property 'tracing_track' and also
serialization/de-serialization of these objects uses 'tracing_track' as
one of the keys in the dict. The name is not clashing with the module
name and sounds like a good name for what it is doing, hence they should
probably be left unchanged.

BUG= 703204 

Review-Url: https://codereview.chromium.org/2763733002
Cr-Commit-Position: refs/heads/master@{#458368}

[modify] https://crrev.com/3dbc3c920c87dec8803e217cc12c8ef286799fab/tools/android/loading/activity_lens_unittest.py
[modify] https://crrev.com/3dbc3c920c87dec8803e217cc12c8ef286799fab/tools/android/loading/loading_trace.py
[modify] https://crrev.com/3dbc3c920c87dec8803e217cc12c8ef286799fab/tools/android/loading/sandwich_metrics.py
[modify] https://crrev.com/3dbc3c920c87dec8803e217cc12c8ef286799fab/tools/android/loading/sandwich_metrics_unittest.py
[modify] https://crrev.com/3dbc3c920c87dec8803e217cc12c8ef286799fab/tools/android/loading/test_utils.py
[rename] https://crrev.com/3dbc3c920c87dec8803e217cc12c8ef286799fab/tools/android/loading/tracing_track.py
[rename] https://crrev.com/3dbc3c920c87dec8803e217cc12c8ef286799fab/tools/android/loading/tracing_track_unittest.py

Comment 5 by pasko@chromium.org, Mar 21 2017

Status: Fixed (was: Assigned)

Sign in to add a comment