summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-10-11 15:31:19 +0000
committerRichard Maw <richard.maw@gmail.com>2014-10-11 15:31:19 +0000
commit634a589643e2a8a56feb9c31fba789702387c1b3 (patch)
tree0880124091eea2fc64ad0eea82b2f66baf92bc11
parent48f5dbbf849b22072445ae83b4154ef26fce4ac3 (diff)
downloadcmdtest-634a589643e2a8a56feb9c31fba789702387c1b3.tar.gz
yarn: Don't snapshot datadir without --snapshot
It would previously create the snapshots, then remove them again after all the scenarios have been run. This is unhelpful if you're running tests in a tmpfs, and you've got non-trivial amounts of data in DATADIR.
-rwxr-xr-xyarn5
1 files changed, 3 insertions, 2 deletions
diff --git a/yarn b/yarn
index 923ceb9..15b171c 100755
--- a/yarn
+++ b/yarn
@@ -314,8 +314,9 @@ class YarnRunner(cliapp.Application):
self.indent(stdout), self.indent(stderr)))
self.remember_step_timing(
'%s %s' % (step.what, step.text), stopped - started)
- self.snapshot_datadir(self.tempdir, step_env['DATADIR'],
- scenario, step_number, step)
+ if self.settings['snapshot']:
+ self.snapshot_datadir(self.tempdir, step_env['DATADIR'],
+ scenario, step_number, step)
def scenario_dir(self, tempdir, scenario):
return os.path.join(tempdir, self.nice(scenario.name))