aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-16 18:14:02 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-16 18:14:23 -0800
commitd157b2049d07d3396cfa6d646d56705100ef412f (patch)
tree0404f0893be489c04393698d0808fe8269ce58fe /tests
parent48a10df5a060461bc8a213e14e9f3aba2e0b7858 (diff)
support for .ll files as inputs to emcc
Diffstat (limited to 'tests')
-rw-r--r--tests/runner.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 5eb88062..03a4c425 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -4939,6 +4939,13 @@ Options that are modified or new in %s include:
assert os.path.exists(target), 'Expected %s to exist since args are %s : %s' % (target, str(args), '\n'.join(output))
self.assertContained('hello, world!', self.run_llvm_interpreter([target]))
+ # emcc src.ll ==> generates .js
+ clear()
+ output = Popen([compiler, path_from_root('tests', 'hello_world.ll')], stdout=PIPE, stderr=PIPE).communicate()
+ assert len(output[0]) == 0, output[0]
+ assert os.path.exists('a.out.js'), '\n'.join(output)
+ self.assertContained('hello, world!', run_js('a.out.js'))
+
# dlmalloc. dlmalloc is special in that it is the only part of libc that is (1) hard to write well, and
# very speed-sensitive. So we do not implement it in JS in library.js, instead we compile it from source
for source, has_malloc in [('hello_world' + suffix, False), ('hello_malloc.cpp', True)]:
@@ -5057,13 +5064,11 @@ Options that are modified or new in %s include:
assert os.path.exists('combined.bc'), '\n'.join(output)
self.assertContained('side got: hello from main, over', self.run_llvm_interpreter(['combined.bc']))
- # TODO: compile .ll inputs to emcc into .bc
# TODO: test normal project linking, static and dynamic: get_library should not need to be told what to link!
# TODO: when ready, switch tools/shared building to use emcc over emmaken
# TODO: when this is done, more test runner to test these (i.e., test all -Ox thoroughly)
# TODO: emscripten tutorial with emcc
# TODO: deprecate llvm optimizations, dlmalloc, etc. in emscripten.py.
- # TODO: hide output from compiling dlmalloc internally
# Finally, do some web browser tests
def run_browser(html_file, message):