diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-11-26 16:02:48 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-11-26 16:02:48 -0500 |
commit | cb8db5d30ee769304c2c2b00f2a7d9bcb3c4098f (patch) | |
tree | c5352d84285af565d5246c3eb861ffba709761f1 /experiment/executable | |
parent | 41c867480f1e20bd3b168258ed71450499ea6ccf (diff) |
Removed 2-step parse for scheduling statistics.
Diffstat (limited to 'experiment/executable')
-rw-r--r-- | experiment/executable/executable.py | 10 | ||||
-rw-r--r-- | experiment/executable/ftcat.py | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/experiment/executable/executable.py b/experiment/executable/executable.py index b964699..628f711 100644 --- a/experiment/executable/executable.py +++ b/experiment/executable/executable.py | |||
@@ -4,7 +4,7 @@ import signal | |||
4 | from ..litmus_util import is_executable | 4 | from ..litmus_util import is_executable |
5 | 5 | ||
6 | class Executable(object): | 6 | class Executable(object): |
7 | """Parent object that represents an executable for use in task-sets.""" | 7 | '''Parent object that represents an executable for use in task-sets.''' |
8 | 8 | ||
9 | def __init__(self, exec_file, extra_args=None, stdout_file = None, stderr_file = None): | 9 | def __init__(self, exec_file, extra_args=None, stdout_file = None, stderr_file = None): |
10 | self.exec_file = exec_file | 10 | self.exec_file = exec_file |
@@ -47,7 +47,7 @@ class Executable(object): | |||
47 | return " ".join(self.__get_full_command()) | 47 | return " ".join(self.__get_full_command()) |
48 | 48 | ||
49 | def execute(self): | 49 | def execute(self): |
50 | """Execute the binary.""" | 50 | '''Execute the binary.''' |
51 | full_command = self.__get_full_command() | 51 | full_command = self.__get_full_command() |
52 | self.sp = subprocess.Popen(full_command, stdout=self.stdout_file, | 52 | self.sp = subprocess.Popen(full_command, stdout=self.stdout_file, |
53 | stderr=self.stderr_file, cwd=self.cwd) | 53 | stderr=self.stderr_file, cwd=self.cwd) |
@@ -59,15 +59,15 @@ class Executable(object): | |||
59 | self.sp.send_signal(signal.SIGINT) | 59 | self.sp.send_signal(signal.SIGINT) |
60 | 60 | ||
61 | def terminate(self): | 61 | def terminate(self): |
62 | """Send the terminate signal to the binary.""" | 62 | '''Send the terminate signal to the binary.''' |
63 | self.sp.terminate() | 63 | self.sp.terminate() |
64 | 64 | ||
65 | def wait(self): | 65 | def wait(self): |
66 | """Wait until the executable is finished, checking return code. | 66 | '''Wait until the executable is finished, checking return code. |
67 | 67 | ||
68 | If the exit status is non-zero, raise an exception. | 68 | If the exit status is non-zero, raise an exception. |
69 | 69 | ||
70 | """ | 70 | ''' |
71 | 71 | ||
72 | self.sp.wait() | 72 | self.sp.wait() |
73 | if self.sp.returncode != 0: | 73 | if self.sp.returncode != 0: |
diff --git a/experiment/executable/ftcat.py b/experiment/executable/ftcat.py index 9966312..5da8fa7 100644 --- a/experiment/executable/ftcat.py +++ b/experiment/executable/ftcat.py | |||
@@ -4,10 +4,10 @@ import stat | |||
4 | from executable import Executable | 4 | from executable import Executable |
5 | 5 | ||
6 | class FTcat(Executable): | 6 | class FTcat(Executable): |
7 | """Used to wrap the ftcat binary in the Experiment object.""" | 7 | '''Used to wrap the ftcat binary in the Experiment object.''' |
8 | 8 | ||
9 | def __init__(self, ft_cat_bin, stdout_file, stderr_file, dev, events, cpu=None): | 9 | def __init__(self, ft_cat_bin, stdout_file, stderr_file, dev, events, cpu=None): |
10 | """Extends the Executable initializer method with ftcat attributes.""" | 10 | '''Extends the Executable initializer method with ftcat attributes.''' |
11 | 11 | ||
12 | # hack to run FTCat at higher priority | 12 | # hack to run FTCat at higher priority |
13 | chrt_bin = '/usr/bin/chrt' | 13 | chrt_bin = '/usr/bin/chrt' |