Skip to content
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 --no-clean flag to pod lint test #89627

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
51 changes: 26 additions & 25 deletions dev/ci/mac/Gemfile.lock
Expand Up @@ -2,22 +2,23 @@ GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.3)
activesupport (5.2.6)
activesupport (6.1.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.0.3)
cocoapods (1.10.2)
addressable (~> 2.6)
cocoapods (1.11.0)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.10.2)
cocoapods-core (= 1.11.0)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -28,26 +29,26 @@ GEM
escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.6.6)
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.19.0, < 2.0)
cocoapods-core (1.10.2)
activesupport (> 5.0, < 6)
addressable (~> 2.6)
ruby-macho (>= 1.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.11.0)
activesupport (>= 5.0, < 7)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.4.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.5.0)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-trunk (1.5.0)
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.2.0)
Expand All @@ -56,7 +57,7 @@ GEM
escape (0.0.4)
ethon (0.14.0)
ffi (>= 1.15.0)
ffi (1.15.3)
ffi (1.15.4)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
Expand All @@ -65,25 +66,25 @@ GEM
concurrent-ruby (~> 1.0)
json (2.5.1)
minitest (5.14.4)
molinillo (0.6.6)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.6)
rexml (3.2.5)
ruby-macho (1.4.0)
thread_safe (0.3.6)
ruby-macho (2.5.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
xcodeproj (1.20.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
xcodeproj (1.21.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.4.2)

PLATFORMS
ruby
Expand Down
35 changes: 34 additions & 1 deletion dev/devicelab/bin/tasks/plugin_lint_mac.dart
Expand Up @@ -5,6 +5,7 @@
import 'dart:io';

import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/framework/host_agent.dart';
import 'package:flutter_devicelab/framework/task_result.dart';
import 'package:flutter_devicelab/framework/utils.dart';
import 'package:path/path.dart' as path;
Expand All @@ -25,7 +26,7 @@ Future<void> main() async {
final String integrationTestPackage = path.join(flutterRoot, 'packages', 'integration_test');
final String iosintegrationTestPodspec = path.join(integrationTestPackage, 'ios', 'integration_test.podspec');

await exec(
final int lintResult = await exec(
'pod',
<String>[
'lib',
Expand All @@ -34,11 +35,43 @@ Future<void> main() async {
'--configuration=Debug', // Release targets unsupported arm64 simulators. Use Debug to only build against targeted x86_64 simulator devices.
'--use-libraries',
'--verbose',
'--no-clean',
],
environment: <String, String>{
'LANG': 'en_US.UTF-8',
},
canFail: true,
);
// https://github.com/flutter/flutter/issues/89626
if (lintResult != 0) {
final Directory systemTemp = Directory.systemTemp;
print('Found temp directory ${systemTemp.path}');
final Iterable<Directory> lintDirectories = Directory.systemTemp
.listSync()
.whereType<Directory>()
.where((Directory tempDirectory) => path.basename(tempDirectory.path).contains('CocoaPods-Lint'));
if (lintDirectories.isNotEmpty) {
final Directory lintDirectory = lintDirectories.first;
print('Found lint directory ${lintDirectory.path}');
final Directory? dumpDirectory = hostAgent.dumpDirectory;
if (dumpDirectory != null) {
final String zipPath = path.join(dumpDirectory.path,
'lint-${DateTime.now().toLocal().toIso8601String()}.zip');
return exec(
'zip',
<String>[
'-r',
'-9',
zipPath,
lintDirectory.path,
],
canFail: true, // Best effort to get the logs.
);
}
}

throw TaskResult.failure('Lint failed');
}

final String macosintegrationTestPodspec = path.join(integrationTestPackage, 'integration_test_macos', 'macos', 'integration_test_macos.podspec');
await exec(
Expand Down