Skip to content

Commit

Permalink
Updated tests to changes in taking in as a list of files as args
Browse files Browse the repository at this point in the history
  • Loading branch information
Rd4dev committed Jul 12, 2024
1 parent ba16aaf commit 9da53d9
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ fun main(vararg args: String) {
.map { it.trim(',', '[', ']') }
.filter { it.endsWith(".kt") && !it.endsWith("Test.kt") }

for (file in filePathList) {
if (!File(repoRoot, file).exists()) {
error("File doesn't exist: $file")
}
}

println("Running coverage analysis for the files: $filePathList")

val format = args.find { it.startsWith("--format=", ignoreCase = true) }
Expand All @@ -68,6 +62,12 @@ fun main(vararg args: String) {
else -> throw IllegalArgumentException("Unsupported report format: $format")
}

for (file in filePathList) {
if (!File(repoRoot, file).exists()) {
error("File doesn't exist: $file")
}
}

ScriptBackgroundCoroutineDispatcher().use { scriptBgDispatcher ->
val processTimeout: Long = args.find { it.startsWith("--processTimeout=") }
?.substringAfter("=")
Expand Down
Loading

0 comments on commit 9da53d9

Please sign in to comment.