diff options
author | Jordan Wilberding <[email protected]> | 2013-09-13 19:23:20 -0700 |
---|---|---|
committer | Jordan Wilberding <[email protected]> | 2013-09-13 19:23:20 -0700 |
commit | 431c89f22835fac4b74bfcd9170fcc4b081d7e05 (patch) | |
tree | ff7c2ec1202abc30a446227ae5d2b357e42a5e44 /test/rlx_release_SUITE.erl | |
parent | a5fdbb8d925ccdc5bd43c98917bdeaa779ac12da (diff) | |
parent | d02dd684dd685538c113da22f123b0850bb4f940 (diff) | |
download | relx-431c89f22835fac4b74bfcd9170fcc4b081d7e05.tar.gz relx-431c89f22835fac4b74bfcd9170fcc4b081d7e05.tar.bz2 relx-431c89f22835fac4b74bfcd9170fcc4b081d7e05.zip |
Merge pull request #38 from tsloughter/master
support copying full directories in overlays
Diffstat (limited to 'test/rlx_release_SUITE.erl')
-rw-r--r-- | test/rlx_release_SUITE.erl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/rlx_release_SUITE.erl b/test/rlx_release_SUITE.erl index ccf5a8f..aea28f2 100644 --- a/test/rlx_release_SUITE.erl +++ b/test/rlx_release_SUITE.erl @@ -383,6 +383,11 @@ overlay_release(Config) -> ConfigFile = filename:join([LibDir1, "relx.config"]), OverlayVars = filename:join([LibDir1, "vars.config"]), Template = filename:join([LibDir1, "test_template"]), + TestDir = "first_test_dir", + TestFile = "test_file", + TestDirFull = filename:join([LibDir1, TestDir]), + TestFileFull = filename:join(TestDirFull, TestFile), + SecondTestDir = "second_test_dir", write_config(ConfigFile, [{overlay_vars, OverlayVars}, {overlay, [{mkdir, "{{target_dir}}/fooo"}, @@ -390,6 +395,8 @@ overlay_release(Config) -> "{{target_dir}}/{{foo_dir}}/vars.config"}, {copy, OverlayVars, "{{target_dir}}/{{yahoo}}/"}, + {copy, TestDirFull, + "{{target_dir}}/"++SecondTestDir++"/"}, {template, Template, "{{target_dir}}/test_template_resolved"}]}, {release, {foo, "0.0.1"}, @@ -402,6 +409,9 @@ overlay_release(Config) -> {yahoo3, [{bar, "{{yahoo}}/{{yahoo2.foo}}"}]}, {foo_dir, "foodir"}]), + ok = rlx_util:mkdir_p(TestDirFull), + ok = file:write_file(TestFileFull, test_template_contents()), + TemplateFile = filename:join([LibDir1, "test_template"]), ok = file:write_file(TemplateFile, test_template_contents()), {ok, FileInfo} = file:read_file_info(TemplateFile), @@ -426,6 +436,8 @@ overlay_release(Config) -> ?assert(ec_file:exists(filename:join(OutputDir, "fooo"))), ?assert(ec_file:exists(filename:join([OutputDir, "foodir", "vars.config"]))), ?assert(ec_file:exists(filename:join([OutputDir, "yahoo", "vars.config"]))), + io:format("DirFile ~p~n", [filename:join([OutputDir, SecondTestDir, TestDir, TestFile])]), + ?assert(ec_file:exists(filename:join([OutputDir, SecondTestDir, TestDir, TestFile]))), TemplateData = case file:consult(filename:join([OutputDir, "test_template_resolved"])) of {ok, Details} -> |