aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/compilation_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-12-29 16:59:02 +0100
committerBjörn Gustavsson <[email protected]>2012-01-04 16:14:17 +0100
commitaf0aea81335edd6775413c1636df20d4518819d7 (patch)
tree8db61cfdb44f03e9afc11a1be1af09eaa2880d9d /lib/compiler/test/compilation_SUITE.erl
parentaf87c27e896533e026b1b6a67d86b4c09f6ba729 (diff)
downloadotp-af0aea81335edd6775413c1636df20d4518819d7.tar.gz
otp-af0aea81335edd6775413c1636df20d4518819d7.tar.bz2
otp-af0aea81335edd6775413c1636df20d4518819d7.zip
compilation_SUITE: Compile compiler modules in parallel
On my Mac Pro with 8 cores, this change make self_compile/1 more than twice as fast, and self_compile_old_inliner/1 more than 4 times faster.
Diffstat (limited to 'lib/compiler/test/compilation_SUITE.erl')
-rw-r--r--lib/compiler/test/compilation_SUITE.erl9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl
index c546666a3a..664582a3a8 100644
--- a/lib/compiler/test/compilation_SUITE.erl
+++ b/lib/compiler/test/compilation_SUITE.erl
@@ -470,9 +470,12 @@ compile_compiler(Files, OutDir, Version, InlineOpts) ->
{d,'COMPILER_VSN',"\""++Version++"\""},
nowarn_shadow_vars,
{i,filename:join(code:lib_dir(stdlib), "include")}|InlineOpts],
- lists:foreach(fun(File) ->
- {ok,_} = compile:file(File, Opts)
- end, Files).
+ test_lib:p_run(fun(File) ->
+ case compile:file(File, Opts) of
+ {ok,_} -> ok;
+ _ -> error
+ end
+ end, Files).
compiler_src() ->
filelib:wildcard(filename:join([code:lib_dir(compiler), "src", "*.erl"])).