Skip to content

Commit

Permalink
python/test: update to new tmpdir scheme
Browse files Browse the repository at this point in the history
FLUX_TMPDIR has been removed, this commit removes references to it from
sideflux and repairs behavior of FLUX_URI.
  • Loading branch information
trws authored and garlick committed Sep 1, 2015
1 parent 8ec80b9 commit e8bab97
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/bindings/python/test_commands/sideflux.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,15 @@ def __init__(self, size=1):
global flux_exe
self.size = size
self.tmpdir = tempfile.mkdtemp(prefix='flux-sandbox-')
self.flux_tmpdir = os.path.join(self.tmpdir, 'flux-sideflux-0')
self.flux_uri = 'local://' + self.flux_tmpdir
os.makedirs(self.flux_tmpdir)
self.flux_uri = 'local://' + self.tmpdir + '/0'
self.cleaned = False

def start(self):
flux_command = [flux_exe, 'start', '--size={}'.format(self.size), '-o',
'-L,stderr,--sid,sideflux', 'bash']
'-L,stderr,--socket-directory,' + self.tmpdir , 'bash']
# print ' '.join(flux_command)
FNULL = open(os.devnull, 'w+')
self.subenv = os.environ.copy()
self.subenv.pop('FLUX_TMPDIR', None)
self.subenv.pop('FLUX_URI', None)
self.subenv['TMPDIR'] = self.tmpdir
self.sub = subprocess.Popen(
Expand All @@ -72,7 +69,6 @@ def start(self):
print('echo READY', file=self.sub.stdin)

self.env_items = {}
# self.env_items['FLUX_TMPDIR'] = self.flux_tmpdir
self.env_items['FLUX_URI'] = self.flux_uri

while True:
Expand Down

0 comments on commit e8bab97

Please sign in to comment.