aboutsummaryrefslogtreecommitdiffstats
path: root/test/rlx_test_utils.erl
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2016-10-06 14:00:43 -0700
committerGitHub <[email protected]>2016-10-06 14:00:43 -0700
commitbe045b566fbbf63b0074dc970dd4e65d8f644302 (patch)
tree5f26b4f4f2e4287863360abdb9728cb66de5bd17 /test/rlx_test_utils.erl
parent2ba3b82801ade6ee803c1831a629d0a099df7a7c (diff)
parent3a2003e5683aaeaab69a403abba47df4b0b891c2 (diff)
downloadrelx-be045b566fbbf63b0074dc970dd4e65d8f644302.tar.gz
relx-be045b566fbbf63b0074dc970dd4e65d8f644302.tar.bz2
relx-be045b566fbbf63b0074dc970dd4e65d8f644302.zip
Merge pull request #515 from lrascao/feature/erts_include_src
Don't include erts src when user requests src not be included
Diffstat (limited to 'test/rlx_test_utils.erl')
-rw-r--r--test/rlx_test_utils.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/rlx_test_utils.erl b/test/rlx_test_utils.erl
index 2e6045f..b6f6d7e 100644
--- a/test/rlx_test_utils.erl
+++ b/test/rlx_test_utils.erl
@@ -7,6 +7,7 @@
create_app(Dir, Name, Vsn, Deps, LibDeps) ->
AppDir = filename:join([Dir, Name ++ "-" ++ Vsn]),
write_app_file(AppDir, Name, Vsn, Deps, LibDeps),
+ write_src_file(AppDir, Name),
write_beam_file(AppDir, Name),
rlx_app_info:new(erlang:list_to_atom(Name), Vsn, AppDir,
Deps, []).
@@ -22,6 +23,11 @@ write_beam_file(Dir, Name) ->
ok = filelib:ensure_dir(Beam),
ok = ec_file:write_term(Beam, testing_purposes_only).
+write_src_file(Dir, Name) ->
+ Src = filename:join([Dir, "src", "not_a_real_beam" ++ Name ++ ".erl"]),
+ ok = filelib:ensure_dir(Src),
+ ok = ec_file:write_term(Src, testing_purposes_only).
+
write_appup_file(AppInfo, DownVsn) ->
Dir = rlx_app_info:dir(AppInfo),
Name = rlx_util:to_string(rlx_app_info:name(AppInfo)),