File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/main/kotlin/com/jaredsburrows/spoon Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 11package com.jaredsburrows.spoon
22
3+ import com.android.ddmlib.testrunner.ITestRunListener
4+
35/* *
46 * Variables based on the following documentation:
57 * - https://developer.android.com/reference/android/support/test/runner/AndroidJUnitRunner.html
@@ -78,7 +80,8 @@ open class SpoonExtension { // Extensions cannot be final
7880 /* * Toggle sharding. (false by default) */
7981 var shard: Boolean = false
8082
81- // TODO testRunListener
83+ /* * Add listener for tests execution */
84+ var testRunListener: ITestRunListener ? = null
8285
8386 // TODO terminateAdb
8487
Original file line number Diff line number Diff line change @@ -55,6 +55,10 @@ open class SpoonTask : DefaultTask() {
5555 .setSingleInstrumentationCall(extension.singleInstrumentationCall)
5656 .setClearAppDataBeforeEachTest(extension.clearAppDataBeforeEachTest)
5757
58+ if (extension.testRunListener != null ) {
59+ builder.addTestRunListener(extension.testRunListener)
60+ }
61+
5862 // APKs
5963 if (! testing) {
6064 builder.setTestApk(instrumentationApk)
You can’t perform that action at this time.
0 commit comments