aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2020-10-08 07:29:54 +0300
committerMatti Picus <matti.picus@gmail.com>2020-10-08 07:29:54 +0300
commita9f4f7b3667b4143cf5b38d30b76d628ff746210 (patch)
tree0c694ce6c27fca081ce2bab51485f1fbb2694aec /extra_tests
parentalways use NT sysconfig scheme on windows, issue 3321 (diff)
downloadpypy-a9f4f7b3667b4143cf5b38d30b76d628ff746210.tar.gz
pypy-a9f4f7b3667b4143cf5b38d30b76d628ff746210.tar.bz2
pypy-a9f4f7b3667b4143cf5b38d30b76d628ff746210.zip
fix (again) avoid python since it needs LD_LIBRARY_PATH on buildbot workers
Diffstat (limited to 'extra_tests')
-rw-r--r--extra_tests/test_os.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/extra_tests/test_os.py b/extra_tests/test_os.py
index a95efb1ab9..c755f8d46a 100644
--- a/extra_tests/test_os.py
+++ b/extra_tests/test_os.py
@@ -61,11 +61,10 @@ if hasattr(os, "execv"):
skip("Need '/tmp' for test")
pid = os.fork()
if pid == 0:
- os.execve("/usr/bin/env", ["env", python, "-c",
- ("import os; fid = open('/tmp/onefile2', 'w'); "
- "fid.write(os.environ['ddd']); "
- "fid.close()")],
- {'ddd': 'xxx'})
+ os.execve("/usr/bin/sh",
+ ["sh", "-c", "echo -n $ddd > /tmp/onefile2"],
+ {'ddd': 'xxx'},
+ )
os.waitpid(pid, 0)
assert open("/tmp/onefile2").read() == "xxx"
os.unlink("/tmp/onefile2")
@@ -98,7 +97,7 @@ if hasattr(os, "spawnv"):
if hasattr(os, "spawnve"):
def test_spawnve():
- env = {'PATH': os.environ['PATH'], 'FOOBAR': '42'}
- cmd = "raise(SystemExit(int(__import__('os').environ['FOOBAR'])))"
- ret = os.spawnve(os.P_WAIT, python, [python, '-c', cmd], env)
+ env = {'FOOBAR': '42'}
+ cmd = "exit $FOOBAR"
+ ret = os.spawnve(os.P_WAIT, "/bin/sh", ["sh", '-c', cmd], env)
assert ret == 42