aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-02-26 08:55:17 +0100
committerBjörn Gustavsson <[email protected]>2013-05-31 14:52:17 +0200
commit6ec2f04e936bf8991cd398a8ae5c2f6f325a8122 (patch)
treed95d7b21acc74a0d47241441221fe38055855cb4 /lib
parent7c026e9f74754df4138a02cb087f70c0f92d24c9 (diff)
downloadotp-6ec2f04e936bf8991cd398a8ae5c2f6f325a8122.tar.gz
otp-6ec2f04e936bf8991cd398a8ae5c2f6f325a8122.tar.bz2
otp-6ec2f04e936bf8991cd398a8ae5c2f6f325a8122.zip
asn1_test_lib: Give more information when things goes wrong
Ensure that compilation errors of Erlang code gets printed. If compilation of an ASN.1 specification goes wrong, print out the filename of the offending specification. It can be seen in the test case log, but because most test cases run in a parallel group, the test case log is not available until all test case in the group have finished.
Diffstat (limited to 'lib')
-rw-r--r--lib/asn1/test/asn1_test_lib.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/asn1/test/asn1_test_lib.erl b/lib/asn1/test/asn1_test_lib.erl
index 1e40fd7b9e..191c321992 100644
--- a/lib/asn1/test/asn1_test_lib.erl
+++ b/lib/asn1/test/asn1_test_lib.erl
@@ -50,6 +50,7 @@ compile_file(File, Options) ->
end
catch
Class:Reason ->
+ ct:print("Failed to compile ~s\n", [File]),
erlang:error({compile_failed, {File, Options}, {Class, Reason}})
end.
@@ -58,7 +59,7 @@ compile_erlang(Mod, Config, Options) ->
CaseDir = ?config(case_dir, Config),
M = list_to_atom(Mod),
{ok, M} = compile:file(filename:join(DataDir, Mod),
- [{i, CaseDir}, {outdir, CaseDir}|Options]).
+ [report,{i,CaseDir},{outdir,CaseDir}|Options]).
should_load(File, Options) ->
case lists:member(abs, Options) of