[kotlin.test] Do not run test suites containing only ignored tests
Popular frameworks such as JUnit, TestNG and Google Test do not run @BeforeClass/@AfterClass hooks of test suites containing only ignored tests. This patch introduces the same behaviour to the Kotlin/Native's kotlin.test runner. See also: #4522, #4615.
This commit is contained in:
committed by
Vasily Levchenko
parent
4f037b8b81
commit
e45c2d31bc
@@ -3530,15 +3530,14 @@ standaloneTest("testing_filtered_suites") {
|
||||
["A.*"], // filter out a top-level suite.
|
||||
["*.common"], // run a test from all suites -> all hooks executed.
|
||||
["Ignored.*"], // an ignored suite -> no hooks executed.
|
||||
["A.ignored"] // a suite with only ignored tests.
|
||||
// TODO: Currently we execute hooks while other frameworks don't. Fix it.
|
||||
["A.ignored"] // a suite with only ignored tests -> no hooks executed.
|
||||
]
|
||||
def expectedHooks = [
|
||||
["Filtered_suitesKt.before", "Filtered_suitesKt.after"],
|
||||
["A.before", "A.after"],
|
||||
["A.before", "A.after", "Filtered_suitesKt.before", "Filtered_suitesKt.after"],
|
||||
[],
|
||||
["A.before", "A.after"], // TODO: fix it.
|
||||
[]
|
||||
]
|
||||
|
||||
multiRuns = true
|
||||
|
||||
Reference in New Issue
Block a user