aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_environment.lua10
-rw-r--r--test/testfiles/mixed_deploy_type/mdt.c6
-rw-r--r--test/testfiles/mixed_deploy_type/mdt.lua1
-rw-r--r--test/testfiles/mixed_deploy_type/mdt_file1
-rw-r--r--test/testfiles/mixed_deploy_type/mixed_deploy_type-0.1.0-1.rockspec21
-rw-r--r--test/testfiles/mixed_deploy_type/mixed_deploy_type-0.2.0-1.rockspec21
6 files changed, 55 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
215end 215end
216 216
217local function copy_dir(source_path, target_path) 217function 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)
435end 435end
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]")
452end 452end
diff --git a/test/testfiles/mixed_deploy_type/mdt.c b/test/testfiles/mixed_deploy_type/mdt.c
new file mode 100644
index 00000000..a162ce23
--- /dev/null
+++ b/test/testfiles/mixed_deploy_type/mdt.c
@@ -0,0 +1,6 @@
1#include "lua.h"
2
3int luaopen_mdt(lua_State *L) {
4 lua_pushstring(L, "mdt.c");
5 return 1;
6}
diff --git a/test/testfiles/mixed_deploy_type/mdt.lua b/test/testfiles/mixed_deploy_type/mdt.lua
new file mode 100644
index 00000000..c9ca9c68
--- /dev/null
+++ b/test/testfiles/mixed_deploy_type/mdt.lua
@@ -0,0 +1 @@
return "mdt.lua"
diff --git a/test/testfiles/mixed_deploy_type/mdt_file b/test/testfiles/mixed_deploy_type/mdt_file
new file mode 100644
index 00000000..1a15f7d7
--- /dev/null
+++ b/test/testfiles/mixed_deploy_type/mdt_file
@@ -0,0 +1 @@
return "mdt_file"
diff --git a/test/testfiles/mixed_deploy_type/mixed_deploy_type-0.1.0-1.rockspec b/test/testfiles/mixed_deploy_type/mixed_deploy_type-0.1.0-1.rockspec
new file mode 100644
index 00000000..91b725da
--- /dev/null
+++ b/test/testfiles/mixed_deploy_type/mixed_deploy_type-0.1.0-1.rockspec
@@ -0,0 +1,21 @@
1package = "mixed_deploy_type"
2version = "0.1.0-1"
3source = {
4 url = "http://example.com"
5}
6description = {
7 homepage = "http://example.com",
8 license = "*** please specify a license ***"
9}
10dependencies = {}
11build = {
12 type = "builtin",
13 modules = {
14 mdt = "mdt/mdt.lua"
15 },
16 install = {
17 lua = {
18 mdt_file = "mdt/mdt_file"
19 }
20 }
21}
diff --git a/test/testfiles/mixed_deploy_type/mixed_deploy_type-0.2.0-1.rockspec b/test/testfiles/mixed_deploy_type/mixed_deploy_type-0.2.0-1.rockspec
new file mode 100644
index 00000000..9ca03180
--- /dev/null
+++ b/test/testfiles/mixed_deploy_type/mixed_deploy_type-0.2.0-1.rockspec
@@ -0,0 +1,21 @@
1package = "mixed_deploy_type"
2version = "0.2.0-1"
3source = {
4 url = "http://example.com"
5}
6description = {
7 homepage = "http://example.com",
8 license = "*** please specify a license ***"
9}
10dependencies = {}
11build = {
12 type = "builtin",
13 modules = {
14 mdt = "mdt/mdt.c"
15 },
16 install = {
17 lib = {
18 mdt_file = "mdt/mdt_file"
19 }
20 }
21}