diff options
-rw-r--r-- | .github/workflows/test.yml | 4 | ||||
-rw-r--r-- | appveyor.yml | 56 | ||||
-rw-r--r-- | binary/lua-zlib-1.2-0.rockspec | 2 | ||||
-rw-r--r-- | spec/build_spec.lua | 11 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest | 18 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.1 | 18 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.1.zip | bin | 358 -> 343 bytes | |||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.2 | 18 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.2.zip | bin | 358 -> 343 bytes | |||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.3 | 18 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.3.zip | bin | 358 -> 343 bytes | |||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.4 | 90 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifest-5.4.zip | bin | 0 -> 343 bytes | |||
-rw-r--r-- | spec/fixtures/a_repo/manifests/a_user/manifest-5.4 | 14 | ||||
-rw-r--r-- | spec/fixtures/a_repo/manifests/another_user/manifest-5.4 | 14 | ||||
-rw-r--r-- | spec/init_spec.lua | 4 | ||||
-rw-r--r-- | spec/install_spec.lua | 8 | ||||
-rw-r--r-- | spec/test_spec.lua | 2 | ||||
-rw-r--r-- | spec/unpack_spec.lua | 25 | ||||
-rw-r--r-- | spec/util/test_env.lua | 9 | ||||
-rw-r--r-- | spec/util/versions.lua | 4 |
21 files changed, 233 insertions, 82 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 370afb32..c5d3a0e4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml | |||
@@ -43,7 +43,7 @@ jobs: | |||
43 | TestMatrix: | 43 | TestMatrix: |
44 | strategy: | 44 | strategy: |
45 | matrix: | 45 | matrix: |
46 | lua-version: ["5.3", "luajit"] | 46 | lua-version: ["5.4", "luajit"] |
47 | os: ["ubuntu-latest", "macos-latest"] | 47 | os: ["ubuntu-latest", "macos-latest"] |
48 | runs-on: ${{ matrix.os }} | 48 | runs-on: ${{ matrix.os }} |
49 | 49 | ||
@@ -96,7 +96,7 @@ jobs: | |||
96 | 96 | ||
97 | - uses: leafo/gh-actions-lua@v8.0.0 | 97 | - uses: leafo/gh-actions-lua@v8.0.0 |
98 | with: | 98 | with: |
99 | luaVersion: "5.3" | 99 | luaVersion: "5.4" |
100 | 100 | ||
101 | - name: Smoke Test | 101 | - name: Smoke Test |
102 | run: | | 102 | run: | |
diff --git a/appveyor.yml b/appveyor.yml index 7011c80c..b084cff5 100644 --- a/appveyor.yml +++ b/appveyor.yml | |||
@@ -9,50 +9,18 @@ environment: | |||
9 | LUAROCKS_VER: 3.0.0 | 9 | LUAROCKS_VER: 3.0.0 |
10 | 10 | ||
11 | matrix: | 11 | matrix: |
12 | # Lua 5.1 tests | 12 | # Lua 5.4 tests |
13 | - LUAV: "5.1" | 13 | - LUAV: "5.4" |
14 | LUAT: "lua" | 14 | LUAT: "lua" |
15 | COMPILER: "vs" | 15 | COMPILER: "vs" |
16 | FILES: "" | 16 | FILES: "" |
17 | EXCLUDE: "integration" | 17 | EXCLUDE: "integration" |
18 | - LUAV: "5.1" | 18 | - LUAV: "5.4" |
19 | LUAT: "lua" | 19 | LUAT: "lua" |
20 | COMPILER: "vs" | 20 | COMPILER: "vs" |
21 | FILES: "" | 21 | FILES: "" |
22 | EXCLUDE: "unit" | 22 | EXCLUDE: "unit" |
23 | - LUAV: "5.1" | 23 | - LUAV: "5.4" |
24 | LUAT: "lua" | ||
25 | COMPILER: "mingw" | ||
26 | FILES: "spec//build_spec.lua" | ||
27 | EXCLUDE: "" | ||
28 | # Lua 5.2 tests | ||
29 | - LUAV: "5.2" | ||
30 | LUAT: "lua" | ||
31 | COMPILER: "vs" | ||
32 | FILES: "" | ||
33 | EXCLUDE: "integration" | ||
34 | - LUAV: "5.2" | ||
35 | LUAT: "lua" | ||
36 | COMPILER: "vs" | ||
37 | FILES: "" | ||
38 | EXCLUDE: "unit" | ||
39 | - LUAV: "5.2" | ||
40 | LUAT: "lua" | ||
41 | COMPILER: "mingw" | ||
42 | FILES: "spec//build_spec.lua" | ||
43 | EXCLUDE: "" | ||
44 | # Lua 5.3 tests | ||
45 | - LUAV: "5.3" | ||
46 | LUAT: "lua" | ||
47 | COMPILER: "vs" | ||
48 | FILES: "" | ||
49 | EXCLUDE: "integration" | ||
50 | - LUAV: "5.3" | ||
51 | LUAT: "lua" | ||
52 | COMPILER: "vs" | ||
53 | FILES: "" | ||
54 | EXCLUDE: "unit" | ||
55 | - LUAV: "5.3" | ||
56 | LUAT: "lua" | 24 | LUAT: "lua" |
57 | COMPILER: "mingw" | 25 | COMPILER: "mingw" |
58 | FILES: "spec//build_spec.lua" | 26 | FILES: "spec//build_spec.lua" |
@@ -82,7 +50,9 @@ init: | |||
82 | - set PATH=C:\MinGW\bin;%PATH% | 50 | - set PATH=C:\MinGW\bin;%PATH% |
83 | 51 | ||
84 | before_build: | 52 | before_build: |
85 | - set PATH=C:\Python37\Scripts;%PATH% # Add directory containing 'pip' to PATH | 53 | - set PATH=C:\Python37;C:\Python37\Scripts;%PATH% # Add directory containing 'pip' to PATH |
54 | - IF NOT EXIST lua_install-%LUAV%\bin\activate.bat ( pip install --upgrade certifi ) | ||
55 | - FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "import certifi;print(certifi.where())"`) DO ( SET SSL_CERT_FILE=%%F ) | ||
86 | - IF NOT EXIST lua_install-%LUAV%\bin\activate.bat ( pip install hererocks ) | 56 | - IF NOT EXIST lua_install-%LUAV%\bin\activate.bat ( pip install hererocks ) |
87 | - IF NOT EXIST lua_install-%LUAV%\bin\activate.bat ( hererocks lua_install-%LUAV% --%LUAT% %LUAV% --luarocks latest --target=%COMPILER% ) | 57 | - IF NOT EXIST lua_install-%LUAV%\bin\activate.bat ( hererocks lua_install-%LUAV% --%LUAT% %LUAV% --luarocks latest --target=%COMPILER% ) |
88 | - call lua_install-%LUAV%\bin\activate | 58 | - call lua_install-%LUAV%\bin\activate |
@@ -101,16 +71,10 @@ after_test: | |||
101 | - cd testrun && codecov -f luacov.report.out -X gcov | 71 | - cd testrun && codecov -f luacov.report.out -X gcov |
102 | 72 | ||
103 | cache: | 73 | cache: |
104 | - lua_install-5.1 | 74 | - lua_install-5.4 |
105 | - lua_install-5.2 | ||
106 | - lua_install-5.3 | ||
107 | - lua_install-2.1 | 75 | - lua_install-2.1 |
108 | - testrun/testing_cache-5.1 | 76 | - testrun/testing_cache-5.4 |
109 | - testrun/testing_cache-5.2 | ||
110 | - testrun/testing_cache-5.3 | ||
111 | - testrun/testing_cache-2.1 | 77 | - testrun/testing_cache-2.1 |
112 | - testrun/testing_server-5.1 | 78 | - testrun/testing_server-5.4 |
113 | - testrun/testing_server-5.2 | ||
114 | - testrun/testing_server-5.3 | ||
115 | - testrun/testing_server-2.1 | 79 | - testrun/testing_server-2.1 |
116 | - testrun/binary-samples | 80 | - testrun/binary-samples |
diff --git a/binary/lua-zlib-1.2-0.rockspec b/binary/lua-zlib-1.2-0.rockspec index 4e32448f..9d3adc8f 100644 --- a/binary/lua-zlib-1.2-0.rockspec +++ b/binary/lua-zlib-1.2-0.rockspec | |||
@@ -1,7 +1,7 @@ | |||
1 | package = "lua-zlib" | 1 | package = "lua-zlib" |
2 | version = "1.2-0" | 2 | version = "1.2-0" |
3 | source = { | 3 | source = { |
4 | url = "git://github.com/brimworks/lua-zlib.git", | 4 | url = "git+https://github.com/brimworks/lua-zlib.git", |
5 | tag = "v1.2", | 5 | tag = "v1.2", |
6 | } | 6 | } |
7 | description = { | 7 | description = { |
diff --git a/spec/build_spec.lua b/spec/build_spec.lua index ba6c1a94..653f2160 100644 --- a/spec/build_spec.lua +++ b/spec/build_spec.lua | |||
@@ -22,7 +22,6 @@ local extra_rocks = { | |||
22 | "/luafilesystem-${LUAFILESYSTEM}.src.rock", | 22 | "/luafilesystem-${LUAFILESYSTEM}.src.rock", |
23 | "/luasocket-${LUASOCKET}.src.rock", | 23 | "/luasocket-${LUASOCKET}.src.rock", |
24 | "/luasocket-${LUASOCKET}.rockspec", | 24 | "/luasocket-${LUASOCKET}.rockspec", |
25 | "/stdlib-41.0.0-1.src.rock", | ||
26 | "spec/fixtures/a_rock-1.0-1.src.rock", | 25 | "spec/fixtures/a_rock-1.0-1.src.rock", |
27 | "/busted-2.0.0-1.rockspec", | 26 | "/busted-2.0.0-1.rockspec", |
28 | "/busted-2.0.rc13-0.rockspec", | 27 | "/busted-2.0.rc13-0.rockspec", |
@@ -141,11 +140,6 @@ describe("LuaRocks build #integration", function() | |||
141 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luacov/${LUACOV}/luacov-${LUACOV}.rockspec")) | 140 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/luacov/${LUACOV}/luacov-${LUACOV}.rockspec")) |
142 | end) | 141 | end) |
143 | 142 | ||
144 | it("command stdlib", function() | ||
145 | assert.is_true(run.luarocks_bool("build stdlib")) | ||
146 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/stdlib/41.0.0-1/stdlib-41.0.0-1.rockspec")) | ||
147 | end) | ||
148 | |||
149 | it("fails if the current platform is not supported", function() | 143 | it("fails if the current platform is not supported", function() |
150 | test_env.run_in_tmp(function(tmpdir) | 144 | test_env.run_in_tmp(function(tmpdir) |
151 | write_file("test-1.0-1.rockspec", [[ | 145 | write_file("test-1.0-1.rockspec", [[ |
@@ -273,13 +267,14 @@ describe("LuaRocks build #integration", function() | |||
273 | end) | 267 | end) |
274 | 268 | ||
275 | it("lmathx deps partial match", function() | 269 | it("lmathx deps partial match", function() |
276 | assert.is_true(run.luarocks_bool("build lmathx")) | ||
277 | |||
278 | if test_env.LUA_V == "5.1" or test_env.LUAJIT_V then | 270 | if test_env.LUA_V == "5.1" or test_env.LUAJIT_V then |
271 | assert.is_true(run.luarocks_bool("build lmathx")) | ||
279 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20120430.51-1/lmathx-20120430.51-1.rockspec")) | 272 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20120430.51-1/lmathx-20120430.51-1.rockspec")) |
280 | elseif test_env.LUA_V == "5.2" then | 273 | elseif test_env.LUA_V == "5.2" then |
274 | assert.is_true(run.luarocks_bool("build lmathx")) | ||
281 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20120430.52-1/lmathx-20120430.52-1.rockspec")) | 275 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20120430.52-1/lmathx-20120430.52-1.rockspec")) |
282 | elseif test_env.LUA_V == "5.3" then | 276 | elseif test_env.LUA_V == "5.3" then |
277 | assert.is_true(run.luarocks_bool("build lmathx")) | ||
283 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20150505-1/lmathx-20150505-1.rockspec")) | 278 | assert.is.truthy(lfs.attributes(testing_paths.testing_sys_rocks .. "/lmathx/20150505-1/lmathx-20150505-1.rockspec")) |
284 | end | 279 | end |
285 | end) | 280 | end) |
diff --git a/spec/fixtures/a_repo/manifest b/spec/fixtures/a_repo/manifest index 5ab87d25..a5f770a1 100644 --- a/spec/fixtures/a_repo/manifest +++ b/spec/fixtures/a_repo/manifest | |||
@@ -68,5 +68,23 @@ repository = { | |||
68 | arch = "src" | 68 | arch = "src" |
69 | } | 69 | } |
70 | } | 70 | } |
71 | }, | ||
72 | non_lua_file = { | ||
73 | ["1.0-1"] = { | ||
74 | { | ||
75 | arch = "rockspec" | ||
76 | }, | ||
77 | { | ||
78 | arch = "src" | ||
79 | } | ||
80 | }, | ||
81 | ["1.0-2"] = { | ||
82 | { | ||
83 | arch = "rockspec" | ||
84 | }, | ||
85 | { | ||
86 | arch = "src" | ||
87 | } | ||
88 | } | ||
71 | } | 89 | } |
72 | } | 90 | } |
diff --git a/spec/fixtures/a_repo/manifest-5.1 b/spec/fixtures/a_repo/manifest-5.1 index 5ab87d25..a5f770a1 100644 --- a/spec/fixtures/a_repo/manifest-5.1 +++ b/spec/fixtures/a_repo/manifest-5.1 | |||
@@ -68,5 +68,23 @@ repository = { | |||
68 | arch = "src" | 68 | arch = "src" |
69 | } | 69 | } |
70 | } | 70 | } |
71 | }, | ||
72 | non_lua_file = { | ||
73 | ["1.0-1"] = { | ||
74 | { | ||
75 | arch = "rockspec" | ||
76 | }, | ||
77 | { | ||
78 | arch = "src" | ||
79 | } | ||
80 | }, | ||
81 | ["1.0-2"] = { | ||
82 | { | ||
83 | arch = "rockspec" | ||
84 | }, | ||
85 | { | ||
86 | arch = "src" | ||
87 | } | ||
88 | } | ||
71 | } | 89 | } |
72 | } | 90 | } |
diff --git a/spec/fixtures/a_repo/manifest-5.1.zip b/spec/fixtures/a_repo/manifest-5.1.zip index 65e316df..e63d6f1f 100644 --- a/spec/fixtures/a_repo/manifest-5.1.zip +++ b/spec/fixtures/a_repo/manifest-5.1.zip | |||
Binary files differ | |||
diff --git a/spec/fixtures/a_repo/manifest-5.2 b/spec/fixtures/a_repo/manifest-5.2 index 5ab87d25..a5f770a1 100644 --- a/spec/fixtures/a_repo/manifest-5.2 +++ b/spec/fixtures/a_repo/manifest-5.2 | |||
@@ -68,5 +68,23 @@ repository = { | |||
68 | arch = "src" | 68 | arch = "src" |
69 | } | 69 | } |
70 | } | 70 | } |
71 | }, | ||
72 | non_lua_file = { | ||
73 | ["1.0-1"] = { | ||
74 | { | ||
75 | arch = "rockspec" | ||
76 | }, | ||
77 | { | ||
78 | arch = "src" | ||
79 | } | ||
80 | }, | ||
81 | ["1.0-2"] = { | ||
82 | { | ||
83 | arch = "rockspec" | ||
84 | }, | ||
85 | { | ||
86 | arch = "src" | ||
87 | } | ||
88 | } | ||
71 | } | 89 | } |
72 | } | 90 | } |
diff --git a/spec/fixtures/a_repo/manifest-5.2.zip b/spec/fixtures/a_repo/manifest-5.2.zip index b4334a65..cec28c07 100644 --- a/spec/fixtures/a_repo/manifest-5.2.zip +++ b/spec/fixtures/a_repo/manifest-5.2.zip | |||
Binary files differ | |||
diff --git a/spec/fixtures/a_repo/manifest-5.3 b/spec/fixtures/a_repo/manifest-5.3 index 5ab87d25..a5f770a1 100644 --- a/spec/fixtures/a_repo/manifest-5.3 +++ b/spec/fixtures/a_repo/manifest-5.3 | |||
@@ -68,5 +68,23 @@ repository = { | |||
68 | arch = "src" | 68 | arch = "src" |
69 | } | 69 | } |
70 | } | 70 | } |
71 | }, | ||
72 | non_lua_file = { | ||
73 | ["1.0-1"] = { | ||
74 | { | ||
75 | arch = "rockspec" | ||
76 | }, | ||
77 | { | ||
78 | arch = "src" | ||
79 | } | ||
80 | }, | ||
81 | ["1.0-2"] = { | ||
82 | { | ||
83 | arch = "rockspec" | ||
84 | }, | ||
85 | { | ||
86 | arch = "src" | ||
87 | } | ||
88 | } | ||
71 | } | 89 | } |
72 | } | 90 | } |
diff --git a/spec/fixtures/a_repo/manifest-5.3.zip b/spec/fixtures/a_repo/manifest-5.3.zip index bab15712..23df5c30 100644 --- a/spec/fixtures/a_repo/manifest-5.3.zip +++ b/spec/fixtures/a_repo/manifest-5.3.zip | |||
Binary files differ | |||
diff --git a/spec/fixtures/a_repo/manifest-5.4 b/spec/fixtures/a_repo/manifest-5.4 new file mode 100644 index 00000000..a5f770a1 --- /dev/null +++ b/spec/fixtures/a_repo/manifest-5.4 | |||
@@ -0,0 +1,90 @@ | |||
1 | commands = {} | ||
2 | modules = {} | ||
3 | repository = { | ||
4 | a_build_dep = { | ||
5 | ["1.0-1"] = { | ||
6 | { | ||
7 | arch = "src" | ||
8 | }, | ||
9 | { | ||
10 | arch = "rockspec" | ||
11 | } | ||
12 | } | ||
13 | }, | ||
14 | a_rock = { | ||
15 | ["1.0-1"] = { | ||
16 | { | ||
17 | arch = "src" | ||
18 | }, | ||
19 | { | ||
20 | arch = "rockspec" | ||
21 | } | ||
22 | }, | ||
23 | ["2.0-1"] = { | ||
24 | { | ||
25 | arch = "src" | ||
26 | } | ||
27 | } | ||
28 | }, | ||
29 | busted_project = { | ||
30 | ["0.1-1"] = { | ||
31 | { | ||
32 | arch = "src" | ||
33 | }, | ||
34 | { | ||
35 | arch = "rockspec" | ||
36 | } | ||
37 | } | ||
38 | }, | ||
39 | has_another_namespaced_dep = { | ||
40 | ["1.0-1"] = { | ||
41 | { | ||
42 | arch = "rockspec" | ||
43 | }, | ||
44 | { | ||
45 | arch = "src" | ||
46 | } | ||
47 | } | ||
48 | }, | ||
49 | has_build_dep = { | ||
50 | ["1.0-1"] = { | ||
51 | { | ||
52 | arch = "rockspec" | ||
53 | }, | ||
54 | { | ||
55 | arch = "src" | ||
56 | }, | ||
57 | { | ||
58 | arch = "all" | ||
59 | } | ||
60 | } | ||
61 | }, | ||
62 | has_namespaced_dep = { | ||
63 | ["1.0-1"] = { | ||
64 | { | ||
65 | arch = "rockspec" | ||
66 | }, | ||
67 | { | ||
68 | arch = "src" | ||
69 | } | ||
70 | } | ||
71 | }, | ||
72 | non_lua_file = { | ||
73 | ["1.0-1"] = { | ||
74 | { | ||
75 | arch = "rockspec" | ||
76 | }, | ||
77 | { | ||
78 | arch = "src" | ||
79 | } | ||
80 | }, | ||
81 | ["1.0-2"] = { | ||
82 | { | ||
83 | arch = "rockspec" | ||
84 | }, | ||
85 | { | ||
86 | arch = "src" | ||
87 | } | ||
88 | } | ||
89 | } | ||
90 | } | ||
diff --git a/spec/fixtures/a_repo/manifest-5.4.zip b/spec/fixtures/a_repo/manifest-5.4.zip new file mode 100644 index 00000000..14b5621e --- /dev/null +++ b/spec/fixtures/a_repo/manifest-5.4.zip | |||
Binary files differ | |||
diff --git a/spec/fixtures/a_repo/manifests/a_user/manifest-5.4 b/spec/fixtures/a_repo/manifests/a_user/manifest-5.4 new file mode 100644 index 00000000..74b0c618 --- /dev/null +++ b/spec/fixtures/a_repo/manifests/a_user/manifest-5.4 | |||
@@ -0,0 +1,14 @@ | |||
1 | commands = {} | ||
2 | modules = {} | ||
3 | repository = { | ||
4 | a_rock = { | ||
5 | ["2.0-1"] = { | ||
6 | { | ||
7 | arch = "rockspec" | ||
8 | }, | ||
9 | { | ||
10 | arch = "src" | ||
11 | } | ||
12 | } | ||
13 | } | ||
14 | } | ||
diff --git a/spec/fixtures/a_repo/manifests/another_user/manifest-5.4 b/spec/fixtures/a_repo/manifests/another_user/manifest-5.4 new file mode 100644 index 00000000..185aed08 --- /dev/null +++ b/spec/fixtures/a_repo/manifests/another_user/manifest-5.4 | |||
@@ -0,0 +1,14 @@ | |||
1 | commands = {} | ||
2 | modules = {} | ||
3 | repository = { | ||
4 | a_rock = { | ||
5 | ["3.0-1"] = { | ||
6 | { | ||
7 | arch = "src" | ||
8 | }, | ||
9 | { | ||
10 | arch = "rockspec" | ||
11 | } | ||
12 | } | ||
13 | } | ||
14 | } | ||
diff --git a/spec/init_spec.lua b/spec/init_spec.lua index 3bde313a..dadeb300 100644 --- a/spec/init_spec.lua +++ b/spec/init_spec.lua | |||
@@ -92,13 +92,13 @@ describe("luarocks init #integration", function() | |||
92 | lfs.mkdir(myproject) | 92 | lfs.mkdir(myproject) |
93 | lfs.chdir(myproject) | 93 | lfs.chdir(myproject) |
94 | 94 | ||
95 | assert(run.luarocks("init --lua-versions=5.1,5.2,5.3")) | 95 | assert(run.luarocks("init --lua-versions=5.1,5.2,5.3,5.4")) |
96 | local rockspec_name = myproject .. "/myproject-dev-1.rockspec" | 96 | local rockspec_name = myproject .. "/myproject-dev-1.rockspec" |
97 | assert.truthy(lfs.attributes(rockspec_name)) | 97 | assert.truthy(lfs.attributes(rockspec_name)) |
98 | local fd = assert(io.open(rockspec_name, "rb")) | 98 | local fd = assert(io.open(rockspec_name, "rb")) |
99 | local data = fd:read("*a") | 99 | local data = fd:read("*a") |
100 | fd:close() | 100 | fd:close() |
101 | assert.truthy(data:find("lua >= 5.1, < 5.4", 1, true)) | 101 | assert.truthy(data:find("lua >= 5.1, < 5.5", 1, true)) |
102 | end, finally) | 102 | end, finally) |
103 | end) | 103 | end) |
104 | 104 | ||
diff --git a/spec/install_spec.lua b/spec/install_spec.lua index 1154e9b9..c3aa0064 100644 --- a/spec/install_spec.lua +++ b/spec/install_spec.lua | |||
@@ -10,8 +10,8 @@ local V = test_env.V | |||
10 | test_env.unload_luarocks() | 10 | test_env.unload_luarocks() |
11 | 11 | ||
12 | local extra_rocks = { | 12 | local extra_rocks = { |
13 | "/cprint-0.1-2.src.rock", | 13 | "/cprint-${CPRINT}.src.rock", |
14 | "/cprint-0.1-2.rockspec", | 14 | "/cprint-${CPRINT}.rockspec", |
15 | "/lpeg-${LPEG}.src.rock", | 15 | "/lpeg-${LPEG}.src.rock", |
16 | "/luassert-1.7.0-1.src.rock", | 16 | "/luassert-1.7.0-1.src.rock", |
17 | "/luasocket-${LUASOCKET}.src.rock", | 17 | "/luasocket-${LUASOCKET}.src.rock", |
@@ -248,8 +248,8 @@ describe("luarocks install #integration", function() | |||
248 | 248 | ||
249 | it("binary rock of cprint", function() | 249 | it("binary rock of cprint", function() |
250 | assert.is_true(run.luarocks_bool("build --pack-binary-rock cprint")) | 250 | assert.is_true(run.luarocks_bool("build --pack-binary-rock cprint")) |
251 | assert.is_true(run.luarocks_bool("install cprint-0.1-2." .. test_env.platform .. ".rock")) | 251 | assert.is_true(run.luarocks_bool("install cprint-${CPRINT}." .. test_env.platform .. ".rock")) |
252 | assert.is_true(os.remove("cprint-0.1-2." .. test_env.platform .. ".rock")) | 252 | assert.is_true(os.remove("cprint-${CPRINT}." .. test_env.platform .. ".rock")) |
253 | end) | 253 | end) |
254 | 254 | ||
255 | it("accepts --no-manifest flag", function() | 255 | it("accepts --no-manifest flag", function() |
diff --git a/spec/test_spec.lua b/spec/test_spec.lua index 21844d63..33643097 100644 --- a/spec/test_spec.lua +++ b/spec/test_spec.lua | |||
@@ -12,7 +12,7 @@ local extra_rocks = { | |||
12 | "/lua_cliargs-3.0-1.src.rock", | 12 | "/lua_cliargs-3.0-1.src.rock", |
13 | "/luafilesystem-${LUAFILESYSTEM}.src.rock", | 13 | "/luafilesystem-${LUAFILESYSTEM}.src.rock", |
14 | "/luasystem-0.2.1-0.src.rock", | 14 | "/luasystem-0.2.1-0.src.rock", |
15 | "/dkjson-2.5-2.src.rock", | 15 | "/dkjson-${DKJSON}.src.rock", |
16 | "/say-1.3-1.rockspec", | 16 | "/say-1.3-1.rockspec", |
17 | "/luassert-1.8.0-0.rockspec", | 17 | "/luassert-1.8.0-0.rockspec", |
18 | "/lua-term-0.7-1.rockspec", | 18 | "/lua-term-0.7-1.rockspec", |
diff --git a/spec/unpack_spec.lua b/spec/unpack_spec.lua index 9b1e2b9a..00d6781f 100644 --- a/spec/unpack_spec.lua +++ b/spec/unpack_spec.lua | |||
@@ -1,12 +1,13 @@ | |||
1 | local test_env = require("spec.util.test_env") | 1 | local test_env = require("spec.util.test_env") |
2 | local lfs = require("lfs") | ||
2 | local run = test_env.run | 3 | local run = test_env.run |
3 | local testing_paths = test_env.testing_paths | 4 | local testing_paths = test_env.testing_paths |
4 | 5 | ||
5 | test_env.unload_luarocks() | 6 | test_env.unload_luarocks() |
6 | 7 | ||
7 | local extra_rocks = { | 8 | local extra_rocks = { |
8 | "/cprint-0.1-2.src.rock", | 9 | "/cprint-${CPRINT}.src.rock", |
9 | "/cprint-0.1-2.rockspec", | 10 | "/cprint-${CPRINT}.rockspec", |
10 | "/luazip-1.2.4-1.rockspec" | 11 | "/luazip-1.2.4-1.rockspec" |
11 | } | 12 | } |
12 | 13 | ||
@@ -33,22 +34,22 @@ describe("luarocks unpack #integration", function() | |||
33 | describe("more complex tests", function() | 34 | describe("more complex tests", function() |
34 | it("download", function() | 35 | it("download", function() |
35 | assert.is_true(run.luarocks_bool("unpack cprint")) | 36 | assert.is_true(run.luarocks_bool("unpack cprint")) |
36 | test_env.remove_dir("cprint-0.1-2") | 37 | test_env.remove_dir("cprint-${CPRINT}") |
37 | end) | 38 | end) |
38 | 39 | ||
39 | it("src", function() | 40 | it("src", function() |
40 | assert.is_true(run.luarocks_bool("download --source cprint")) | 41 | assert.is_true(run.luarocks_bool("download --source cprint")) |
41 | assert.is_true(run.luarocks_bool("unpack cprint-0.1-2.src.rock")) | 42 | assert.is_true(run.luarocks_bool("unpack cprint-${CPRINT}.src.rock")) |
42 | os.remove("cprint-0.1-2.src.rock") | 43 | os.remove("cprint-${CPRINT}.src.rock") |
43 | test_env.remove_dir("cprint-0.1-2") | 44 | test_env.remove_dir("cprint-${CPRINT}") |
44 | end) | 45 | end) |
45 | 46 | ||
46 | it("src", function() | 47 | it("src", function() |
47 | assert.is_true(run.luarocks_bool("download --rockspec cprint")) | 48 | assert.is_true(run.luarocks_bool("download --rockspec cprint")) |
48 | assert.is_true(run.luarocks_bool("unpack cprint-0.1-2.rockspec")) | 49 | assert.is_true(run.luarocks_bool("unpack cprint-${CPRINT}.rockspec")) |
49 | os.remove("cprint-0.1-2.rockspec") | 50 | os.remove("cprint-${CPRINT}.rockspec") |
50 | os.remove("lua-cprint") | 51 | os.remove("lua-cprint") |
51 | test_env.remove_dir("cprint-0.1-2") | 52 | test_env.remove_dir("cprint-${CPRINT}") |
52 | end) | 53 | end) |
53 | 54 | ||
54 | -- #595 luarocks unpack of a git:// rockspec fails to copy the rockspec | 55 | -- #595 luarocks unpack of a git:// rockspec fails to copy the rockspec |
@@ -62,9 +63,9 @@ describe("luarocks unpack #integration", function() | |||
62 | it("binary", function() | 63 | it("binary", function() |
63 | assert.is_true(run.luarocks_bool("build cprint")) | 64 | assert.is_true(run.luarocks_bool("build cprint")) |
64 | assert.is_true(run.luarocks_bool("pack cprint")) | 65 | assert.is_true(run.luarocks_bool("pack cprint")) |
65 | assert.is_true(run.luarocks_bool("unpack cprint-0.1-2." .. test_env.platform .. ".rock")) | 66 | assert.is_true(run.luarocks_bool("unpack cprint-${CPRINT}." .. test_env.platform .. ".rock")) |
66 | test_env.remove_dir("cprint-0.1-2") | 67 | test_env.remove_dir("cprint-${CPRINT}") |
67 | os.remove("cprint-0.1-2." .. test_env.platform .. ".rock") | 68 | os.remove("cprint-${CPRINT}." .. test_env.platform .. ".rock") |
68 | end) | 69 | end) |
69 | end) | 70 | end) |
70 | end) | 71 | end) |
diff --git a/spec/util/test_env.lua b/spec/util/test_env.lua index 6a466bae..c32e9978 100644 --- a/spec/util/test_env.lua +++ b/spec/util/test_env.lua | |||
@@ -446,7 +446,7 @@ local function download_rocks(urls, save_path) | |||
446 | else | 446 | else |
447 | -- check if already downloaded | 447 | -- check if already downloaded |
448 | if not test_env.exists(save_path .. "/" .. url) then | 448 | if not test_env.exists(save_path .. "/" .. url) then |
449 | table.insert(to_download, luarocks_repo .. url) | 449 | table.insert(to_download, ((luarocks_repo .. url):gsub("org//", "org/"))) |
450 | end | 450 | end |
451 | end | 451 | end |
452 | end | 452 | end |
@@ -972,7 +972,7 @@ local function prepare_mock_server_binary_rocks() | |||
972 | "wsapi-1.6.1-1.src.rock", | 972 | "wsapi-1.6.1-1.src.rock", |
973 | "rings-1.3.0-1.src.rock", | 973 | "rings-1.3.0-1.src.rock", |
974 | "wsapi-xavante-1.6.1-1.src.rock", | 974 | "wsapi-xavante-1.6.1-1.src.rock", |
975 | "dkjson-2.5-2.src.rock", | 975 | "dkjson-${DKJSON}.src.rock", |
976 | "restserver-0.1-1.src.rock", | 976 | "restserver-0.1-1.src.rock", |
977 | "restserver-xavante-0.2-1.src.rock", | 977 | "restserver-xavante-0.2-1.src.rock", |
978 | } | 978 | } |
@@ -1019,9 +1019,8 @@ function test_env.main() | |||
1019 | table.insert(urls, "/luasocket-${LUASOCKET}.src.rock") | 1019 | table.insert(urls, "/luasocket-${LUASOCKET}.src.rock") |
1020 | table.insert(urls, "/luasocket-${LUASOCKET}.rockspec") | 1020 | table.insert(urls, "/luasocket-${LUASOCKET}.rockspec") |
1021 | table.insert(urls, "/md5-1.2-1.src.rock") | 1021 | table.insert(urls, "/md5-1.2-1.src.rock") |
1022 | --table.insert(urls, "/lzlib-0.4.1.53-1.src.rock") | 1022 | table.insert(urls, "/manifests/hisham/lua-zlib-1.2-0.src.rock") |
1023 | table.insert(urls, "/lua-zlib-1.2-0.src.rock") | 1023 | table.insert(urls, "/manifests/hisham/lua-bz2-0.2.1.1-1.src.rock") |
1024 | table.insert(urls, "/lua-bz2-0.1.0-1.src.rock") | ||
1025 | rocks = {"luafilesystem", "luasocket", "md5", "lua-zlib", "lua-bz2"} | 1024 | rocks = {"luafilesystem", "luasocket", "md5", "lua-zlib", "lua-bz2"} |
1026 | if test_env.TEST_TARGET_OS ~= "windows" then | 1025 | if test_env.TEST_TARGET_OS ~= "windows" then |
1027 | if test_env.lua_version == "5.1" then | 1026 | if test_env.lua_version == "5.1" then |
diff --git a/spec/util/versions.lua b/spec/util/versions.lua index b0d5c453..0d3b8796 100644 --- a/spec/util/versions.lua +++ b/spec/util/versions.lua | |||
@@ -2,7 +2,9 @@ return { | |||
2 | binaryheap = "0.4-1", -- dependency for copas | 2 | binaryheap = "0.4-1", -- dependency for copas |
3 | bit32 = "5.3.5.1-1", -- dependency for luaposix on Lua 5.1 | 3 | bit32 = "5.3.5.1-1", -- dependency for luaposix on Lua 5.1 |
4 | cluacov = "0.1.2-1", | 4 | cluacov = "0.1.2-1", |
5 | copas = "3.0.0-1", | 5 | copas = "3.0.0-2", |
6 | cprint = "0.2-1", | ||
7 | dkjson = "2.6-1", | ||
6 | lpeg = "1.0.0-1", | 8 | lpeg = "1.0.0-1", |
7 | luacov = "0.15.0-1", | 9 | luacov = "0.15.0-1", |
8 | luafilesystem = "1.8.0-1", | 10 | luafilesystem = "1.8.0-1", |