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

Side by Side Diff: tools/telemetry/catapult_base/util.py

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 unified diff | Download patch
« no previous file with comments | « tools/telemetry/catapult_base/test_data/foo.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4 import os
5 import sys
6
7
8 def GetCatapultDir():
9 return os.path.normpath(os.path.join(
10 os.path.dirname(__file__), '..', '..', '..', 'third_party', 'catapult'))
11
12
13 def IsRunningOnCrosDevice():
14 """Returns True if we're on a ChromeOS device."""
15 lsb_release = '/etc/lsb-release'
16 if sys.platform.startswith('linux') and os.path.exists(lsb_release):
17 with open(lsb_release, 'r') as f:
18 res = f.read()
19 if res.count('CHROMEOS_RELEASE_NAME'):
20 return True
21 return False
22
23
24 def IsExecutable(path):
25 return os.path.isfile(path) and os.access(path, os.X_OK)
OLDNEW
« no previous file with comments | « tools/telemetry/catapult_base/test_data/foo.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698