Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: tools/telemetry/catapult_base/bin/run_tests

Issue 1620023002: Revert of Remove catapult_base from telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@perf_cb_move
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/catapult_base/__init__.py ('k') | tools/telemetry/catapult_base/cloud_storage.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/catapult_base/bin/run_tests
diff --git a/tools/telemetry/catapult_base/bin/run_tests b/tools/telemetry/catapult_base/bin/run_tests
new file mode 100755
index 0000000000000000000000000000000000000000..56fcbfa551da31aeaf4f081b0ba1e1868dcc341e
--- /dev/null
+++ b/tools/telemetry/catapult_base/bin/run_tests
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+# Copyright (c) 2015 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.
+
+import os
+import sys
+
+_CATAPULT_BASE_PATH = os.path.abspath(
+ os.path.join(os.path.dirname(__file__), '..'))
+_TELEMETRY_BASE_PATH = os.path.abspath(os.path.join(_CATAPULT_BASE_PATH, '..'))
+_CATAPULT_PATH = os.path.abspath(os.path.join(
+ _CATAPULT_BASE_PATH, '..', '..', '..', 'third_party', 'catapult'))
+
+
+def _RunTestsOrDie(top_level_dir):
+ exit_code = run_with_typ.Run(top_level_dir, path=[_TELEMETRY_BASE_PATH])
+ if exit_code:
+ sys.exit(exit_code)
+
+
+def _AddToPathIfNeeded(path):
+ if path not in sys.path:
+ sys.path.insert(0, path)
+
+
+if __name__ == '__main__':
+ _AddToPathIfNeeded(_CATAPULT_PATH)
+
+ from hooks import install
+ if '--no-install-hooks' in sys.argv:
+ sys.argv.remove('--no-install-hooks')
+ else:
+ install.InstallHooks()
+
+ from catapult_build import run_with_typ
+ _RunTestsOrDie(_CATAPULT_BASE_PATH)
+ sys.exit(0)
« no previous file with comments | « tools/telemetry/catapult_base/__init__.py ('k') | tools/telemetry/catapult_base/cloud_storage.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698