aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2012-10-26 10:51:10 +0200
committerSiri Hansen <[email protected]>2012-10-26 10:51:10 +0200
commit0105ca9c3614ec838e96914ceebed80d9480a869 (patch)
treed709016873e685a67f8b10af53a0d854dff1cf9e /lib
parentbb915519aa16f6410b19c6f868805b47717f11fa (diff)
parentd241e64a5a4e46e1b3b864215f784348623af519 (diff)
downloadotp-0105ca9c3614ec838e96914ceebed80d9480a869.tar.gz
otp-0105ca9c3614ec838e96914ceebed80d9480a869.tar.bz2
otp-0105ca9c3614ec838e96914ceebed80d9480a869.zip
Merge branch 'siri/test_server/faulty-data_dir-when-cover/OTP-9956'
* siri/test_server/faulty-data_dir-when-cover/OTP-9956: [test_server] Set data_dir correctly when suite is cover compiled
Diffstat (limited to 'lib')
-rw-r--r--lib/test_server/src/test_server_ctrl.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl
index 88d86285d5..4e3cbf9087 100644
--- a/lib/test_server/src/test_server_ctrl.erl
+++ b/lib/test_server/src/test_server_ctrl.erl
@@ -3207,11 +3207,17 @@ get_data_dir(Mod, Suite) ->
non_existing ->
print(12, "The module ~p is not loaded", [Mod]),
[];
+ cover_compiled ->
+ MainCoverNode = cover:get_main_node(),
+ {file,File} = rpc:call(MainCoverNode,cover,is_compiled,[UseMod]),
+ do_get_data_dir(UseMod,File);
FullPath ->
- filename:dirname(FullPath) ++ "/" ++ cast_to_list(UseMod) ++
- ?data_dir_suffix
+ do_get_data_dir(UseMod,FullPath)
end.
+do_get_data_dir(Mod,File) ->
+ filename:dirname(File) ++ "/" ++ cast_to_list(Mod) ++ ?data_dir_suffix.
+
print_conf_time(0) ->
ok;
print_conf_time(ConfTime) ->