Commit 44350ba artyomcool
committed
1 parent a66df6e commit 44350ba Copy full SHA for 44350ba
File tree 2 files changed +8
-1
lines changed
src/main/kotlin/com/jaredsburrows/spoon
2 files changed +8
-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 @@ -55,6 +55,10 @@ open class SpoonTask : DefaultTask() {
55
55
.setSingleInstrumentationCall(extension.singleInstrumentationCall)
56
56
.setClearAppDataBeforeEachTest(extension.clearAppDataBeforeEachTest)
57
57
58
+ if (extension.testRunListener != null ) {
59
+ builder.addTestRunListener(extension.testRunListener)
60
+ }
61
+
58
62
// APKs
59
63
if (! testing) {
60
64
builder.setTestApk(instrumentationApk)
You can’t perform that action at this time.
0 commit comments