diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-29 00:46:06 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-29 15:46:16 +0000 |
commit | f76b7a2b13e411df2e696146bb0a6396781acd92 (patch) | |
tree | 38ed32f81f05f6eacd03f36eacd5341e7b1d17dd /spec/unit | |
parent | 0ca8c460e867356342180bb625760ed9201a5503 (diff) | |
download | luarocks-f76b7a2b13e411df2e696146bb0a6396781acd92.tar.gz luarocks-f76b7a2b13e411df2e696146bb0a6396781acd92.tar.bz2 luarocks-f76b7a2b13e411df2e696146bb0a6396781acd92.zip |
tests: speed up and simplify
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/dir_spec.lua | 2 | ||||
-rw-r--r-- | spec/unit/fetch_spec.lua | 2 | ||||
-rw-r--r-- | spec/unit/fun_spec.lua | 2 | ||||
-rw-r--r-- | spec/unit/rockspecs_spec.lua | 2 | ||||
-rw-r--r-- | spec/unit/sysdetect_spec.lua | 10 | ||||
-rw-r--r-- | spec/unit/util_spec.lua | 2 |
6 files changed, 12 insertions, 8 deletions
diff --git a/spec/unit/dir_spec.lua b/spec/unit/dir_spec.lua index da5d6389..55dd6e0e 100644 --- a/spec/unit/dir_spec.lua +++ b/spec/unit/dir_spec.lua | |||
@@ -8,7 +8,7 @@ local dir = require("luarocks.dir") | |||
8 | describe("luarocks.dir #unit", function() | 8 | describe("luarocks.dir #unit", function() |
9 | local runner | 9 | local runner |
10 | 10 | ||
11 | setup(function() | 11 | lazy_setup(function() |
12 | runner = require("luacov.runner") | 12 | runner = require("luacov.runner") |
13 | runner.init(testing_paths.testrun_dir .. "/luacov.config") | 13 | runner.init(testing_paths.testrun_dir .. "/luacov.config") |
14 | end) | 14 | end) |
diff --git a/spec/unit/fetch_spec.lua b/spec/unit/fetch_spec.lua index 4fc01d80..bea50d78 100644 --- a/spec/unit/fetch_spec.lua +++ b/spec/unit/fetch_spec.lua | |||
@@ -20,7 +20,7 @@ describe("luarocks fetch #unit", function() | |||
20 | 20 | ||
21 | local runner | 21 | local runner |
22 | 22 | ||
23 | setup(function() | 23 | lazy_setup(function() |
24 | cfg.init() | 24 | cfg.init() |
25 | fs.init() | 25 | fs.init() |
26 | 26 | ||
diff --git a/spec/unit/fun_spec.lua b/spec/unit/fun_spec.lua index d7db1362..bffb60d7 100644 --- a/spec/unit/fun_spec.lua +++ b/spec/unit/fun_spec.lua | |||
@@ -6,7 +6,7 @@ local fun = require("luarocks.fun") | |||
6 | describe("luarocks.fun #unit", function() | 6 | describe("luarocks.fun #unit", function() |
7 | local runner | 7 | local runner |
8 | 8 | ||
9 | setup(function() | 9 | lazy_setup(function() |
10 | runner = require("luacov.runner") | 10 | runner = require("luacov.runner") |
11 | runner.init(testing_paths.testrun_dir .. "/luacov.config") | 11 | runner.init(testing_paths.testrun_dir .. "/luacov.config") |
12 | end) | 12 | end) |
diff --git a/spec/unit/rockspecs_spec.lua b/spec/unit/rockspecs_spec.lua index 5b0573fe..7eb033c8 100644 --- a/spec/unit/rockspecs_spec.lua +++ b/spec/unit/rockspecs_spec.lua | |||
@@ -6,7 +6,7 @@ local lfs = require("lfs") | |||
6 | 6 | ||
7 | describe("luarocks.rockspecs #unit", function() | 7 | describe("luarocks.rockspecs #unit", function() |
8 | 8 | ||
9 | setup(function() | 9 | lazy_setup(function() |
10 | cfg.init() | 10 | cfg.init() |
11 | end) | 11 | end) |
12 | 12 | ||
diff --git a/spec/unit/sysdetect_spec.lua b/spec/unit/sysdetect_spec.lua index 6ec6f6b6..d3b16955 100644 --- a/spec/unit/sysdetect_spec.lua +++ b/spec/unit/sysdetect_spec.lua | |||
@@ -4,9 +4,13 @@ local lfs = require("lfs") | |||
4 | 4 | ||
5 | describe("luarocks.core.sysdetect #unix #unit", function() | 5 | describe("luarocks.core.sysdetect #unix #unit", function() |
6 | 6 | ||
7 | setup(function() | 7 | lazy_setup(function() |
8 | os.execute("[ -e binary-samples ] || git clone --depth=1 https://github.com/hishamhm/binary-samples") | 8 | os.execute([=[ |
9 | os.execute("cd binary-samples && git pull") | 9 | [ -e binary-samples ] || { |
10 | git clone --depth=1 https://github.com/hishamhm/binary-samples | ||
11 | ( cd binary-samples && git pull ) | ||
12 | } | ||
13 | ]=]) | ||
10 | end) | 14 | end) |
11 | 15 | ||
12 | local files = { | 16 | local files = { |
diff --git a/spec/unit/util_spec.lua b/spec/unit/util_spec.lua index bb427b3e..8b234b2e 100644 --- a/spec/unit/util_spec.lua +++ b/spec/unit/util_spec.lua | |||
@@ -8,7 +8,7 @@ local core_util = require("luarocks.core.util") | |||
8 | describe("luarocks.util #unit", function() | 8 | describe("luarocks.util #unit", function() |
9 | local runner | 9 | local runner |
10 | 10 | ||
11 | setup(function() | 11 | lazy_setup(function() |
12 | runner = require("luacov.runner") | 12 | runner = require("luacov.runner") |
13 | runner.init(testing_paths.testrun_dir .. "/luacov.config") | 13 | runner.init(testing_paths.testrun_dir .. "/luacov.config") |
14 | end) | 14 | end) |