diff options
author | Björn Gustavsson <[email protected]> | 2017-05-12 10:55:43 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-05-12 11:37:46 +0200 |
commit | 515d00c3f2a4d2fc4cd4eca0af870789d8632d39 (patch) | |
tree | f13915840f0224d6caf8a5c928e02de004f3279e /lib | |
parent | 773c4d4f0416f25e3c0c6939f8d0871dc4486bab (diff) | |
download | otp-515d00c3f2a4d2fc4cd4eca0af870789d8632d39.tar.gz otp-515d00c3f2a4d2fc4cd4eca0af870789d8632d39.tar.bz2 otp-515d00c3f2a4d2fc4cd4eca0af870789d8632d39.zip |
Don't crash in end_per_testcase/2 in code_SUITE:on_load_embedded/1
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kernel/test/code_SUITE.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl index 7831777726..afc32283ba 100644 --- a/lib/kernel/test/code_SUITE.erl +++ b/lib/kernel/test/code_SUITE.erl @@ -107,14 +107,19 @@ init_per_testcase(big_boot_embedded, Config) -> _Else -> {skip, "Needs crypto!"} end; -init_per_testcase(on_load_embedded, Config) -> +init_per_testcase(on_load_embedded, Config0) -> LibRoot = code:lib_dir(), LinkName = filename:join(LibRoot, "on_load_app-1.0"), - [{link_name,LinkName}|Config]; + Config = [{link_name,LinkName}|Config0], + init_per_testcase(Config); init_per_testcase(_Func, Config) -> + init_per_testcase(Config). + +init_per_testcase(Config) -> P = code:get_path(), [{code_path, P}|Config]. + end_per_testcase(module_status, Config) -> code:purge(?TESTMOD), code:delete(?TESTMOD), |