diff options
author | Siri Hansen <[email protected]> | 2014-09-22 11:16:29 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2014-09-22 11:16:29 +0200 |
commit | 71e5c61fb22919b51d96c2b4e5fe12a567e0a11a (patch) | |
tree | d3cd6d59cef25e835d17c027d05e61cb3f002efc /lib/common_test/src | |
parent | 6c3ad4ae161de5029cf666f620b7254ea6bb5987 (diff) | |
parent | dcaada42d82d28e4b44fe37ab519a8bd4b318729 (diff) | |
download | otp-71e5c61fb22919b51d96c2b4e5fe12a567e0a11a.tar.gz otp-71e5c61fb22919b51d96c2b4e5fe12a567e0a11a.tar.bz2 otp-71e5c61fb22919b51d96c2b4e5fe12a567e0a11a.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/common_test/src')
-rw-r--r-- | lib/common_test/src/ct_cover.erl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/common_test/src/ct_cover.erl b/lib/common_test/src/ct_cover.erl index cf2860ae25..c7f446dee9 100644 --- a/lib/common_test/src/ct_cover.erl +++ b/lib/common_test/src/ct_cover.erl @@ -128,20 +128,20 @@ get_spec(File) -> catch get_spec_test(File). get_spec_test(File) -> - FullName = filename:absname(File), - case filelib:is_file(FullName) of + Dir = filename:dirname(File), % always abs path in here, set in ct_run + case filelib:is_file(File) of true -> - case file:consult(FullName) of + case file:consult(File) of {ok,Terms} -> Import = case lists:keysearch(import, 1, Terms) of {value,{_,Imps=[S|_]}} when is_list(S) -> ImpsFN = lists:map(fun(F) -> - filename:absname(F) + filename:absname(F,Dir) end, Imps), test_files(ImpsFN, ImpsFN); {value,{_,Imp=[IC|_]}} when is_integer(IC) -> - ImpFN = filename:absname(Imp), + ImpFN = filename:absname(Imp,Dir), test_files([ImpFN], [ImpFN]); _ -> [] @@ -149,9 +149,9 @@ get_spec_test(File) -> Export = case lists:keysearch(export, 1, Terms) of {value,{_,Exp=[EC|_]}} when is_integer(EC) -> - filename:absname(Exp); + filename:absname(Exp,Dir); {value,{_,[Exp]}} -> - filename:absname(Exp); + filename:absname(Exp,Dir); _ -> undefined end, @@ -179,7 +179,7 @@ get_spec_test(File) -> E; [CoverSpec] -> CoverSpec1 = remove_excludes_and_dups(CoverSpec), - {FullName,Nodes,Import,Export,CoverSpec1}; + {File,Nodes,Import,Export,CoverSpec1}; _ -> {error,multiple_apps_in_cover_spec} end; @@ -190,7 +190,7 @@ get_spec_test(File) -> {error,{invalid_cover_spec,Error}} end; false -> - {error,{cant_read_cover_spec_file,FullName}} + {error,{cant_read_cover_spec_file,File}} end. collect_apps([{level,Level}|Ts], Apps) -> |