[pypy-commit] pypy default: Test and (bah) fix.
arigo
noreply at buildbot.pypy.org
Sat May 28 09:14:34 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r44570:06948d81bf2b
Date: 2011-05-28 09:26 +0200
http://bitbucket.org/pypy/pypy/changeset/06948d81bf2b/
Log: Test and (bah) fix.
diff --git a/pypy/translator/platform/posix.py b/pypy/translator/platform/posix.py
--- a/pypy/translator/platform/posix.py
+++ b/pypy/translator/platform/posix.py
@@ -129,9 +129,9 @@
m.cfiles = rel_cfiles
rel_includedirs = [pypyrel(incldir) for incldir in
- self._preprocess_include_dirs(eci.include_dirs)]
+ self.preprocess_include_dirs(eci.include_dirs)]
rel_libdirs = [pypyrel(libdir) for libdir in
- self._preprocess_library_dirs(eci.library_dirs)]
+ self.preprocess_library_dirs(eci.library_dirs)]
m.comment('automatically generated makefile')
definitions = [
diff --git a/pypy/translator/platform/test/test_posix.py b/pypy/translator/platform/test/test_posix.py
--- a/pypy/translator/platform/test/test_posix.py
+++ b/pypy/translator/platform/test/test_posix.py
@@ -3,7 +3,7 @@
from pypy.translator.tool.cbuild import ExternalCompilationInfo
from pypy.tool.udir import udir
from StringIO import StringIO
-import sys
+import sys, os
def test_echo():
res = host.execute('echo', '42 24')
@@ -49,6 +49,19 @@
mk.write()
assert 'LINKFILES = /foo/bar.a' in tmpdir.join('Makefile').read()
+ def test_preprocess_localbase(self):
+ tmpdir = udir.join('test_preprocess_localbase').ensure(dir=1)
+ eci = ExternalCompilationInfo()
+ os.environ['PYPY_LOCALBASE'] = '/foo/baz'
+ try:
+ mk = self.platform.gen_makefile(['blip.c'], eci, path=tmpdir)
+ mk.write()
+ finally:
+ del os.environ['PYPY_LOCALBASE']
+ Makefile = tmpdir.join('Makefile').read()
+ assert 'INCLUDEDIRS = -I/foo/baz/include' in Makefile
+ assert 'LIBDIRS = -L/foo/baz/lib' in Makefile
+
class TestMaemo(TestMakefile):
strict_on_stderr = False
More information about the pypy-commit
mailing list