diff options
author | Thibault Saunier <thibault.saunier@collabora.com> | 2012-06-27 11:07:28 -0400 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@collabora.com> | 2012-06-27 12:26:52 -0400 |
commit | 9086ea69324212dad8af9f52d92477c221b65dbb (patch) | |
tree | 73380b87e05fe62a92fe515cfc9c9b47c8c4661f | |
parent | 9c91299048eaaf39abb020649627d3fc44f751dc (diff) |
insanity: Generate only one outputfile by default in TerminalRedirectionMonitor
We used to generate an ouptut file per iteration of start/stop by default, and
didn't let user the choice
-rw-r--r-- | insanity/monitor.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/insanity/monitor.py b/insanity/monitor.py index 788b92d..495b352 100644 --- a/insanity/monitor.py +++ b/insanity/monitor.py @@ -507,7 +507,8 @@ class TerminalRedirectionMonitor(Monitor): " output file", "outputfile-basename":"The category of outputfiles (default='')", "category":"The category of outputfiles (default='insanity-output')", - "compress-outputfiles":"Whether the resulting output should be compressed (default:True)" + "compress-outputfiles":"Whether the resulting output should be compressed (default:True)", + "one-file-per-iteration":"Whether it outputs one file per iteration of start/stop or not (default: False)" } __monitor_output_files__ = { "global-stdout-and-stderr-file":"File with both stderr and stdout used between" @@ -592,11 +593,17 @@ class TerminalRedirectionMonitor(Monitor): return files, paths def start(self, iteration): + if not self.arguments.get("one-file-per-iteration", False): + return + Monitor.start(self, iteration) self._it_files, self._it_paths = self._start() return True def stop(self): + if not self.arguments.get("one-file-per-iteration", False): + return + Monitor.stop(self) for f in self._it_files: os.close(f) @@ -610,7 +617,7 @@ class TerminalRedirectionMonitor(Monitor): the file will land when compressed. """ res = path - if self.arguments.get("compress", True): + if self.arguments.get("compress-outputfiles", True): if not res.endswith(".gz"): res = path + ".gz" |