diff options
Diffstat (limited to 'scripts/test.lua')
| -rw-r--r-- | scripts/test.lua | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/test.lua b/scripts/test.lua index df1218ce8..3c18225fb 100644 --- a/scripts/test.lua +++ b/scripts/test.lua @@ -86,11 +86,22 @@ function main() arch = "x86_64" end + local want_asan = option.get("asan") == true + local have_asan = config.get("asan") == true + local want_tsan = option.get("tsan") == true + local have_tsan = config.get("tsan") == true + local want_msan = option.get("msan") == true + local have_msan = config.get("msan") == true + -- Only reconfigure if current config doesn't already match - if config.get("mode") ~= "debug" or config.get("plat") ~= plat or config.get("arch") ~= arch then + if config.get("mode") ~= "debug" or config.get("plat") ~= plat or config.get("arch") ~= arch + or want_asan ~= have_asan or want_tsan ~= have_tsan or want_msan ~= have_msan then local toolchain_flag = config.get("toolchain") and ("--toolchain=" .. config.get("toolchain")) or "" local sdk_flag = config.get("sdk") and ("--sdk=" .. config.get("sdk")) or "" - os.exec("xmake config -y -c -m debug -p %s -a %s %s %s", plat, arch, toolchain_flag, sdk_flag) + local asan_flag = want_asan and "--asan=y" or "" + local tsan_flag = want_tsan and "--tsan=y" or "" + local msan_flag = want_msan and "--msan=y" or "" + os.exec("xmake config -y -c -m debug -p %s -a %s %s %s %s %s %s", plat, arch, toolchain_flag, sdk_flag, asan_flag, tsan_flag, msan_flag) end -- Build targets we're going to run @@ -104,7 +115,7 @@ function main() local use_junit_reporting = option.get("junit") local use_noskip = option.get("noskip") - local use_verbose = option.get("verbose") + local use_verbose = option.get("output") local repeat_count = tonumber(option.get("repeat")) or 1 local extra_args = option.get("arguments") or {} local junit_report_files = {} |