aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <bjorn@erlang.org>2011-12-29 17:12:24 +0100
committerBjörn Gustavsson <bjorn@erlang.org>2012-01-04 16:14:18 +0100
commitc6df5e1536bb4d792c92e9338aaa6e468275c9b8 (patch)
treefd15117df28a250b43f88cc4471fbbc3de47f4b5 /lib
parentaf0aea81335edd6775413c1636df20d4518819d7 (diff)
downloadotp-c6df5e1536bb4d792c92e9338aaa6e468275c9b8.tar.gz
otp-c6df5e1536bb4d792c92e9338aaa6e468275c9b8.tar.bz2
otp-c6df5e1536bb4d792c92e9338aaa6e468275c9b8.zip
beam_validator_SUITE:beam_files/1: Validate modules in parallel
Diffstat (limited to 'lib')
-rw-r--r--lib/compiler/test/beam_validator_SUITE.erl27
1 files changed, 12 insertions, 15 deletions
diff --git a/lib/compiler/test/beam_validator_SUITE.erl b/lib/compiler/test/beam_validator_SUITE.erl
index 556dc54a8f..902867bc19 100644
--- a/lib/compiler/test/beam_validator_SUITE.erl
+++ b/lib/compiler/test/beam_validator_SUITE.erl
@@ -79,21 +79,18 @@ beam_files(Config) when is_list(Config) ->
%% a grammatical error in the output of the io:format/2 call below. ;-)
?line [_,_|_] = Fs = filelib:wildcard(Wc),
?line io:format("~p files\n", [length(Fs)]),
- beam_files_1(Fs, 0).
-
-beam_files_1([F|Fs], Errors) ->
- ?line case beam_validator:file(F) of
- ok ->
- beam_files_1(Fs, Errors);
- {error,Es} ->
- io:format("File: ~s", [F]),
- io:format("Error: ~p\n", [Es]),
- beam_files_1(Fs, Errors+1)
- end;
-beam_files_1([], 0) -> ok;
-beam_files_1([], Errors) ->
- ?line io:format("~p error(s)", [Errors]),
- ?line ?t:fail().
+ test_lib:p_run(fun do_beam_file/1, Fs).
+
+
+do_beam_file(F) ->
+ case beam_validator:file(F) of
+ ok ->
+ ok;
+ {error,Es} ->
+ io:format("File: ~s", [F]),
+ io:format("Error: ~p\n", [Es]),
+ error
+ end.
compiler_bug(Config) when is_list(Config) ->
%% Check that the compiler returns an error if we try to