Skip to content

Commit

Permalink
allow environment passed in to make_all so they can be set in run_tes…
Browse files Browse the repository at this point in the history
…ts.py
  • Loading branch information
Randy LeVeque committed Feb 19, 2014
1 parent fd343fe commit ecf612d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/python/clawutil/make_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@ def list_examples(examples_dir):
return dirlist


def make_all(examples_dir = '.',make_clean_first=False):
def make_all(examples_dir = '.',make_clean_first=False, env=None):
import os,sys

if env is None:
my_env = os.environ
else:
my_env = env

examples_dir = os.path.abspath(examples_dir)
if not os.path.isdir(examples_dir):
raise Exception("Directory not found: %s" % examples_dir)
Expand Down Expand Up @@ -103,7 +108,7 @@ def make_all(examples_dir = '.',make_clean_first=False):

# Run 'make all':
job = subprocess.Popen(['make','all'], \
stdout=fout,stderr=ferr)
stdout=fout,stderr=ferr,env=my_env)
return_code = job.wait()

if return_code == 0:
Expand Down

0 comments on commit ecf612d

Please sign in to comment.