diff options
author | Björn Gustavsson <[email protected]> | 2012-12-19 08:06:02 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-01-22 19:20:10 +0100 |
commit | 844e2126e3b814f9fa058be367be3af745c7a80b (patch) | |
tree | 2d7a1e5e43f2f72b66a5a29cc4b3f39d9bfbf54b /lib/asn1/test | |
parent | 953b858de46f46f42e2ba45ba30a9b0b278a526d (diff) | |
download | otp-844e2126e3b814f9fa058be367be3af745c7a80b.tar.gz otp-844e2126e3b814f9fa058be367be3af745c7a80b.tar.bz2 otp-844e2126e3b814f9fa058be367be3af745c7a80b.zip |
Generate modules with selected run-time functions for compiler usage
Diffstat (limited to 'lib/asn1/test')
-rw-r--r-- | lib/asn1/test/asn1_SUITE.erl | 25 | ||||
-rw-r--r-- | lib/asn1/test/asn1_app_test.erl | 3 |
2 files changed, 26 insertions, 2 deletions
diff --git a/lib/asn1/test/asn1_SUITE.erl b/lib/asn1/test/asn1_SUITE.erl index 1a47d91634..6299d50513 100644 --- a/lib/asn1/test/asn1_SUITE.erl +++ b/lib/asn1/test/asn1_SUITE.erl @@ -66,7 +66,8 @@ groups() -> {appup_test, [], [{asn1_appup_test, all}]}, {parallel, parallel([]), - [{group, ber}, + [cover, + {group, ber}, % Uses 'P-Record', 'Constraints', 'MEDIA-GATEWAY-CONTROL'... {group, [], [parse, test_driver_load, @@ -295,6 +296,28 @@ case_dir([C|Config], Opt) -> %% Test cases %%------------------------------------------------------------------------------ +%% Cover run-time functions that are only called by the ASN.1 compiler +%% (if any). +cover(_) -> + Wc = filename:join([code:lib_dir(asn1),"ebin","asn1ct_eval_*.beam"]), + Beams = filelib:wildcard(Wc), + true = Beams =/= [], + [begin + M0 = filename:basename(Beam), + M1 = filename:rootname(M0), + M = list_to_atom(M1), + "asn1ct_eval_" ++ Group0 = M1, + Group = list_to_atom(Group0), + io:format("%%\n" + "%% ~s\n" + "%%\n", [M]), + asn1ct_func:start_link(), + [asn1ct_func:need({Group,F,A}) || + {F,A} <- M:module_info(exports), F =/= module_info], + asn1ct_func:generate(group_leader()) + end || Beam <- Beams], + ok. + testPrim(Config) -> test(Config, fun testPrim/3). testPrim(Config, Rule, Opts) -> asn1_test_lib:compile_all(["Prim", "Real"], Config, [Rule|Opts]), diff --git a/lib/asn1/test/asn1_app_test.erl b/lib/asn1/test/asn1_app_test.erl index d7c9aa04e9..e4ae61f983 100644 --- a/lib/asn1/test/asn1_app_test.erl +++ b/lib/asn1/test/asn1_app_test.erl @@ -139,7 +139,8 @@ check_asn1ct_modules(Extra) -> asn1ct_gen_ber,asn1ct_constructed_ber_bin_v2, asn1ct_gen_ber_bin_v2,asn1ct_value, asn1ct_tok,asn1ct_parser2,asn1ct_table, - asn1ct_imm,asn1ct_func,asn1ct_rtt], + asn1ct_imm,asn1ct_func,asn1ct_rtt, + asn1ct_eval_ext,asn1ct_eval_per], case Extra -- ASN1CTMods of [] -> ok; |