diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2024-08-29 18:35:23 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-10-21 13:30:51 -0300 |
| commit | 74b8b0cbadf434516ab5c91d73c02ec170215b7b (patch) | |
| tree | d5c5843a4a286b23c6499b515de01759ba52a5c5 | |
| parent | deb9cadc7012262eb0eaf4cb58b654b62106d6de (diff) | |
| download | luarocks-74b8b0cbadf434516ab5c91d73c02ec170215b7b.tar.gz luarocks-74b8b0cbadf434516ab5c91d73c02ec170215b7b.tar.bz2 luarocks-74b8b0cbadf434516ab5c91d73c02ec170215b7b.zip | |
tests: some testing environment cleanups
| -rw-r--r-- | spec/unit/build_spec.lua | 3 | ||||
| -rw-r--r-- | spec/upload_spec.lua | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/spec/unit/build_spec.lua b/spec/unit/build_spec.lua index e8f13940..7993cf9b 100644 --- a/spec/unit/build_spec.lua +++ b/spec/unit/build_spec.lua | |||
| @@ -307,10 +307,13 @@ describe("LuaRocks build #unit", function() | |||
| 307 | else | 307 | else |
| 308 | os.execute("cl " .. fdir .. "\\fixturedep.c /link /export:fixturedep_fn /out:" .. fdir .. "\\fixturedep.dll /implib:" .. fdir .. "\\fixturedep.lib") | 308 | os.execute("cl " .. fdir .. "\\fixturedep.c /link /export:fixturedep_fn /out:" .. fdir .. "\\fixturedep.dll /implib:" .. fdir .. "\\fixturedep.lib") |
| 309 | end | 309 | end |
| 310 | finally(function() os.remove(fdir .. "\\libfixturedep.dll") end) | ||
| 310 | elseif test_env.TEST_TARGET_OS == "linux" then | 311 | elseif test_env.TEST_TARGET_OS == "linux" then |
| 311 | os.execute("gcc -shared -o " .. fdir .. "/libfixturedep.so " .. fdir .. "/fixturedep.c") | 312 | os.execute("gcc -shared -o " .. fdir .. "/libfixturedep.so " .. fdir .. "/fixturedep.c") |
| 313 | finally(function() os.remove(fdir .. "/libfixturedep.so") end) | ||
| 312 | elseif test_env.TEST_TARGET_OS == "osx" then | 314 | elseif test_env.TEST_TARGET_OS == "osx" then |
| 313 | os.execute("cc -dynamiclib -o " .. fdir .. "/libfixturedep.dylib " .. fdir .. "/fixturedep.c") | 315 | os.execute("cc -dynamiclib -o " .. fdir .. "/libfixturedep.dylib " .. fdir .. "/fixturedep.c") |
| 316 | finally(function() os.remove(fdir .. "/libfixturedep.dylib") end) | ||
| 314 | end | 317 | end |
| 315 | 318 | ||
| 316 | local rockspec = { | 319 | local rockspec = { |
diff --git a/spec/upload_spec.lua b/spec/upload_spec.lua index cc0b606c..5f33c8d5 100644 --- a/spec/upload_spec.lua +++ b/spec/upload_spec.lua | |||
| @@ -43,8 +43,12 @@ describe("luarocks upload #integration", function() | |||
| 43 | end) | 43 | end) |
| 44 | 44 | ||
| 45 | it("#gpg rockspec with --sign", function() | 45 | it("#gpg rockspec with --sign", function() |
| 46 | os.remove(testing_paths.fixtures_dir .. "/a_rock-1.0-1.rockspec.asc") | 46 | local function cleanup() |
| 47 | os.remove(testing_paths.testrun_dir .. "/a_rock-1.0-1.src.rock.asc") | 47 | os.remove(testing_paths.fixtures_dir .. "/a_rock-1.0-1.rockspec.asc") |
| 48 | os.remove(testing_paths.testrun_dir .. "/a_rock-1.0-1.src.rock.asc") | ||
| 49 | end | ||
| 50 | cleanup() | ||
| 51 | finally(cleanup) | ||
| 48 | print(run.luarocks("upload " .. testing_paths.fixtures_dir .. "/a_rock-1.0-1.rockspec " .. test_env.openssl_dirs .. " --api-key=123 --sign", {LUAROCKS_CONFIG = testing_paths.testrun_dir .. "/luarocks_site.lua"})) | 52 | print(run.luarocks("upload " .. testing_paths.fixtures_dir .. "/a_rock-1.0-1.rockspec " .. test_env.openssl_dirs .. " --api-key=123 --sign", {LUAROCKS_CONFIG = testing_paths.testrun_dir .. "/luarocks_site.lua"})) |
| 49 | end) | 53 | end) |
| 50 | 54 | ||
