Skip to content

Commit

Permalink
fix win tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xvik committed Jan 19, 2025
1 parent ff223b0 commit f7b2a45
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,24 +103,24 @@ class PrintUtils {
String prefix = buildPrefix(shift)
return sourceDirs.collect {
String path = it.canonicalPath.replace(getRootPath(rootDir), '')
it.exists() ? "$prefix$path" : String.format("$prefix%-80s %s", path,
!existsMarker || it.exists() ? '' : 'NOT EXISTS')
unifyPath(it.exists() ? "$prefix$path" : String.format("$prefix%-80s %s", path,
!existsMarker || it.exists() ? '' : 'NOT EXISTS'))
}.unique().sort().join(NL)
}

static String renderClasses(int shift, Collection<File> classDirs, File rootDir) {
String prefix = buildPrefix(shift)
return classDirs.collect {
prefix + it.canonicalPath.replace(getRootPath(rootDir), '')
unifyPath(prefix + it.canonicalPath.replace(getRootPath(rootDir), ''))
}.unique().sort().join(NL)
}

static String renderClasspath(File rootDir, int shift, Collection<File> files) {
String prefix = buildPrefix(shift)
files.collect {
String rootPath = getRootPath(rootDir)
prefix + (it.canonicalPath.startsWith(rootPath)
? it.canonicalPath.replace(rootPath, '') : it.name)
unifyPath(prefix + (it.canonicalPath.startsWith(rootPath)
? it.canonicalPath.replace(rootPath, '') : it.name))
}.sort().unique().join(NL)
}

Expand Down Expand Up @@ -177,4 +177,8 @@ class PrintUtils {
println "WARN: unknown dependency ${dep.class} ($dep) for task ${task.name}"
return []
}

private static String unifyPath(Object path) {
return path.toString().replace('\\', '/')
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ abstract class AbstractDebugKitTest extends AbstractAndroidKitTest {
String readReport(String name) {
String file = "/${getClass().name.replace('.', '/')}_${name}.txt"
println "Reading report: $file"
readFileFromClasspath(file)?.trim()
readFileFromClasspath(file)?.replace('\r', '')?.trim()
}
}

0 comments on commit f7b2a45

Please sign in to comment.