Skip to content

Commit 82c0e41

Browse files
committed
fix teardown
1 parent 97df14b commit 82c0e41

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.evergreen/scripts/mod_wsgi_tester.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def setup_mod_wsgi(sub_test_name: str) -> None:
3030
env["MOD_WSGI_CONF"] = "mod_wsgi_test.conf"
3131
else:
3232
raise ValueError("mod_wsgi sub test must be either 'standalone' or 'embedded'")
33+
write_env("MOD_WSGI_CONF", env["MOD_WSGI_CONF"])
3334
apache = which("apache2")
3435
if not apache and Path("/usr/lib/apache2/mpm-prefork/apache2").exists():
3536
apache = "/usr/lib/apache2/mpm-prefork/apache2"
@@ -42,9 +43,9 @@ def setup_mod_wsgi(sub_test_name: str) -> None:
4243
apache_config = "apache22amazon.conf"
4344
python_version = ".".join(str(val) for val in sys.version_info[:2])
4445
mod_wsgi_version = 4
45-
env[
46-
"MOD_WSGI_SO"
47-
] = f"/opt/python/mod_wsgi/python_version/{python_version}/mod_wsgi_version/{mod_wsgi_version}/mod_wsgi.so"
46+
so_file = f"/opt/python/mod_wsgi/python_version/{python_version}/mod_wsgi_version/{mod_wsgi_version}/mod_wsgi.so"
47+
write_env("MOD_WSGI_SO", so_file)
48+
env["MOD_WSGI_SO"] = so_file
4849
env["PYTHONHOME"] = f"/opt/python/{python_version}"
4950
env["PROJECT_DIRECTORY"] = project_directory = str(ROOT)
5051
write_env("APACHE", apache)
@@ -84,6 +85,7 @@ def test_mod_wsgi() -> None:
8485
def teardown_mod_wsgi() -> None:
8586
apache = os.environ["APACHE"]
8687
apache_config = os.environ["APACHE_CONFIG"]
88+
8789
run_command(f"{apache} -k stop -f {ROOT}/test/mod_wsgi_test/{apache_config}")
8890

8991

0 commit comments

Comments
 (0)