summaryrefslogtreecommitdiff
path: root/tests/actions/addon/test.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-08-16 09:20:21 +0800
committerruki <[email protected]>2026-08-16 09:20:21 +0800
commit92ca9b155cd84e1b60ab6ea885f37c134df878d9 (patch)
tree50d2584c12504d46c9b1bae6d2aa3228b3e0e2ef /tests/actions/addon/test.lua
parentc9c7421e49755689a49af2ef70f4b895ab80d321 (diff)
fix test
Diffstat (limited to 'tests/actions/addon/test.lua')
-rw-r--r--tests/actions/addon/test.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/actions/addon/test.lua b/tests/actions/addon/test.lua
index 74b733b21..e91c1b23f 100644
--- a/tests/actions/addon/test.lua
+++ b/tests/actions/addon/test.lua
@@ -46,6 +46,15 @@ end
--
-- @note the recipes only point at the fixtures with `set_sourcedir`, we need not generate any payload
function _with_repo(recipes, func)
+
+ -- @note installing from a repository goes through the package manager, and it always
+ -- needs git, which cannot be installed on the hosts without a package manager,
+ -- e.g. dragonflybsd
+ if not find_program("git") then
+ print("git not found, we skip the repository tests!")
+ return
+ end
+
local suffix = path.filename(os.tmpfile()):gsub("[^%w]", "")
local reponame = "addon-test-repo-" .. suffix
local repodir = os.tmpfile() .. ".addon-repo"