-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AndroidTestContext as base data for dump shards & test execution #817
Conversation
Codecov Report
@@ Coverage Diff @@
## master #817 +/- ##
============================================
+ Coverage 78.30% 79.75% +1.45%
Complexity 667 667
============================================
Files 149 148 -1
Lines 3014 3008 -6
Branches 439 435 -4
============================================
+ Hits 2360 2399 +39
+ Misses 374 334 -40
+ Partials 280 275 -5 |
this looks awesome! |
Thanks 👍 I still have to make sure I didn't break anything. |
The additional side effect of this refactor is that now we can specify both robo test with instrumented test in one config and run it together.
|
That's quite nice. |
Should be merged after #801 |
b6996d8
to
fa520f8
Compare
get() = appApk != null && testApk != null || | ||
additionalAppTestApks.isNotEmpty() && | ||
(appApk != null || additionalAppTestApks.all { (app, _) -> app != null }) | ||
val isRoboTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be private?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps, now it could
runBlocking { | ||
if (dumpShards) | ||
dumpShards(config) else | ||
newTestRun(config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion keeping curly braces is more redable
runBlocking {
if (dumpShards)
dumpShards(config) else
newTestRun(config)
}
vs
runBlocking {
if (dumpShards) {
dumpShards(config)
} else {
newTestRun(config)
}
}
or
override fun run() {
if (dryRun) {
MockServer.start()
}
val config = AndroidArgs.load(Paths.get(configPath), cli = this)
runProcess(config)
}
private fun runProcess(config: AndroidArgs) = runBlocking {
if (dumpShards) {
dumpShards(config)
} else {
newTestRun(config)
}
}
Tell me what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curly braces make sense when u need to open new scope for more than one operation. Otherwise I prefer clear declarative expressions where curly braces are redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* Download & calculate shard for multiple apks async * Fix SingleLinePrinter output * Improve code re-usage
2b71d91
to
03ba407
Compare
I think this closed #818 but it shouldn't have. I was able to reproduce the issue on this branch. |
#718
Probably will fix #818
This is refactoring of code that belongs to android-run and dumps-shards
Why those changes are important: