Skip to content

Commit

Permalink
minot test update
Browse files Browse the repository at this point in the history
  • Loading branch information
scopatz committed May 29, 2014
1 parent ff121c1 commit 09cb48e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/tools.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from __future__ import print_function

import os
Expand Down Expand Up @@ -36,8 +35,10 @@ def check_cmd(args, cwd, holdsrtn):
if not isinstance(args, basestring):
args = " ".join(args)
print("TESTING: running command in {0}:\n\n{1}\n".format(cwd, args))
env = dict(os.environ)
env['_'] = subprocess.check_output(['which', 'cyclus'], cwd=cwd).strip()
f = tempfile.NamedTemporaryFile()
rtn = subprocess.call(args, shell=True, cwd=cwd, stdout=f, stderr=f)
rtn = subprocess.call(args, shell=True, cwd=cwd, stdout=f, stderr=f, env=env)
if rtn != 0:
f.seek(0)
print("STDOUT + STDERR:\n\n" + f.read().decode())
Expand Down

0 comments on commit 09cb48e

Please sign in to comment.