diff options
author | Patrik Nyblom <[email protected]> | 2010-11-26 14:59:43 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2010-11-26 14:59:43 +0100 |
commit | db5e4ea154648387689a4bdb7c3f7bf67081aeb7 (patch) | |
tree | 6d729b32e6e8da0aa590957b396d122e7f5c6828 /lib | |
parent | c499f6e21280c9fe2600728a79f8f18519ec665e (diff) | |
download | otp-db5e4ea154648387689a4bdb7c3f7bf67081aeb7.tar.gz otp-db5e4ea154648387689a4bdb7c3f7bf67081aeb7.tar.bz2 otp-db5e4ea154648387689a4bdb7c3f7bf67081aeb7.zip |
Unload stray applications from application_SUITE before creating script
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kernel/test/code_SUITE.erl | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl index 0bf40a9bba..705717ff49 100644 --- a/lib/kernel/test/code_SUITE.erl +++ b/lib/kernel/test/code_SUITE.erl @@ -1339,18 +1339,6 @@ filter_app("safe",_) -> % OS_mon does not find it's port program when running cerl filter_app("os_mon",true) -> false; -% The following apps may be loaded due to earlier test suites and shuld -% not be included -filter_app("app0",_) -> - false; -filter_app("app1",_) -> - false; -filter_app("app2",_) -> - false; -filter_app("group_leader",_) -> - false; -filter_app("app_start_error",_) -> - false; % Other apps should be OK. filter_app(_,_) -> true. @@ -1358,6 +1346,12 @@ create_big_script(Config,Local) -> ?line PrivDir = ?config(priv_dir, Config), ?line Name = filename:join(PrivDir,"full_script_test"), ?line InitialApplications=application:loaded_applications(), + %% Applications left loaded by the application suite, unload them! + ?line UnloadFix=[app0,app1,app2,group_leader,app_start_error], + ?line [application:unload(Leftover) || + Leftover <- UnloadFix, + lists:keymember(Leftover,1,InitialApplications) ], + %% Now we should have only "real" applications... ?line [application:load(list_to_atom(Y)) || {match,[Y]} <- [ re:run(X,code:lib_dir()++"/"++"([^/-]*).*/ebin",[{capture,[1],list}]) || X <- code:get_path()],filter_app(Y,Local)], ?line Apps = [ {N,V} || {N,_,V} <- application:loaded_applications()], ?line {ok,Fd} = file:open(Name ++ ".rel", write), |