Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r82885:62a5b8816876
Date: 2016-03-08 16:46 +0100
http://bitbucket.org/pypy/pypy/changeset/62a5b8816876/

Log:    Test for rpython_startup_code being exported. And fix: it was using
        the wrong macro anyway...

diff --git a/rpython/translator/c/src/entrypoint.c 
b/rpython/translator/c/src/entrypoint.c
--- a/rpython/translator/c/src/entrypoint.c
+++ b/rpython/translator/c/src/entrypoint.c
@@ -37,7 +37,7 @@
 # include <src/thread.h>
 #endif
 
-RPY_EXTERN
+RPY_EXPORTED
 void rpython_startup_code(void)
 {
 #ifdef RPY_WITH_GIL
diff --git a/rpython/translator/c/test/test_standalone.py 
b/rpython/translator/c/test/test_standalone.py
--- a/rpython/translator/c/test/test_standalone.py
+++ b/rpython/translator/c/test/test_standalone.py
@@ -81,7 +81,7 @@
         #
         # verify that the executable re-export symbols, but not too many
         if sys.platform.startswith('linux') and not kwds.get('shared', False):
-            seen_main = False
+            seen = set()
             g = os.popen("objdump -T '%s'" % builder.executable_name, 'r')
             for line in g:
                 if not line.strip():
@@ -91,8 +91,8 @@
                 name = line.split()[-1]
                 if name.startswith('__'):
                     continue
+                seen.add(name)
                 if name == 'main':
-                    seen_main = True
                     continue
                 if name == 'pypy_debug_file':     # ok to export this one
                     continue
@@ -104,7 +104,9 @@
                         "declaration of this C function or global variable"
                         % (name,))
             g.close()
-            assert seen_main, "did not see 'main' exported"
+            # list of symbols that we *want* to be exported:
+            for name in ['main', 'pypy_debug_file', 'rpython_startup_code']:
+                assert name in seen, "did not see '%r' exported" % name
         #
         return t, builder
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to