summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authoriancottrell@chromium.org <iancottrell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-21 13:57:12 +0000
committeriancottrell@chromium.org <iancottrell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-21 13:57:12 +0000
commit887e650ce5ba43be7201dbec39d3403e09fb831d (patch)
tree6ea9192cce6b3ec5755a1471741982118b6a0489 /tools
parentdbd6061a257021e66145233285bf5390c0be2655 (diff)
downloadchromium_src-887e650ce5ba43be7201dbec39d3403e09fb831d.zip
chromium_src-887e650ce5ba43be7201dbec39d3403e09fb831d.tar.gz
chromium_src-887e650ce5ba43be7201dbec39d3403e09fb831d.tar.bz2
Adding linux support to cr.
BUG=316397 Review URL: https://codereview.chromium.org/79203002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236525 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r--tools/cr/cr/base/linux.py44
1 files changed, 44 insertions, 0 deletions
diff --git a/tools/cr/cr/base/linux.py b/tools/cr/cr/base/linux.py
new file mode 100644
index 0000000..407c48e
--- /dev/null
+++ b/tools/cr/cr/base/linux.py
@@ -0,0 +1,44 @@
+# Copyright 2013 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.
+
+"""The linux specific host and platform implementation module."""
+
+import os
+
+import cr
+
+
+class LinuxHost(cr.Host):
+ """The implementation of Host for linux."""
+
+ ACTIVE = cr.Config.From(
+ GOOGLE_CODE='/usr/local/google/code',
+ )
+
+ def __init__(self):
+ super(LinuxHost, self).__init__()
+
+ def Matches(self):
+ return cr.Platform.System() == 'Linux'
+
+
+class LinuxPlatform(cr.Platform):
+ """The implementation of Platform for the linux target."""
+
+ ACTIVE = cr.Config.From(
+ CR_BINARY=os.path.join('{CR_BUILD_DIR}', '{CR_BUILD_TARGET}'),
+ CHROME_DEVEL_SANDBOX='/usr/local/sbin/chrome-devel-sandbox',
+ )
+
+ @property
+ def enabled(self):
+ return cr.Platform.System() == 'Linux'
+
+ @property
+ def priority(self):
+ return 2
+
+ @property
+ def paths(self):
+ return ['{GOMA_DIR}']