Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:19
erlang
2455-Teach-filelib_SUITE-to-work-when-STDLIB-is...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2455-Teach-filelib_SUITE-to-work-when-STDLIB-is-cover-com.patch of Package erlang
From eaaeb3dab48ba3dde62281e21f773148e30bc7fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org> Date: Fri, 7 Apr 2017 10:31:41 +0200 Subject: [PATCH] Teach filelib_SUITE to work when STDLIB is cover-compiled filelib_SUITE:find_source/1 would fail when running the tests with STDLIB cover-compiled. --- lib/stdlib/test/filelib_SUITE.erl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/stdlib/test/filelib_SUITE.erl b/lib/stdlib/test/filelib_SUITE.erl index 87fba815d..6133a3ded 100644 --- a/lib/stdlib/test/filelib_SUITE.erl +++ b/lib/stdlib/test/filelib_SUITE.erl @@ -507,7 +507,12 @@ file_props_symlink(Config) -> end. find_source(Config) when is_list(Config) -> - BeamFile = code:which(lists), + %% filename:find_{file,source}() does not work if the files are + %% cover-compiled. To make sure that the test does not fail + %% when the STDLIB is cover-compiled, search for modules in + %% the compiler application. + + BeamFile = code:which(compile), BeamName = filename:basename(BeamFile), BeamDir = filename:dirname(BeamFile), SrcName = filename:basename(BeamFile, ".beam") ++ ".erl", @@ -530,7 +535,7 @@ find_source(Config) when is_list(Config) -> {error, not_found} = filelib:find_source(BeamName, BeamDir, [{".erl",".yrl",[{"",""}]}]), - {ok, ParserErl} = filelib:find_source(code:which(erl_parse)), + {ok, ParserErl} = filelib:find_source(code:which(core_parse)), {ok, ParserYrl} = filelib:find_source(ParserErl), "lry." ++ _ = lists:reverse(ParserYrl), {ok, ParserYrl} = filelib:find_source(ParserErl, -- 2.12.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor