run_project_tests: Use the test environment for install and clean

This commit is contained in:
Jason Ekstrand 2020-06-26 10:52:51 -05:00 committed by Dylan Baker
parent ea416591a9
commit 9dab27f814
1 changed files with 2 additions and 2 deletions

View File

@ -619,7 +619,7 @@ def _run_test(test: TestDef, test_build_dir: str, install_dir: str, extra_args,
# Do installation, if the backend supports it
if install_commands:
env = os.environ.copy()
env = test.env.copy()
env['DESTDIR'] = install_dir
# Install with subprocess
pi, o, e = Popen_safe(install_commands, cwd=test_build_dir, env=env)
@ -629,7 +629,7 @@ def _run_test(test: TestDef, test_build_dir: str, install_dir: str, extra_args,
return testresult
# Clean with subprocess
env = os.environ.copy()
env = test.env.copy()
pi, o, e = Popen_safe(clean_commands + dir_args, cwd=test_build_dir, env=env)
testresult.add_step(BuildStep.clean, o, e)
if pi.returncode != 0: