aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPeter Melnichenko <mpeterval@gmail.com>2016-07-08 15:56:37 +0300
committerPeter Melnichenko <mpeterval@gmail.com>2016-07-08 15:56:37 +0300
commit858c649db5107946184e30e67bf861826aa5c64d (patch)
tree2bb5b5ece648ed43c26742a19c0f51d26aaa2e70 /test
parentc3975b3758e83486039c04cdd251445ed3e3b938 (diff)
downloadluarocks-858c649db5107946184e30e67bf861826aa5c64d.tar.gz
luarocks-858c649db5107946184e30e67bf861826aa5c64d.tar.bz2
luarocks-858c649db5107946184e30e67bf861826aa5c64d.zip
Tests: remove optional .main() arguments
Diffstat (limited to 'test')
-rw-r--r--test/test_environment.lua23
1 files changed, 10 insertions, 13 deletions
diff --git a/test/test_environment.lua b/test/test_environment.lua
index f5cc701e..8cc8e295 100644
--- a/test/test_environment.lua
+++ b/test/test_environment.lua
@@ -533,12 +533,10 @@ end
533 533
534--- 534---
535-- Main function to create config files and testing environment 535-- Main function to create config files and testing environment
536function test_env.main(luaversion_full, env_type, env_clean) 536function test_env.main()
537 luaversion_full = luaversion_full or test_env.LUA_V or test_env.LUAJIT_V 537 local testing_paths = test_env.testing_paths
538 local testing_paths = create_paths(luaversion_full)
539 538
540 env_clean = env_clean or test_env.TEST_ENV_CLEAN 539 if test_env.TEST_ENV_CLEAN then
541 if env_clean then
542 print("Cleaning testing directory...") 540 print("Cleaning testing directory...")
543 test_env.remove_dir(testing_paths.luarocks_tmp) 541 test_env.remove_dir(testing_paths.luarocks_tmp)
544 test_env.remove_dir_pattern(testing_paths.testing_dir, "testing_") 542 test_env.remove_dir_pattern(testing_paths.testing_dir, "testing_")
@@ -568,14 +566,12 @@ function test_env.main(luaversion_full, env_type, env_clean)
568 end 566 end
569 567
570 -- Preparation of rocks for building environment 568 -- Preparation of rocks for building environment
571 env_type = env_type or test_env.TYPE_TEST_ENV
572
573 local env_rocks = {} -- short names of rocks, required for building environment 569 local env_rocks = {} -- short names of rocks, required for building environment
574 local rocks = {} -- full names of rocks required for download 570 local rocks = {} -- full names of rocks required for download
575 rocks[#rocks+1] = "/luacov-0.11.0-1.rockspec" 571 rocks[#rocks+1] = "/luacov-0.11.0-1.rockspec"
576 rocks[#rocks+1] = "/luacov-0.11.0-1.src.rock" 572 rocks[#rocks+1] = "/luacov-0.11.0-1.src.rock"
577 573
578 if env_type == "full" then 574 if test_env.TYPE_TEST_ENV == "full" then
579 rocks[#rocks+1] = "/luafilesystem-1.6.3-1.src.rock" 575 rocks[#rocks+1] = "/luafilesystem-1.6.3-1.src.rock"
580 rocks[#rocks+1] = "/luasocket-3.0rc1-1.src.rock" 576 rocks[#rocks+1] = "/luasocket-3.0rc1-1.src.rock"
581 rocks[#rocks+1] = "/luasocket-3.0rc1-1.rockspec" 577 rocks[#rocks+1] = "/luasocket-3.0rc1-1.rockspec"
@@ -583,11 +579,12 @@ function test_env.main(luaversion_full, env_type, env_clean)
583 rocks[#rocks+1] = "/md5-1.2-1.src.rock" 579 rocks[#rocks+1] = "/md5-1.2-1.src.rock"
584 rocks[#rocks+1] = "/lzlib-0.4.1.53-1.src.rock" 580 rocks[#rocks+1] = "/lzlib-0.4.1.53-1.src.rock"
585 env_rocks = {"luafilesystem", "luasocket", "luaposix", "md5", "lzlib"} 581 env_rocks = {"luafilesystem", "luasocket", "luaposix", "md5", "lzlib"}
586 end 582
587 if env_type == "full" and luaversion_full ~= "5.1" then 583 if test_env.LUA_V ~= "5.1" then
588 rocks[#rocks+1] = "/luabitop-1.0.2-1.rockspec" 584 rocks[#rocks+1] = "/luabitop-1.0.2-1.rockspec"
589 rocks[#rocks+1] = "/luabitop-1.0.2-1.src.rock" 585 rocks[#rocks+1] = "/luabitop-1.0.2-1.src.rock"
590 table.insert(env_rocks, "luabitop") 586 table.insert(env_rocks, "luabitop")
587 end
591 end 588 end
592 589
593 table.insert(env_rocks, "luacov") -- luacov is needed for minimal or full environment 590 table.insert(env_rocks, "luacov") -- luacov is needed for minimal or full environment