Skip to content

Commit f0c5ff8

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

File tree

1 file changed

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

1 file changed

+9
-4
lines changed

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import androidx.test.core.app.ApplicationProvider
2020
import io.matthewnelson.kmp.file.toFile
2121
import io.matthewnelson.kmp.process.Process
2222
import kotlin.test.Test
23-
import kotlin.test.assertEquals
23+
import kotlin.test.fail
2424

2525
class AndroidNativeTest {
2626

@@ -35,8 +35,13 @@ class AndroidNativeTest {
3535
maxBuffer = Int.MAX_VALUE / 2
3636
}
3737

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

0 commit comments

Comments
 (0)