aboutsummaryrefslogtreecommitdiff
path: root/tests/test_other.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-03-28 16:52:28 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-03-28 16:52:28 -0700
commitcde38c81c2330c139fa5d7d12a9e3688c5059f9c (patch)
tree1c31a885a9fe73364436b480f9db886d5c90a548 /tests/test_other.py
parent20bfe6cf840a29d9dad7d7fda5a3001ebe71a3a5 (diff)
fix the case where emcc's input and output is a bitcode file
Diffstat (limited to 'tests/test_other.py')
-rw-r--r--tests/test_other.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_other.py b/tests/test_other.py
index 8c6a199c..0f5a4191 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -2682,3 +2682,14 @@ int main()
symbols = open('a.out.js.symbols').read()
assert ':_main' in symbols
+ def test_bc_to_bc(self):
+ # emcc should 'process' bitcode to bitcode. build systems can request this if
+ # e.g. they assume our 'executable' extension is bc, and compile an .o to a .bc
+ # (the user would then need to build bc to js of course, but we need to actually
+ # emit the bc)
+ cmd = Popen([PYTHON, EMCC, '-c', path_from_root('tests', 'hello_world.c')]).communicate()
+ assert os.path.exists('hello_world.o')
+ cmd = Popen([PYTHON, EMCC, 'hello_world.o', '-o', 'hello_world.bc']).communicate()
+ assert os.path.exists('hello_world.o')
+ assert os.path.exists('hello_world.bc')
+