Skip to content

Commit

Permalink
Add dedicated cros bootstrap_deps.
Browse files Browse the repository at this point in the history
This will allow autotest via chromeos-base/chromeos-chrome to bootstrap
telemetry perf and gpu tests.

Also fix gpu_tests/bootstrap_deps as currently the paths are wrong.

BUG=chromium:341333
TEST=Ran "./run_measurement --print-bootstrap-deps-cros" and checked output.

Review URL: https://codereview.chromium.org/166483010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252527 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
ihf@chromium.org committed Feb 21, 2014
1 parent 4678ae5 commit 4820901
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
11 changes: 7 additions & 4 deletions content/test/gpu/gpu_tests/bootstrap_deps
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ deps = {
"https://src.chromium.org/chrome/trunk/src/content/test/gpu/gpu_tests",
"src/content/test/gpu/page_sets":
"https://src.chromium.org/chrome/trunk/src/content/test/gpu/page_sets",
"src/third_party/webgl_conformance":
"https://src.chromium.org/chrome/trunk/deps/third_party/webgl/sdk/tests",
# TODO(ihf): Figure out a different way to specify this dependency. This
# directory needs to be checked out with the instructions provided by
# https://src.chromium.org/chrome/trunk/src/third_party/webgl/README.chromium
"src/third_party/webgl/src/sdk/tests":
"",
}

# gpu_tests depends on Telemetry, so pull in the Telemetry deps, too.
deps_includes = {
"src/tools/telemetry/tools/bootstrap_deps":
"https://src.chromium.org/chrome/trunk/src/tools/telemetry/tools/bootstrap_deps",
"src/tools/telemetry_tools/bootstrap_deps":
"https://src.chromium.org/chrome/trunk/src/tools/telemetry_tools/bootstrap_deps",
}
21 changes: 21 additions & 0 deletions tools/cros/bootstrap_deps
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This file specifies dependencies required to bootstrap tools/perf. It is in a
# minimal version of the format used by other DEPS files that gclient can read,
# but it should only be used to bootstrap tools/perf *outside* of a normal
# Chrome checkout.

deps = {
"src/tools/cros/":
"https://src.chromium.org/chrome/trunk/src/tools/cros/",
}

# both gpu_tests and perf will pull in telemetry.
deps_includes = {
"src/content/test/gpu/gpu_tests/bootstrap_deps":
"https://src.chromium.org/chrome/trunk/src/content/test/gpu/gpu_tests/bootstrap_deps",
"src/tools/perf/bootstrap_deps":
"https://src.chromium.org/chrome/trunk/src/tools/perf/bootstrap_deps",
}
11 changes: 8 additions & 3 deletions tools/perf/run_measurement
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ CHECKOUT_BASE_PATH = os.path.join(SCRIPT_PATH, os.pardir, os.pardir, os.pardir)
# Directory in which to save bootstrap files.
BOOTSTRAP_BASE_PATH = os.path.join(SCRIPT_PATH, 'support', 'bootstrap_files')

CROS_DIR = os.path.join('src', 'tools', 'cros')
PERF_DIR = os.path.join('src', 'tools', 'perf')
TELEMETRY_DIR = os.path.join('src', 'tools', 'telemetry')
TELEMETRY_TOOLS_DIR = os.path.join('src', 'tools', 'telemetry_tools')
Expand Down Expand Up @@ -61,12 +62,12 @@ def _Bootstrap(bootstrap_deps_url):
bootstrap.DownloadDeps(BOOTSTRAP_BASE_PATH, bootstrap_deps_url)


def ListBootstrapDeps(base_path):
def ListBootstrapDeps(base_path, subdir):
"""List the deps required for telemetry."""
sys.path.append(os.path.join(base_path, TELEMETRY_TOOLS_DIR))
import telemetry_bootstrap

deps_file = os.path.join(base_path, PERF_DIR, DEPS_FILE)
deps_file = os.path.join(base_path, subdir, DEPS_FILE)
return telemetry_bootstrap.ListAllDepsPaths(deps_file)


Expand All @@ -78,8 +79,12 @@ def Main():
new_perf_path = os.path.join(new_base_path, PERF_DIR)
new_telemetry_path = os.path.join(new_base_path, TELEMETRY_DIR)

if '--print-bootstrap-deps-cros' in sys.argv:
print ListBootstrapDeps(new_base_path, CROS_DIR)
return 0

if '--print-bootstrap-deps' in sys.argv:
print ListBootstrapDeps(new_base_path)
print ListBootstrapDeps(new_base_path, PERF_DIR)
return 0

sys.path.append(new_perf_path)
Expand Down

0 comments on commit 4820901

Please sign in to comment.