summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-11-06 11:12:18 +0000
committerLars Wirzenius <liw@liw.fi>2015-11-06 11:12:18 +0000
commit1d5f504a912fc3d26bde5c493460909bd2f8784a (patch)
tree718b906870f5c46c50b98b756ae89d54923cc411
parent24ce64cd546670841dfbef3cae038aca25900f40 (diff)
downloadcmdtest-1d5f504a912fc3d26bde5c493460909bd2f8784a.tar.gz
Do snapshots only when --snapshot is used
-rw-r--r--NEWS2
-rwxr-xr-xyarn11
2 files changed, 8 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index d0e626f..1955459 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,8 @@ Version 0.18, released UNRELEASED
* Code blocks that are examples are now supported.
+* Snapshot directories are now created only when `--snapshot` is used.
+
Version 0.17, released 2015-09-21
---------------------------------
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.