diff options
author | Luis Rascao <[email protected]> | 2016-09-30 00:26:27 +0100 |
---|---|---|
committer | Luis Rascao <[email protected]> | 2016-10-03 21:33:53 +0100 |
commit | 3a2003e5683aaeaab69a403abba47df4b0b891c2 (patch) | |
tree | 215247bf56cb1fdc5d79733abb0ad4cb7105fc8d /test/rlx_test_utils.erl | |
parent | cf68577c1499c64c7b154160fffe14cd57fbb6ec (diff) | |
download | relx-3a2003e5683aaeaab69a403abba47df4b0b891c2.tar.gz relx-3a2003e5683aaeaab69a403abba47df4b0b891c2.tar.bz2 relx-3a2003e5683aaeaab69a403abba47df4b0b891c2.zip |
Don't include erts src when user requests src not be included
Using the include_src option
Diffstat (limited to 'test/rlx_test_utils.erl')
-rw-r--r-- | test/rlx_test_utils.erl | 6 |
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)), |