# HG changeset patch # User Nicolas Dumazet # Date 1250338797 -32400 # Node ID 31203db1b2ac94ab1ce239d94bdf130b4f637340 # Parent 23c4e772c1720fab3d245a21f67574c7353e5cc6 run-tests: expand --tmpdir and create it if needed diff -r 23c4e772c172 -r 31203db1b2ac tests/run-tests.py --- a/tests/run-tests.py Sun Aug 23 14:32:58 2009 +0200 +++ b/tests/run-tests.py Sat Aug 15 21:19:57 2009 +0900 @@ -167,6 +167,14 @@ else: vlog = lambda *msg: None + if options.tmpdir: + options.tmpdir = os.path.expanduser(options.tmpdir) + try: + os.makedirs(options.tmpdir) + except OSError, err: + if err.errno != errno.EEXIST: + raise + if options.jobs < 1: print >> sys.stderr, 'ERROR: -j/--jobs must be positive' sys.exit(1)