[JS, Tests] Migrate IR tests onto outputDir and outputName
This commit is contained in:
+2
-3
@@ -109,11 +109,10 @@ class IncrementalJsCompilerRunner(
|
||||
}
|
||||
|
||||
override fun destinationDir(args: K2JSCompilerArguments): File {
|
||||
val outputFile = File(args.outputFile!!)
|
||||
return if (args.isIrBackendEnabled())
|
||||
outputFile
|
||||
File(args.outputDir!!)
|
||||
else
|
||||
outputFile.parentFile
|
||||
File(args.outputFile!!).parentFile
|
||||
}
|
||||
|
||||
override fun calculateSourcesToCompile(
|
||||
|
||||
+3
-1
@@ -9,7 +9,9 @@ abstract class AbstractIncrementalJsKlibCompilerRunnerTest : AbstractIncremental
|
||||
override fun createCompilerArguments(destinationDir: File, testDir: File): K2JSCompilerArguments =
|
||||
K2JSCompilerArguments().apply {
|
||||
libraries = "build/js-ir-runtime/full-runtime.klib"
|
||||
outputFile = File(destinationDir, "${testDir.name}.$KLIB_FILE_EXTENSION").path
|
||||
outputDir = destinationDir.path
|
||||
outputName = testDir.name
|
||||
outputFile = null
|
||||
sourceMap = false
|
||||
irProduceKlibDir = false
|
||||
irProduceKlibFile = true
|
||||
|
||||
+4
-2
@@ -19,7 +19,8 @@ abstract class AbstractIncrementalMultiModuleJsKlibCompilerRunnerTest :
|
||||
override fun createCompilerArguments(destinationDir: File, testDir: File): K2JSCompilerArguments =
|
||||
K2JSCompilerArguments().apply {
|
||||
libraries = STDLIB_DEPENDENCY
|
||||
outputFile = File(destinationDir, "${testDir.name}.$KLIB_FILE_EXTENSION").path
|
||||
outputDir = destinationDir.path
|
||||
outputName = testDir.name
|
||||
sourceMap = false
|
||||
irProduceKlibDir = false
|
||||
irProduceKlibFile = true
|
||||
@@ -81,7 +82,8 @@ abstract class AbstractIncrementalMultiModuleJsKlibCompilerRunnerTest :
|
||||
}
|
||||
|
||||
libraries = sb.toString()
|
||||
outputFile = outFile.path
|
||||
outputDir = outFile.parentFile.path
|
||||
outputName = outFile.nameWithoutExtension
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
+2
-1
@@ -106,7 +106,8 @@ abstract class AbstractJsKlibLookupTrackerTest : AbstractJsLookupTrackerTest() {
|
||||
override fun configureAdditionalArgs(args: K2JSCompilerArguments) {
|
||||
args.irProduceKlibDir = true
|
||||
args.irOnly = true
|
||||
args.outputFile = outDir.resolve("out.klib").absolutePath
|
||||
args.outputDir = outDir.normalize().absolutePath
|
||||
args.outputName = "out"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -299,7 +299,7 @@ class GenerateIrRuntime {
|
||||
|
||||
val args = K2JSCompilerArguments().apply {
|
||||
libraries = ""
|
||||
outputFile = klibDirectory.path
|
||||
outputDir = klibDirectory.path
|
||||
sourceMap = false
|
||||
irProduceKlibDir = true
|
||||
irOnly = true
|
||||
|
||||
+4
-2
@@ -53,7 +53,8 @@ abstract class AbstractJsKlibBinaryCompatibilityTest : AbstractKlibBinaryCompati
|
||||
val args = K2JSCompilerArguments().apply {
|
||||
freeArgs = createFiles(module.versionFiles(version))
|
||||
libraries = module.dependenciesToLibrariesArg(version = version)
|
||||
outputFile = File(workingDir, "${module.name(version)}.$KLIB_FILE_EXTENSION").absolutePath
|
||||
outputDir = workingDir.normalize().absolutePath
|
||||
outputName = module.name(version)
|
||||
irProduceKlibFile = true
|
||||
irOnly = true
|
||||
irModuleName = module.name
|
||||
@@ -67,7 +68,8 @@ abstract class AbstractJsKlibBinaryCompatibilityTest : AbstractKlibBinaryCompati
|
||||
val args = K2JSCompilerArguments().apply {
|
||||
freeArgs = createFiles(module.files) + runnerFunctionFile()
|
||||
libraries = module.dependenciesToLibrariesArg(version = 2)
|
||||
outputFile = File(workingDir, module.name.js).absolutePath
|
||||
outputDir = workingDir.normalize().absolutePath
|
||||
outputName = module.name
|
||||
irProduceJs = true
|
||||
irOnly = true
|
||||
irModuleName = module.name
|
||||
|
||||
Reference in New Issue
Block a user