[JS] Revert disabling running ES6 tests on all platforms except linux

Revert "[JS TESTS] Emulate failing of non-run tests"

This reverts commit 2fd69218

Revert "[JS TESTS] Don't run ES6 test on win & mac till j2v8 issue is fixed."

This reverts commit 08624165

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

This reverts commit 50162265
This commit is contained in:
Zalim Bashorov
2020-06-03 00:10:03 +03:00
parent 2cb4a4906f
commit 39cc149da0
2 changed files with 2 additions and 26 deletions
@@ -104,8 +104,6 @@ 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)
@@ -258,7 +256,7 @@ abstract class BasicBoxTest(
globalCommonFiles + localCommonFiles + additionalCommonFiles + additionalMainFiles
val dontRunGeneratedCode = InTextDirectivesUtils.dontRunGeneratedCode(targetBackend, file) || dontRunOnSpecificPlatform(targetBackend)
val dontRunGeneratedCode = InTextDirectivesUtils.dontRunGeneratedCode(targetBackend, file)
if (!dontRunGeneratedCode && generateNodeJsRunner && !SKIP_NODE_JS.matcher(fileContent).find()) {
val nodeRunnerName = mainModule.outputFileName(outputDir) + ".node.js"
@@ -279,15 +277,6 @@ abstract class BasicBoxTest(
if (runIrPir && !skipDceDriven) {
runGeneratedCode(pirAllJsFiles, testModuleName, testPackage, testFunction, expectedResult, withModuleSystem)
}
} else {
val ignored = InTextDirectivesUtils.isIgnoredTarget(
targetBackend, file,
InTextDirectivesUtils.IGNORE_BACKEND_DIRECTIVE_PREFIX
)
if (ignored) {
throw AssertionError("Ignored test hasn't been ran. Emulate its failing")
}
}
performAdditionalChecks(generatedJsFiles.map { it.first }, outputPrefixFile, outputPostfixFile)
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -59,8 +59,6 @@ abstract class BasicIrBoxTest(
val perModule: Boolean = getBoolean("kotlin.js.ir.perModule")
private val osName: String = System.getProperty("os.name").toLowerCase()
// TODO Design incremental compilation for IR and add test support
override val incrementalCompilationChecksEnabled = false
@@ -209,17 +207,6 @@ abstract class BasicIrBoxTest(
cachedDependencies[outputFile.absolutePath] = dependencyPaths
}
override fun dontRunOnSpecificPlatform(targetBackend: TargetBackend): Boolean {
if (targetBackend != TargetBackend.JS_IR_ES6) return false
if (!runEs6Mode) return false
// TODO: Since j2v8 does not support ES6 on mac and windows, temporary don't run such test on those platforms.
if (osName.indexOf("win") >= 0) return true
if (osName.indexOf("mac") >= 0 || osName.indexOf("darwin") >= 0) return true
return false
}
override fun runGeneratedCode(
jsFiles: List<String>,
testModuleName: String?,