summaryrefslogtreecommitdiff
path: root/yarn
diff options
context:
space:
mode:
Diffstat (limited to 'yarn')
-rwxr-xr-xyarn11
1 files changed, 6 insertions, 5 deletions
diff --git a/yarn b/yarn
index f29c72d..bcd22d3 100755
--- a/yarn
+++ b/yarn
@@ -474,11 +474,12 @@ class YarnRunner(cliapp.Application):
return os.path.join(sd, base)
def snapshot_datadir(self, tempdir, datadir, scenario, step_number, step):
- snapshot = self.snapshot_dir(tempdir, scenario, step, step_number)
- exit, out, err = cliapp.runcmd_unchecked(
- ['cp', '-ax', datadir, snapshot])
- if exit != 0:
- logging.warning('Snapshot copy failed:\n%s\n%s' % (out, err))
+ if self.settings['snapshot']:
+ snapshot = self.snapshot_dir(tempdir, scenario, step, step_number)
+ exit, out, err = cliapp.runcmd_unchecked(
+ ['cp', '-ax', datadir, snapshot])
+ if exit != 0:
+ logging.warning('Snapshot copy failed:\n%s\n%s' % (out, err))
def nice(self, name):
# Quote a scenario or step name so it forms a nice filename.