-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[ci] Upload screenshots, logs, and Xcode test results for drive and integration_test runs #7430
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
Changes from 3 commits
f39f734
8ac52ff
54003a8
937765c
7e6e02c
885a407
5719da2
a45f634
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 |
---|---|---|
|
@@ -228,8 +228,12 @@ class DriveExamplesCommand extends PackageLoopingCommand { | |
} | ||
for (final File driver in drivers) { | ||
final List<File> failingTargets = await _driveTests( | ||
example, driver, testTargets, | ||
deviceFlags: deviceFlags); | ||
example, | ||
driver, | ||
testTargets, | ||
deviceFlags: deviceFlags, | ||
exampleName: exampleName, | ||
); | ||
for (final File failingTarget in failingTargets) { | ||
errors.add( | ||
getRelativePosixPath(failingTarget, from: package.directory)); | ||
|
@@ -376,19 +380,27 @@ class DriveExamplesCommand extends PackageLoopingCommand { | |
File driver, | ||
List<File> targets, { | ||
required List<String> deviceFlags, | ||
required String exampleName, | ||
}) async { | ||
final List<File> failures = <File>[]; | ||
|
||
final String enableExperiment = getStringArg(kEnableExperiment); | ||
final Directory? logsDirectory = ciLogsDirectory(platform, driver.fileSystem); | ||
|
||
for (final File target in targets) { | ||
Directory? screenshotDirectory; | ||
if (logsDirectory != null) { | ||
screenshotDirectory = logsDirectory.childDirectory('$exampleName-drive'); | ||
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.
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. Done. |
||
} | ||
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.
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. Oops, I copied code that was written before null safety and clumsily migrated (likely by me). |
||
final int exitCode = await processRunner.runAndStream( | ||
flutterCommand, | ||
<String>[ | ||
'drive', | ||
...deviceFlags, | ||
if (enableExperiment.isNotEmpty) | ||
'--enable-experiment=$enableExperiment', | ||
if (screenshotDirectory != null) | ||
'--screenshot=${screenshotDirectory.path}', | ||
'--driver', | ||
getRelativePosixPath(driver, from: example.directory), | ||
'--target', | ||
|
@@ -416,6 +428,7 @@ class DriveExamplesCommand extends PackageLoopingCommand { | |
required List<File> testFiles, | ||
}) async { | ||
final String enableExperiment = getStringArg(kEnableExperiment); | ||
final Directory? logsDirectory = testFiles.isNotEmpty ? ciLogsDirectory(platform, testFiles.first.fileSystem) : null; | ||
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. Why is this gated on 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. I think I was just guarding the |
||
|
||
// Workaround for https://github.com/flutter/flutter/issues/135673 | ||
// Once that is fixed on stable, this logic can be removed and the command | ||
|
@@ -438,6 +451,8 @@ class DriveExamplesCommand extends PackageLoopingCommand { | |
...deviceFlags, | ||
if (enableExperiment.isNotEmpty) | ||
'--enable-experiment=$enableExperiment', | ||
if (logsDirectory != null) | ||
'--debug-logs-dir=${logsDirectory.path}', | ||
target, | ||
], | ||
workingDir: example.directory); | ||
|
Uh oh!
There was an error while loading. Please reload this page.