diff options
-rw-r--r-- | NEWS | 3 | ||||
-rwxr-xr-x | obbench | 9 |
2 files changed, 12 insertions, 0 deletions
@@ -4,6 +4,9 @@ NEWS file for obbench Version 0.15+git, not yet released ---------------------------------- +* Obbench now has the option `--tmpdir` to allow setting the location + of temporary directories. The `TMPDIR` environment variable is used, + if the option isn't (with a fallback to `/tmp` if neither is used). Version 0.15, released 2016-03-16 ---------------------------------- @@ -18,6 +18,7 @@ import os +import tempfile import cliapp import ttystatus @@ -35,11 +36,19 @@ class ObnamBenchmarker(cliapp.Application): metavar='DIR', default='.') self.settings.string( + ['tmpdir'], + 'use DIR for temporary files', + metavar='DIR', + default=tempfile.gettempdir()) + self.settings.string( ['publish-command'], 'after a successful run, run COMMAND', metavar='COMMAND') def process_args(self, args): + if self.settings['tmpdir']: + tempfile.tempdir = self.settings['tmpdir'] + spec = self.read_benchmark_spec(args[0]) statedir = self.create_state_directory() self.clone_or_update_git(statedir, spec) |