diff options
| author | ruki <[email protected]> | 2024-04-08 23:49:44 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-04-08 23:49:44 +0800 |
| commit | 6551d9a4308d0cbec4a2f4c33d28f8bf432bff7f (patch) | |
| tree | c1aecbbf4e4e272ba20ebc0651e9fb831318686d | |
| parent | 34dff00dcb274280b6ee8e23eda03a470b6956b5 (diff) | |
improve runner
| -rw-r--r-- | tests/projects/c++/modules/test_base.lua | 2 | ||||
| -rw-r--r-- | tests/runner.lua | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/tests/projects/c++/modules/test_base.lua b/tests/projects/c++/modules/test_base.lua index 804947f08..219901c63 100644 --- a/tests/projects/c++/modules/test_base.lua +++ b/tests/projects/c++/modules/test_base.lua @@ -48,7 +48,7 @@ function main(t) os.exec("xmake f -c --yes") _build() elseif is_subhost("msys") then - os.exec("xmake f -c -p mingw -vD --yes") + os.exec("xmake f -c -p mingw --yes") _build() elseif is_host("linux") then local gcc = find_tool("gcc", {version = true}) diff --git a/tests/runner.lua b/tests/runner.lua index c99142170..4558c38ce 100644 --- a/tests/runner.lua +++ b/tests/runner.lua @@ -50,11 +50,14 @@ function main(script) end, catch { - function (error) - if not error:find("aborting because of ") then - context:print_error(error, v, "unhandled error") + function (errors) + if errors then + error = tostring(errors) + end + if not errors:find("aborting because of ") then + context:print_error(errors, v, "unhandled error") else - raise(error) + raise(errors) end end } |
