diff options
| author | ruki <[email protected]> | 2021-03-25 22:46:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-03-25 22:46:45 +0800 |
| commit | df6916d52a29ce6b66ad913016c90f8c0e4cbebb (patch) | |
| tree | a33d130ecf8ff634544261d80c7d417839653aa1 /xmake/modules/private/action/require/impl/actions/test.lua | |
| parent | a08f25c000bf50f0530a2fc56406a414d4da04b1 (diff) | |
remove unused package api
Diffstat (limited to 'xmake/modules/private/action/require/impl/actions/test.lua')
| -rw-r--r-- | xmake/modules/private/action/require/impl/actions/test.lua | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/xmake/modules/private/action/require/impl/actions/test.lua b/xmake/modules/private/action/require/impl/actions/test.lua index f29910f2a..b156caef9 100644 --- a/xmake/modules/private/action/require/impl/actions/test.lua +++ b/xmake/modules/private/action/require/impl/actions/test.lua @@ -25,14 +25,6 @@ import("private.action.require.impl.utils.filter") -- test the given package function main(package) - -- the package scripts - local scripts = - { - package:script("test_before") - , package:script("test") - , package:script("test_after") - } - -- enter the test directory local testdir = path.join(os.tmpdir(), "pkgtest", package:name(), package:version_str() or "latest") if os.isdir(testdir) then @@ -44,11 +36,9 @@ function main(package) local oldir = os.cd(testdir) -- test it - for i = 1, 3 do - local script = scripts[i] - if script ~= nil then - filter.call(script, package) - end + local script = package:script("test") + if script ~= nil then + filter.call(script, package) end -- restore the current directory |
