From 22f9111ef12ed58aeb5a15ed55a983c9b19cddb8 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Sat, 3 Dec 2011 17:53:15 +0100 Subject: Don't explicitly load inherited modules Just use include options to add to the code path and expect that dependent modules will either already have been loaded or will be loaded dynamically, thereby avoiding having a module being left as both current and old code when compiling concurrently. Not a problem for a human user interactively compiling one module at a time but the compiler test suite for one will compile concurrently. In any case, leaving behind old code is probably not what someone would expect while relying on the code path probably is. --- lib/diameter/test/diameter_compiler_SUITE.erl | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'lib/diameter/test') diff --git a/lib/diameter/test/diameter_compiler_SUITE.erl b/lib/diameter/test/diameter_compiler_SUITE.erl index c4de6e4f85..e2f4b3c931 100644 --- a/lib/diameter/test/diameter_compiler_SUITE.erl +++ b/lib/diameter/test/diameter_compiler_SUITE.erl @@ -30,8 +30,7 @@ end_per_suite/1]). %% testcases --export([base/1, - format/1, +-export([format/1, replace/1, replace/2]). -export([dict/0]). %% fake dictionary module @@ -167,7 +166,7 @@ {avp_not_defined, "CEA ::=", " &"}, - {beam_not_on_path, + {not_loaded, [{"@avp_types", "@inherits nomod XXX &"}, {"CEA ::=", " &"}]}, {recompile, @@ -201,8 +200,7 @@ suite() -> [{timetrap, {seconds, 5}}]. all() -> - [base, - format, + [format, replace]. %% Error handling testcases will make an erroneous dictionary out of @@ -219,16 +217,6 @@ end_per_suite(_Config) -> %% =========================================================================== %% testcases -%% base/1 - -%% This work around a minor deficiency in diameter_dict_util, that it -%% does deal well with compiling in parallel. Load the dictionary -%% ahead of time so that compilation doesn't. -base(_Config) -> - Base = filename:join([code:lib_dir(diameter, ebin), - "diameter_gen_base_rfc3588"]), - {module, _} = code:load_abs(Base). - %% Ensure that parse o format is the identity map. format(Config) -> Bin = proplists:get_value(base, Config), -- cgit v1.2.3