Skip to content

Commit 87d3c7b

Browse files
committed
Fix android native test error output
1 parent a1e1950 commit 87d3c7b

File tree

1 file changed

+9
-3
lines changed
  • test-android/src/androidInstrumentedTest/kotlin/org/kotlincrypto/random/test/android

1 file changed

+9
-3
lines changed

test-android/src/androidInstrumentedTest/kotlin/org/kotlincrypto/random/test/android/AndroidNativeTest.kt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import io.matthewnelson.kmp.file.toFile
2121
import io.matthewnelson.kmp.process.Process
2222
import kotlin.test.Test
2323
import kotlin.test.assertEquals
24+
import kotlin.test.fail
2425

2526
class AndroidNativeTest {
2627

@@ -35,8 +36,13 @@ class AndroidNativeTest {
3536
maxBuffer = Int.MAX_VALUE / 2
3637
}
3738

38-
assertEquals(0, out.processInfo.exitCode, out.stdout)
39-
println(out.stdout)
40-
println(out.stderr)
39+
if (out.processInfo.exitCode == 0) return
40+
41+
val sb = StringBuilder()
42+
sb.appendLine(out.processInfo.toString()).appendLine()
43+
out.processError?.let { sb.appendLine(it).appendLine() }
44+
sb.appendLine(out.stdout).appendLine()
45+
sb.appendLine(out.stderr).appendLine()
46+
fail(sb.toString())
4147
}
4248
}

0 commit comments

Comments
 (0)