diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-10-29 18:44:35 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-10-29 18:52:28 -0700 |
commit | 75af3c1ac8dba93b508b8b431bef9a35e6b054c3 (patch) | |
tree | 48f18974519715977f000a226b0da5902cc900c5 /tests | |
parent | 0154b1effe2cde0ad81a1adcbe83b7c9d018dbbd (diff) |
add asm1f test mode
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 2 | ||||
-rw-r--r-- | tests/test_core.py | 16 |
2 files changed, 3 insertions, 15 deletions
diff --git a/tests/runner.py b/tests/runner.py index 867f7113..483df36e 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -36,7 +36,7 @@ except: # Core test runner class, shared between normal tests and benchmarks checked_sanity = False -test_modes = ['default', 'o1', 'o2', 'asm1', 'asm2', 'asm2g', 'asm2x86', 's_0_0', 's_0_1'] +test_modes = ['default', 'o1', 'o2', 'asm1', 'asm1f', 'asm2', 'asm2g', 'asm2x86', 's_0_0', 's_0_1'] test_index = 0 class RunnerCore(unittest.TestCase): diff --git a/tests/test_core.py b/tests/test_core.py index f2376b53..ca81102d 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -883,10 +883,7 @@ nada self.do_run(src, 'OK!\n'); def test_float32_precise(self): - assert 'asm1' in test_modes - if self.run_name != 'asm1': return self.skip('todo') - - Settings.PRECISE_F32 = 1 + if self.emcc_args == None or 'PRECISE_F32=1' not in self.emcc_args: return self.skip('needs precise float32') src = r''' #include <stdio.h> @@ -8334,16 +8331,6 @@ extern "C" { src = open(path_from_root('tests', 'fasta.cpp'), 'r').read() self.do_run(src, j, [str(i)], lambda x, err: x.replace('\n', '*'), no_build=i>1) - assert 'asm1' in test_modes - if self.run_name == 'asm1': - # test float support in asm - print 'was fround', Settings.FROUND - Settings.FROUND = 1 - Settings.FROUND - print 'now fround variant', Settings.FROUND - i, j = results[-1] - src = open(path_from_root('tests', 'fasta.cpp'), 'r').read().replace('double', 'float') - self.do_run(src, j, [str(i)], lambda x, err: x.replace('\n', '*')) - def test_whets(self): if not Settings.ASM_JS: return self.skip('mainly a test for asm validation here') self.do_run(open(path_from_root('tests', 'whets.cpp')).read(), 'Single Precision C Whetstone Benchmark') @@ -10611,6 +10598,7 @@ o2 = make_run("o2", compiler=CLANG, emcc_args=["-O2", "-s", "ASM_JS=0", "-s", "J # asm.js asm1 = make_run("asm1", compiler=CLANG, emcc_args=["-O1"]) +asm1f = make_run("asm1f", compiler=CLANG, emcc_args=["-O1", "-s", "PRECISE_F32=1"]) asm2 = make_run("asm2", compiler=CLANG, emcc_args=["-O2"]) asm2g = make_run("asm2g", compiler=CLANG, emcc_args=["-O2", "-g", "-s", "ASSERTIONS=1", "--memory-init-file", "1", "-s", "CHECK_HEAP_ALIGN=1"]) asm2x86 = make_run("asm2x86", compiler=CLANG, emcc_args=["-O2", "-g", "-s", "CHECK_HEAP_ALIGN=1"], env={"EMCC_LLVM_TARGET": "i386-pc-linux-gnu"}) |