-
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
feat: Support for robo tests without robo script #1108
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ import ftl.args.AndroidArgs | |
import ftl.run.model.AndroidTestContext | ||
import ftl.run.model.InstrumentationTestContext | ||
import ftl.run.model.RoboTestContext | ||
import ftl.run.model.SanityRoboTestContext | ||
import ftl.util.asFileReference | ||
import ftl.util.uploadIfNeeded | ||
import kotlinx.coroutines.Dispatchers | ||
|
@@ -23,6 +24,7 @@ suspend fun List<AndroidTestContext>.upload(rootGcsBucket: String, runGcsPath: S | |
private fun AndroidTestContext.upload(rootGcsBucket: String, runGcsPath: String) = when (this) { | ||
is InstrumentationTestContext -> upload(rootGcsBucket, runGcsPath) | ||
is RoboTestContext -> upload(rootGcsBucket, runGcsPath) | ||
is SanityRoboTestContext -> upload(rootGcsBucket, runGcsPath) | ||
} | ||
|
||
private fun InstrumentationTestContext.upload(rootGcsBucket: String, runGcsPath: String) = copy( | ||
|
@@ -35,6 +37,8 @@ private fun RoboTestContext.upload(rootGcsBucket: String, runGcsPath: String) = | |
roboScript = roboScript.uploadIfNeeded(rootGcsBucket, runGcsPath) | ||
) | ||
|
||
private fun SanityRoboTestContext.upload(rootGcsBucket: String, runGcsPath: String) = SanityRoboTestContext(app.uploadIfNeeded(rootGcsBucket, runGcsPath)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this line perhaps past the limit of line length? I wonder why detekt hasn't picked it up There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't know, there are even far longer lines and detekt doesn't complain about it ¯_(ツ)_/¯ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lets do it in another pull request. |
||
|
||
suspend fun AndroidArgs.uploadAdditionalApks(runGcsPath: String) = coroutineScope { | ||
additionalApks.map { | ||
async { it.asFileReference().uploadIfNeeded(resultsBucket, runGcsPath).gcs } | ||
|
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.
same as above
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.
Here is a bit tricky because I want to take advantage of smart casting