aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/core_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-04-20 10:06:24 +0200
committerBjörn Gustavsson <[email protected]>2015-04-22 10:12:06 +0200
commit81354ca6651ff23ecff8dc93e1db13c115bb8369 (patch)
tree2af4a8c801143842aeb712e4802d886cbcbce657 /lib/compiler/test/core_SUITE.erl
parentbb20626522a8d5cb92b2379751450905151cab44 (diff)
downloadotp-81354ca6651ff23ecff8dc93e1db13c115bb8369.tar.gz
otp-81354ca6651ff23ecff8dc93e1db13c115bb8369.tar.bz2
otp-81354ca6651ff23ecff8dc93e1db13c115bb8369.zip
test suites: Unload modules compiled from .core or .S
The .core or .S files that are compiled in the test cases may lack module_info/0,1 functions, which will cause problems if we (for example) try to run eprof later. To avoid that problem, unload each module directly after testing it.
Diffstat (limited to 'lib/compiler/test/core_SUITE.erl')
-rw-r--r--lib/compiler/test/core_SUITE.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/compiler/test/core_SUITE.erl b/lib/compiler/test/core_SUITE.erl
index 428ad65364..471f8dc558 100644
--- a/lib/compiler/test/core_SUITE.erl
+++ b/lib/compiler/test/core_SUITE.erl
@@ -87,4 +87,7 @@ try_it(Mod, Conf) ->
compile_and_load(Src, Opts) ->
{ok,Mod,Bin} = compile:file(Src, [from_core,report,time,binary|Opts]),
{module,Mod} = code:load_binary(Mod, Mod, Bin),
- ok = Mod:Mod().
+ ok = Mod:Mod(),
+ _ = code:delete(Mod),
+ _ = code:purge(Mod),
+ ok.