From 2ca9b7bd1f62ce27f894a4671a6862aa8ccf5aa0 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 22 Sep 2022 23:24:02 +0800 Subject: [PATCH] improve test.lua --- scripts/test.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/test.lua b/scripts/test.lua index 74600fa92..929e299e7 100644 --- a/scripts/test.lua +++ b/scripts/test.lua @@ -15,6 +15,7 @@ local options = , {'m', "mode", "kv", nil, "Set the given mode." } , {'j', "jobs", "kv", nil, "Set the build jobs." } , {'f', "configs", "kv", nil, "Set the configs." } +, {'d', "debugdir", "kv", nil, "Set the debug source directory." } , {nil, "linkjobs", "kv", nil, "Set the link jobs." } , {nil, "cflags", "kv", nil, "Set the cflags." } , {nil, "cxxflags", "kv", nil, "Set the cxxflags." } @@ -94,7 +95,12 @@ function _require_packages(argv, packages) if argv.diagnosis then table.insert(require_argv, "-D") end - if argv.shallow then + local is_debug = false + if argv.debugdir then + is_debug = true + table.insert(require_argv, "--debugdir=" .. argv.debugdir) + end + if argv.shallow or is_debug then table.insert(require_argv, "--shallow") end if argv.jobs then