Macos playtest envvars fix (#3035)

* playtests.sh: fix for a bug in macos' /bin/sh that persists temporary env vars when introduced before function calls
* cli-tests/run.py: Do not use existing ZSTD* envvars
This commit is contained in:
Yonatan Komornik
2022-02-03 18:42:20 -08:00
committed by GitHub
parent b9566fc558
commit 4bba97b4cb
2 changed files with 15 additions and 1 deletions
+3 -1
View File
@@ -278,10 +278,12 @@ class TestCase:
Returns the environment to be used for the
test subprocess.
"""
env = copy.copy(os.environ)
# We want to omit ZSTD cli flags so tests will be consistent across environments
env = {k: v for k, v in os.environ.items() if not k.startswith("ZSTD")}
for k, v in self._opts.env.items():
self._vlog(f"${k}='{v}'")
env[k] = v
return env
def _launch_test(self) -> None:
"""Launch the test subprocess, but do not join it."""