diff options
author | Patrik Nyblom <[email protected]> | 2010-12-01 15:11:07 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2010-12-01 15:11:07 +0100 |
commit | 30ad8cfadba47123920128023cb06af6e0922746 (patch) | |
tree | b03c402b9c33ce3c378d39a8bdd10c2f2a377e54 /lib/kernel/test/code_SUITE.erl | |
parent | 9fbce40dcbda8d4e7888507d646bfee22bf7d311 (diff) | |
download | otp-30ad8cfadba47123920128023cb06af6e0922746.tar.gz otp-30ad8cfadba47123920128023cb06af6e0922746.tar.bz2 otp-30ad8cfadba47123920128023cb06af6e0922746.zip |
Mend on_load_embedded testcase which did not handle windows links
Diffstat (limited to 'lib/kernel/test/code_SUITE.erl')
-rw-r--r-- | lib/kernel/test/code_SUITE.erl | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl index 0c7440a13e..e52f8a0e37 100644 --- a/lib/kernel/test/code_SUITE.erl +++ b/lib/kernel/test/code_SUITE.erl @@ -1268,7 +1268,8 @@ on_load_embedded_1(Config) -> ?line LibRoot = code:lib_dir(), ?line LinkName = filename:join(LibRoot, "on_load_app-1.0"), ?line OnLoadApp = filename:join(DataDir, "on_load_app-1.0"), - ?line file:delete(LinkName), + ?line del_link(LinkName), + io:format("LinkName :~p, OnLoadApp: ~p~n",[LinkName,OnLoadApp]), case file:make_symlink(OnLoadApp, LinkName) of {error,enotsup} -> throw({skip,"Support for symlinks required"}); @@ -1297,7 +1298,15 @@ on_load_embedded_1(Config) -> %% Clean up. ?line stop_node(Node), - ?line ok = file:delete(LinkName). + ?line ok = del_link(LinkName). + +del_link(LinkName) -> + case file:delete(LinkName) of + {error,eperm} -> + file:del_dir(LinkName); + Other -> + Other + end. create_boot(Config, Options) -> ?line {ok, OldDir} = file:get_cwd(), |