add shallow arg to test.lua

pull/18/head
ruki 6 years ago
parent 064a91a7a9
commit a4404c8df5
No known key found for this signature in database
GPG Key ID: 33341DF9719963FA
  1. 2
      packages/p/python2/xmake.lua
  2. 18
      scripts/test.lua

@ -60,7 +60,7 @@ package("python2")
local version = package:version()
local envs = {PYTHONPATH = package:installdir("lib", "python" .. version:major() .. "." .. version:minor(), "site-packages")}
package:addenv("PYTHONPATH", envs.PYTHONPATH)
-- install resources
local resources =
{

@ -6,13 +6,14 @@ import("packages", {alias = "get_packages"})
-- the options
local options =
{
{'v', "verbose", "k", nil, "Enable verbose information." }
, {'D', "diagnosis", "k", nil, "Enable diagnosis information." }
, {'p', "plat", "kv", nil, "Set the given platform." }
, {'a', "arch", "kv", nil, "Set the given architecture." }
, {nil, "ndk", "kv", nil, "Set the android NDK directory."}
, {nil, "mingw", "kv", nil, "Set the MingW directory." }
, {nil, "packages", "vs", nil, "The package list." }
{'v', "verbose", "k", nil, "Enable verbose information." }
, {'D', "diagnosis", "k", nil, "Enable diagnosis information." }
, {nil, "shallow", "k", nil, "Only install the root packages." }
, {'p', "plat", "kv", nil, "Set the given platform." }
, {'a', "arch", "kv", nil, "Set the given architecture." }
, {nil, "ndk", "kv", nil, "Set the android NDK directory." }
, {nil, "mingw", "kv", nil, "Set the MingW directory." }
, {nil, "packages", "vs", nil, "The package list." }
}
-- require packages
@ -44,6 +45,9 @@ function _require_packages(argv, packages)
if argv.diagnosis then
table.insert(require_argv, "-D")
end
if argv.shallow then
table.insert(require_argv, "--shallow")
end
table.join2(require_argv, packages)
os.execv("xmake", require_argv)
end

Loading…
Cancel
Save