aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-05-14 12:27:42 +0200
committerBjörn Gustavsson <[email protected]>2014-05-26 15:54:12 +0200
commit32f33d9897261b15573e7e606d990e60e294fc22 (patch)
tree208abaaa96583139f6ae3aed6cf3d52e309b7ba3 /lib/kernel
parentd8fa3de932d97db3a93520ac30f60045e8a9cef4 (diff)
downloadotp-32f33d9897261b15573e7e606d990e60e294fc22.tar.gz
otp-32f33d9897261b15573e7e606d990e60e294fc22.tar.bz2
otp-32f33d9897261b15573e7e606d990e60e294fc22.zip
application_SUITE: Clean up the code after the test is done
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/test/application_SUITE.erl11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/kernel/test/application_SUITE.erl b/lib/kernel/test/application_SUITE.erl
index 036e238c85..4901206c8e 100644
--- a/lib/kernel/test/application_SUITE.erl
+++ b/lib/kernel/test/application_SUITE.erl
@@ -1076,10 +1076,13 @@ otp_1586(Conf) when is_list(Conf) ->
{ok, Fd} = file:open(filename:join(Dir, "app5.app"), [write]),
w_app5(Fd),
file:close(Fd),
- code:add_patha(Dir),
- ok = application:load(app4()),
- ok = application:unload(app4),
- ok.
+ try
+ true = code:add_patha(Dir),
+ ok = application:load(app4()),
+ ok = application:unload(app4)
+ after
+ _ = code:del_path(Dir)
+ end.
%%-----------------------------------------------------------------
%% Ticket: OTP-2078