[pypy-svn] r49340 - pypy/dist/pypy/rpython/module/test
exarkun at codespeak.net
exarkun at codespeak.net
Tue Dec 4 16:26:58 CET 2007
Author: exarkun
Date: Tue Dec 4 16:26:58 2007
New Revision: 49340
Modified:
pypy/dist/pypy/rpython/module/test/execve_tests.py
pypy/dist/pypy/rpython/module/test/test_ll_os.py
Log:
Change test_ll_os.test_execve so that it works even if pypy is not importable based on $PYTHONPATH
Modified: pypy/dist/pypy/rpython/module/test/execve_tests.py
==============================================================================
--- pypy/dist/pypy/rpython/module/test/execve_tests.py (original)
+++ pypy/dist/pypy/rpython/module/test/execve_tests.py Tue Dec 4 16:26:58 2007
@@ -6,6 +6,7 @@
"""
import os, sys
+sys.path.append(sys.argv[1])
from pypy.rpython.module.test.test_ll_os import EXECVE_ENV, getllimpl
@@ -22,4 +23,4 @@
execve("/usr/bin/env", ["/usr/bin/env"], EXECVE_ENV)
if __name__ == '__main__':
- globals()[sys.argv[1]]()
+ globals()[sys.argv[2]]()
Modified: pypy/dist/pypy/rpython/module/test/test_ll_os.py
==============================================================================
--- pypy/dist/pypy/rpython/module/test/test_ll_os.py (original)
+++ pypy/dist/pypy/rpython/module/test/test_ll_os.py Tue Dec 4 16:26:58 2007
@@ -1,6 +1,7 @@
import os
from py.path import local
+import pypy
from pypy.tool.udir import udir
from pypy.translator.c.test.test_genc import compile
@@ -68,7 +69,11 @@
def test_execve():
if os.name != 'posix':
py.test.skip('posix specific function')
- base = sys.executable + " " + execve_tests + " "
+ base = " ".join([
+ sys.executable,
+ execve_tests,
+ str(local(pypy.__file__).join('..', '..')),
+ ''])
# Test exit status and code
result = os.system(base + "execve_true")
More information about the Pypy-commit
mailing list