aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-12-14 13:41:08 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-12-14 13:41:08 -0800
commit4f847c0568e74d629b5b8c5fd3c1651e0ef88780 (patch)
treeff4e934d0ae2a15d82dabb1bc36c0013330b789d
parent1630c9af4f31f1ef3611db1250f7887514665785 (diff)
test changes for fastcomp
-rw-r--r--tests/test_core.py19
-rw-r--r--tests/test_other.py5
2 files changed, 19 insertions, 5 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 9e713696..fe6cac6b 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -351,6 +351,9 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
}
'''
self.do_run(src, '*4903566027370624, 153236438355333*')
+
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
+
code = open(os.path.join(self.get_dir(), 'src.cpp.o.js')).read()
assert 'goog.math.Long' not in code, 'i64 precise math should not have been included if not actually used'
@@ -1874,11 +1877,6 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
self.do_run_from_file(src, output, [], lambda x, err: x.replace('\n', '*'))
- def test_float_h(self):
- process = Popen([PYTHON, EMCC, path_from_root('tests', 'float+.c')], stdout=PIPE, stderr=PIPE)
- process.communicate()
- assert process.returncode is 0, 'float.h should agree with our system'
-
def test_llvm_used(self):
Building.LLVM_OPTS = 3
@@ -2067,6 +2065,8 @@ def process(filename):
''', args=['34962', '26214', '35040'])
def test_indirectbr(self):
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
+
Building.COMPILER_TEST_OPTS = filter(lambda x: x != '-g', Building.COMPILER_TEST_OPTS)
test_path = path_from_root('tests', 'core', 'test_indirectbr')
@@ -2075,6 +2075,8 @@ def process(filename):
self.do_run_from_file(src, output)
def test_indirectbr_many(self):
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
+
if Settings.USE_TYPED_ARRAYS != 2: return self.skip('blockaddr > 255 requires ta2')
test_path = path_from_root('tests', 'core', 'test_indirectbr_many')
@@ -4587,6 +4589,7 @@ return malloc(size);
def test_simd(self):
if Settings.USE_TYPED_ARRAYS != 2: return self.skip('needs ta2')
if Settings.ASM_JS: Settings.ASM_JS = 2 # does not validate
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
test_path = path_from_root('tests', 'core', 'test_simd')
src, output = (test_path + s for s in ('.in', '.out'))
@@ -4604,6 +4607,7 @@ return malloc(size);
def test_simd3(self):
if Settings.USE_TYPED_ARRAYS != 2: return self.skip('needs ta2')
if Settings.ASM_JS: Settings.ASM_JS = 2 # does not validate
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
test_path = path_from_root('tests', 'core', 'test_simd3')
src, output = (test_path + s for s in ('.in', '.out'))
@@ -4630,6 +4634,7 @@ return malloc(size);
def test_lua(self):
if self.emcc_args is None: return self.skip('requires emcc')
if Settings.QUANTUM_SIZE == 1: return self.skip('TODO: make this work')
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
self.do_run('',
'hello lua world!\n17\n1\n2\n3\n4\n7',
@@ -5415,6 +5420,7 @@ def process(filename):
def test_embind(self):
if self.emcc_args is None: return self.skip('requires emcc')
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
Building.COMPILER_TEST_OPTS += ['--bind']
src = r'''
@@ -5437,6 +5443,7 @@ def process(filename):
def test_embind_2(self):
if self.emcc_args is None: return self.skip('requires emcc')
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
Building.COMPILER_TEST_OPTS += ['--bind', '--post-js', 'post.js']
open('post.js', 'w').write('''
Module.print('lerp ' + Module.lerp(1, 2, 0.66) + '.');
@@ -5457,6 +5464,7 @@ def process(filename):
def test_scriptaclass(self):
if self.emcc_args is None: return self.skip('requires emcc')
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
Settings.EXPORT_BINDINGS = 1
@@ -6030,6 +6038,7 @@ def process(filename):
if Settings.USE_TYPED_ARRAYS != 2: return self.skip("doesn't pass without typed arrays")
if '-g4' not in Building.COMPILER_TEST_OPTS: Building.COMPILER_TEST_OPTS.append('-g4')
if NODE_JS not in JS_ENGINES: return self.skip('sourcemapper requires Node to run')
+ if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
src = '''
#include <stdio.h>
diff --git a/tests/test_other.py b/tests/test_other.py
index b10ae13b..46170856 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -2150,3 +2150,8 @@ mergeInto(LibraryManager.library, {
Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '--js-library', 'lib.js']).communicate()
self.assertContained('hello, world!', run_js(os.path.join(self.get_dir(), 'a.out.js')))
+ def test_float_h(self):
+ process = Popen([PYTHON, EMCC, path_from_root('tests', 'float+.c')], stdout=PIPE, stderr=PIPE)
+ out, err = process.communicate()
+ assert process.returncode is 0, 'float.h should agree with our system: ' + out + '\n\n\n' + err
+