diff options
| author | OpportunityLiu <[email protected]> | 2019-06-18 19:50:39 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-06-18 19:50:39 +0800 |
| commit | 98d4504577b586ef2398346a0db2743081cf03a8 (patch) | |
| tree | 3aab00679f61eee14a62afb3989ed3d278bdb5a3 /tests/runner.lua | |
| parent | 0c58eac269fda12b1568bc9704237a48aedbc4b3 (diff) | |
skip some tests
Diffstat (limited to 'tests/runner.lua')
| -rw-r--r-- | tests/runner.lua | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/tests/runner.lua b/tests/runner.lua index b4325edc2..227e66a7f 100644 --- a/tests/runner.lua +++ b/tests/runner.lua @@ -1,7 +1,5 @@ import("core.base.option") -import("test_utils.test_assert") -import("test_utils.print_error") -import("test_utils.build", { alias = "test_build" }) +import("test_utils.context", { alias = "test_context" }) function main(script) @@ -16,14 +14,7 @@ function main(script) os.setenv("XMAKE_STATS", "false") -- init test context - local context = - { - filename = script - } - context = test_assert(context) - function context:build(argv) - test_build(argv) - end + local context = test_context(script) local root = path.directory(script) @@ -50,10 +41,10 @@ function main(script) if verbose then print(">> running %s ...", k) end context.func = v context.funcname = k - try + local result = try { function () - v(context) + return v(context) end, catch { @@ -66,6 +57,9 @@ function main(script) end } } + if context:is_skipped(result) then + print(">> skipped %s : %s", k, result.reason) + end succeed_count = succeed_count + 1 end end |
