Commit 9fea826 artyomcool
committed
1 parent a66df6e commit 9fea826 Copy full SHA for 9fea826
File tree 2 files changed +10
-1
lines changed
src/main/kotlin/com/jaredsburrows/spoon
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
package com.jaredsburrows.spoon
2
2
3
+ import com.android.ddmlib.testrunner.ITestRunListener
4
+
3
5
/* *
4
6
* Variables based on the following documentation:
5
7
* - https://developer.android.com/reference/android/support/test/runner/AndroidJUnitRunner.html
@@ -78,7 +80,8 @@ open class SpoonExtension { // Extensions cannot be final
78
80
/* * Toggle sharding. (false by default) */
79
81
var shard: Boolean = false
80
82
81
- // TODO testRunListener
83
+ /* * Add listener for tests execution */
84
+ var testRunListener: ITestRunListener ? = null
82
85
83
86
// TODO terminateAdb
84
87
Original file line number Diff line number Diff line change 1
1
package com.jaredsburrows.spoon
2
2
3
3
import com.android.ddmlib.testrunner.IRemoteAndroidTestRunner.TestSize
4
+ import com.android.ddmlib.testrunner.ITestRunListener
5
+ import com.android.ddmlib.testrunner.TestIdentifier
4
6
import com.squareup.spoon.SpoonRunner
5
7
import org.gradle.api.DefaultTask
6
8
import org.gradle.api.GradleException
@@ -55,6 +57,10 @@ open class SpoonTask : DefaultTask() {
55
57
.setSingleInstrumentationCall(extension.singleInstrumentationCall)
56
58
.setClearAppDataBeforeEachTest(extension.clearAppDataBeforeEachTest)
57
59
60
+ if (extension.testRunListener != null ) {
61
+ builder.addTestRunListener(extension.testRunListener)
62
+ }
63
+
58
64
// APKs
59
65
if (! testing) {
60
66
builder.setTestApk(instrumentationApk)
You can’t perform that action at this time.
0 commit comments