aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/compilation_SUITE.erl
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2013-11-19 19:25:37 +0100
committerBjörn Gustavsson <[email protected]>2013-12-13 12:52:06 +0100
commit20c38f0156b711032274cdea5a5049fc7ce8e81f (patch)
treecb99acbd1a4154cde4de70188e1ad85e78ab341c /lib/compiler/test/compilation_SUITE.erl
parent8a0b31772fe73503a989df3212546f2098308fa7 (diff)
downloadotp-20c38f0156b711032274cdea5a5049fc7ce8e81f.tar.gz
otp-20c38f0156b711032274cdea5a5049fc7ce8e81f.tar.bz2
otp-20c38f0156b711032274cdea5a5049fc7ce8e81f.zip
Test compilation of BEAM assembly with optimisations on
Diffstat (limited to 'lib/compiler/test/compilation_SUITE.erl')
-rw-r--r--lib/compiler/test/compilation_SUITE.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl
index d517029b1b..93b2fb4ea5 100644
--- a/lib/compiler/test/compilation_SUITE.erl
+++ b/lib/compiler/test/compilation_SUITE.erl
@@ -278,6 +278,16 @@ try_it(StartNode, Module, Conf) ->
?line ok = rpc:call(Node, ?MODULE, load_and_call, [Out, Module]),
?line test_server:timetrap_cancel(LastDog),
+ AsmDog = test_server:timetrap(test_server:minutes(10)),
+ io:format("Compiling (from assembly): ~s\n", [Src]),
+ {ok,_} = compile:file(Src, [to_asm,{outdir,Out},report|OtherOpts]),
+ Asm = filename:join(Out, lists:concat([Module, ".S"])),
+ CompRc3 = compile:file(Asm, [from_asm,{outdir,Out},report|OtherOpts]),
+ io:format("Result: ~p\n",[CompRc3]),
+ {ok,_} = CompRc3,
+ ok = rpc:call(Node, ?MODULE, load_and_call, [Out, Module]),
+ test_server:timetrap_cancel(AsmDog),
+
case StartNode of
false -> ok;
true -> ?line test_server:stop_node(Node)