summaryrefslogtreecommitdiffstats
path: root/tools/cr
diff options
context:
space:
mode:
authoriancottrell@chromium.org <iancottrell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-03 00:55:25 +0000
committeriancottrell@chromium.org <iancottrell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-03 00:55:25 +0000
commit0f2ddbcf9342b621738d56f34e4d9dba86483bb2 (patch)
treee6532db2e94073f17b9923bf473ee5425836a4ee /tools/cr
parent3e817f997bd7aacf26147a66264483b7366ba8c3 (diff)
downloadchromium_src-0f2ddbcf9342b621738d56f34e4d9dba86483bb2.zip
chromium_src-0f2ddbcf9342b621738d56f34e4d9dba86483bb2.tar.gz
chromium_src-0f2ddbcf9342b621738d56f34e4d9dba86483bb2.tar.bz2
[cr tool] Adding the linux action support (install and run)
BUG=316397 Review URL: https://codereview.chromium.org/99263004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238257 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/cr')
-rw-r--r--tools/cr/cr/actions/linux.py50
1 files changed, 50 insertions, 0 deletions
diff --git a/tools/cr/cr/actions/linux.py b/tools/cr/cr/actions/linux.py
new file mode 100644
index 0000000..1a47c84
--- /dev/null
+++ b/tools/cr/cr/actions/linux.py
@@ -0,0 +1,50 @@
+# 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.
+
+"""A module to hold linux specific action implementations."""
+
+import cr
+
+
+class LinuxRunner(cr.Runner):
+ """An implementation of cr.Runner for the linux platform.
+
+ This supports directly executing the binaries from the output directory.
+ """
+
+ @property
+ def enabled(self):
+ return cr.LinuxPlatform.GetInstance().is_active
+
+ def Kill(self, context, targets, arguments):
+ # TODO(iancottrell): Think about how to implement this, or even if we should
+ print '**WARNING** Kill not yet implemented on linux'
+
+ def Run(self, context, target, arguments):
+ cr.Host.Execute(target, ['{CR_BINARY}', '{CR_RUN_ARGUMENTS}'] + arguments)
+
+ def Test(self, context, target, arguments):
+ self.Run(context, target, arguments)
+
+
+class LinuxInstaller(cr.Installer):
+ """An implementation of cr.Installer for the linux platform.
+
+ This does nothing, the linux runner works from the output directory, there
+ is no need to install anywhere.
+ """
+
+ @property
+ def enabled(self):
+ return cr.LinuxPlatform.GetInstance().is_active
+
+ def Uninstall(self, context, targets, arguments):
+ pass
+
+ def Install(self, context, targets, arguments):
+ pass
+
+ def Reinstall(self, context, targets, arguments):
+ pass
+