aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-26 13:40:40 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-03 14:41:29 -0700
commitf29ef210b8d9d9b25711562af6a4f1145d41cc2e (patch)
tree241f3a8f5d5894260224b2ba858c9a29fa07b475
parent858c8e31c41298d1c85a9099b1822b549aa4c234 (diff)
enable test_dlfcn_basic for asm modules
-rw-r--r--tests/test_core.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 16bf9a00..63d18f27 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -5581,9 +5581,8 @@ The current type of b is: 9
self.do_run(main, 'supp: 54,2\nmain: 56\nsupp see: 543\nmain see: 76\nok.')
def test_dlfcn_basic(self):
- if Settings.ASM_JS: return self.skip('TODO: dlopen in asm')
-
- Settings.NAMED_GLOBALS = 1
+ if not Settings.ASM_JS:
+ Settings.NAMED_GLOBALS = 1
lib_src = '''
#include <cstdio>
@@ -5599,7 +5598,10 @@ The current type of b is: 9
'''
dirname = self.get_dir()
filename = os.path.join(dirname, 'liblib.cpp')
- Settings.BUILD_AS_SHARED_LIB = 1
+ if Settings.ASM_JS:
+ Settings.SIDE_MODULE = 1
+ else:
+ Settings.BUILD_AS_SHARED_LIB = 1
self.build(lib_src, dirname, filename)
shutil.move(filename + '.o.js', os.path.join(dirname, 'liblib.so'))
@@ -5621,7 +5623,11 @@ The current type of b is: 9
return 0;
}
'''
- Settings.BUILD_AS_SHARED_LIB = 0
+ if Settings.ASM_JS:
+ Settings.MAIN_MODULE = 1
+ Settings.SIDE_MODULE = 0
+ else:
+ Settings.BUILD_AS_SHARED_LIB = 0
add_pre_run_and_checks = '''
def process(filename):
src = open(filename, 'r').read().replace(