diff options
author | Peter Melnichenko <mpeterval@gmail.com> | 2016-11-01 22:19:38 +0300 |
---|---|---|
committer | Peter Melnichenko <mpeterval@gmail.com> | 2016-11-01 23:00:42 +0300 |
commit | 933386b16d944eac3f93100886b03c3ae745b802 (patch) | |
tree | 43fb0784787dfa2637c3af49752292244518f9cb /test/test_environment.lua | |
parent | 5935a1d39658fc0f2dd1ab04f1a3f3dd5413fbb8 (diff) | |
download | luarocks-933386b16d944eac3f93100886b03c3ae745b802.tar.gz luarocks-933386b16d944eac3f93100886b03c3ae745b802.tar.bz2 luarocks-933386b16d944eac3f93100886b03c3ae745b802.zip |
Add a test for conflict resolution with mixed deploy types
Diffstat (limited to 'test/test_environment.lua')
-rw-r--r-- | test/test_environment.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_environment.lua b/test/test_environment.lua index 196202df..6f6f1cfe 100644 --- a/test/test_environment.lua +++ b/test/test_environment.lua | |||
@@ -214,7 +214,7 @@ function test_env.set_args() | |||
214 | return true | 214 | return true |
215 | end | 215 | end |
216 | 216 | ||
217 | local function copy_dir(source_path, target_path) | 217 | function test_env.copy_dir(source_path, target_path) |
218 | local testing_paths = test_env.testing_paths | 218 | local testing_paths = test_env.testing_paths |
219 | if test_env.TEST_TARGET_OS == "windows" then | 219 | if test_env.TEST_TARGET_OS == "windows" then |
220 | execute_bool(testing_paths.win_tools .. "/cp -R ".. source_path .. "/. " .. target_path) | 220 | execute_bool(testing_paths.win_tools .. "/cp -R ".. source_path .. "/. " .. target_path) |
@@ -430,8 +430,8 @@ local function build_environment(rocks, env_variables) | |||
430 | end | 430 | end |
431 | end | 431 | end |
432 | 432 | ||
433 | copy_dir(testing_paths.testing_tree, testing_paths.testing_tree_copy) | 433 | test_env.copy_dir(testing_paths.testing_tree, testing_paths.testing_tree_copy) |
434 | copy_dir(testing_paths.testing_sys_tree, testing_paths.testing_sys_tree_copy) | 434 | test_env.copy_dir(testing_paths.testing_sys_tree, testing_paths.testing_sys_tree_copy) |
435 | end | 435 | end |
436 | 436 | ||
437 | --- Reset testing environment | 437 | --- Reset testing environment |
@@ -441,12 +441,12 @@ local function reset_environment(testing_paths, md5sums) | |||
441 | 441 | ||
442 | if testing_tree_md5 ~= md5sums.testing_tree_copy_md5 then | 442 | if testing_tree_md5 ~= md5sums.testing_tree_copy_md5 then |
443 | test_env.remove_dir(testing_paths.testing_tree) | 443 | test_env.remove_dir(testing_paths.testing_tree) |
444 | copy_dir(testing_paths.testing_tree_copy, testing_paths.testing_tree) | 444 | test_env.copy_dir(testing_paths.testing_tree_copy, testing_paths.testing_tree) |
445 | end | 445 | end |
446 | 446 | ||
447 | if testing_sys_tree_md5 ~= md5sums.testing_sys_tree_copy_md5 then | 447 | if testing_sys_tree_md5 ~= md5sums.testing_sys_tree_copy_md5 then |
448 | test_env.remove_dir(testing_paths.testing_sys_tree) | 448 | test_env.remove_dir(testing_paths.testing_sys_tree) |
449 | copy_dir(testing_paths.testing_sys_tree_copy, testing_paths.testing_sys_tree) | 449 | test_env.copy_dir(testing_paths.testing_sys_tree_copy, testing_paths.testing_sys_tree) |
450 | end | 450 | end |
451 | print("\n[ENVIRONMENT RESET]") | 451 | print("\n[ENVIRONMENT RESET]") |
452 | end | 452 | end |