Skip to content

Commit

Permalink
Restore tmp dir after init_config call in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Aug 12, 2021
1 parent 7050b05 commit 77522f3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/framework/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,10 +771,15 @@ def test_compiler_dependent_optarch(self):
optarch_var['Intel'] = intel_flags
optarch_var['GCC'] = gcc_flags
optarch_var['GCCcore'] = gcccore_flags

old_vars = {name: os.environ.get(name) for name in ('TMPDIR', 'TEMP', 'TMP')}

init_config(build_options={'optarch': optarch_var, 'silent': True})
tc = self.get_toolchain(toolchain_name, version=toolchain_ver)
tc.set_options({'optarch': enable})
tc.prepare()

os.environ.update(old_vars)
flags = None
if toolchain_name == 'iccifort':
flags = intel_flags_exp
Expand Down

0 comments on commit 77522f3

Please sign in to comment.