summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/driver/runtests.py3
-rw-r--r--testsuite/driver/testglobals.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py
index 0d458924d0..5510adfdef 100644
--- a/testsuite/driver/runtests.py
+++ b/testsuite/driver/runtests.py
@@ -42,6 +42,9 @@ import cpu_features
os.environ['TERM'] = 'vt100'
ghc_env['TERM'] = 'vt100'
+# Ensure that GHC doesn't go looking for environment files. See #21365.
+ghc_env['GHC_ENVIRONMENT'] = "-"
+
global config
config = getConfig() # get it from testglobals
config.validate()
diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py
index b85a14e17a..8a68ffd33e 100644
--- a/testsuite/driver/testglobals.py
+++ b/testsuite/driver/testglobals.py
@@ -237,8 +237,7 @@ def getConfig():
return config
import os
-# Hold our modified GHC testrunning environment so we don't poison the current
-# python's environment.
+# This is the environment in which we run test subprocesses.
global ghc_env
ghc_env = os.environ.copy()