[JS TESTS] Add EP to disable run test on specific platform

This commit is contained in:
Roman Artemev
2020-05-25 13:05:12 +03:00
committed by romanart
parent fe047f9b47
commit 50162265da
@@ -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"