From 50162265da1a2e118822537fab2f6f065e5be34e Mon Sep 17 00:00:00 2001 From: Roman Artemev Date: Mon, 25 May 2020 13:05:12 +0300 Subject: [PATCH] [JS TESTS] Add EP to disable run test on specific platform --- js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt index 8ba5a9a8d27..4c02e355dfe 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/BasicBoxTest.kt @@ -105,6 +105,8 @@ abstract class BasicBoxTest( doTest(filePath, "OK", MainCallParameters.noCall(), coroutinesPackage) } + open fun dontRunOnSpecificPlatform(targetBackend: TargetBackend): Boolean = false + open fun doTest(filePath: String, expectedResult: String, mainCallParameters: MainCallParameters, coroutinesPackage: String = "") { val file = File(filePath) val outputDir = getOutputDir(file) @@ -231,7 +233,7 @@ abstract class BasicBoxTest( globalCommonFiles + localCommonFiles + additionalCommonFiles + additionalMainFiles - val dontRunGeneratedCode = InTextDirectivesUtils.dontRunGeneratedCode(targetBackend, file) + val dontRunGeneratedCode = InTextDirectivesUtils.dontRunGeneratedCode(targetBackend, file) || dontRunOnSpecificPlatform(targetBackend) if (!dontRunGeneratedCode && generateNodeJsRunner && !SKIP_NODE_JS.matcher(fileContent).find()) { val nodeRunnerName = mainModule.outputFileName(outputDir) + ".node.js"