Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c5d046c0
Unverified
Commit
c5d046c0
authored
May 24, 2022
by
Jenn Magder
Committed by
GitHub
May 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
continue->next in Ruby script (#104296)
parent
8dc51218
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
23 deletions
+50
-23
podhelper.rb
packages/flutter_tools/bin/podhelper.rb
+1
-1
ios_content_validation_test.dart
...st/host_cross_arch.shard/ios_content_validation_test.dart
+45
-16
macos_content_validation_test.dart
.../host_cross_arch.shard/macos_content_validation_test.dart
+0
-2
common.dart
packages/flutter_tools/test/src/common.dart
+4
-4
No files found.
packages/flutter_tools/bin/podhelper.rb
View file @
c5d046c0
...
@@ -60,7 +60,7 @@ def flutter_additional_ios_build_settings(target)
...
@@ -60,7 +60,7 @@ def flutter_additional_ios_build_settings(target)
# Profile can't be derived from the CocoaPods build configuration. Use release framework (for linking only).
# Profile can't be derived from the CocoaPods build configuration. Use release framework (for linking only).
configuration_engine_dir
=
build_configuration
.
type
==
:debug
?
debug_framework_dir
:
release_framework_dir
configuration_engine_dir
=
build_configuration
.
type
==
:debug
?
debug_framework_dir
:
release_framework_dir
Dir
.
new
(
configuration_engine_dir
).
each_child
do
|
xcframework_file
|
Dir
.
new
(
configuration_engine_dir
).
each_child
do
|
xcframework_file
|
continue
if
xcframework_file
.
start_with?
(
"."
)
# Hidden file, possibly on external disk.
next
if
xcframework_file
.
start_with?
(
"."
)
# Hidden file, possibly on external disk.
if
xcframework_file
.
end_with?
(
"-simulator"
)
# ios-arm64_x86_64-simulator
if
xcframework_file
.
end_with?
(
"-simulator"
)
# ios-arm64_x86_64-simulator
build_configuration
.
build_settings
[
'FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]'
]
=
"
\"
#{
configuration_engine_dir
}
/
#{
xcframework_file
}
\"
$(inherited)"
build_configuration
.
build_settings
[
'FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]'
]
=
"
\"
#{
configuration_engine_dir
}
/
#{
xcframework_file
}
\"
$(inherited)"
elsif
xcframework_file
.
start_with?
(
"ios-"
)
# ios-arm64
elsif
xcframework_file
.
start_with?
(
"ios-"
)
# ios-arm64
...
...
packages/flutter_tools/test/host_cross_arch.shard/ios_content_validation_test.dart
View file @
c5d046c0
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:file_testing/file_testing.dart'
;
import
'package:file_testing/file_testing.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
...
@@ -15,11 +13,12 @@ import '../src/darwin_common.dart';
...
@@ -15,11 +13,12 @@ import '../src/darwin_common.dart';
void
main
(
)
{
void
main
(
)
{
group
(
'iOS app validation'
,
()
{
group
(
'iOS app validation'
,
()
{
String
flutterRoot
;
late
String
flutterRoot
;
Directory
pluginRoot
;
late
Directory
pluginRoot
;
String
projectRoot
;
late
String
projectRoot
;
String
flutterBin
;
late
String
flutterBin
;
Directory
tempDir
;
late
Directory
tempDir
;
late
File
hiddenFile
;
setUpAll
(()
{
setUpAll
(()
{
flutterRoot
=
getFlutterRoot
();
flutterRoot
=
getFlutterRoot
();
...
@@ -30,6 +29,29 @@ void main() {
...
@@ -30,6 +29,29 @@ void main() {
'flutter'
,
'flutter'
,
);
);
final
Directory
xcframeworkArtifact
=
fileSystem
.
directory
(
fileSystem
.
path
.
join
(
flutterRoot
,
'bin'
,
'cache'
,
'artifacts'
,
'engine'
,
'ios'
,
'Flutter.xcframework'
,
),
);
// Pre-cache iOS engine Flutter.xcframework artifacts.
processManager
.
runSync
(<
String
>[
flutterBin
,
...
getLocalEngineArguments
(),
'precache'
,
'--ios'
,
],
workingDirectory:
tempDir
.
path
);
// Pretend the SDK was on an external drive with stray "._" files in the xcframework
hiddenFile
=
xcframeworkArtifact
.
childFile
(
'._Info.plist'
)..
createSync
();
// Test a plugin example app to allow plugins validation.
// Test a plugin example app to allow plugins validation.
processManager
.
runSync
(<
String
>[
processManager
.
runSync
(<
String
>[
flutterBin
,
flutterBin
,
...
@@ -47,22 +69,24 @@ void main() {
...
@@ -47,22 +69,24 @@ void main() {
});
});
tearDownAll
(()
{
tearDownAll
(()
{
tryToDelete
(
hiddenFile
);
tryToDelete
(
tempDir
);
tryToDelete
(
tempDir
);
});
});
for
(
final
BuildMode
buildMode
in
<
BuildMode
>[
BuildMode
.
debug
,
BuildMode
.
release
])
{
for
(
final
BuildMode
buildMode
in
<
BuildMode
>[
BuildMode
.
debug
,
BuildMode
.
release
])
{
group
(
'build in
${buildMode.name}
mode'
,
()
{
group
(
'build in
${buildMode.name}
mode'
,
()
{
Directory
buildPath
;
late
Directory
buildPath
;
Directory
outputApp
;
late
Directory
outputApp
;
Directory
frameworkDirectory
;
late
Directory
frameworkDirectory
;
Directory
outputFlutterFramework
;
late
Directory
outputFlutterFramework
;
File
outputFlutterFrameworkBinary
;
late
File
outputFlutterFrameworkBinary
;
Directory
outputAppFramework
;
late
Directory
outputAppFramework
;
File
outputAppFrameworkBinary
;
late
File
outputAppFrameworkBinary
;
File
outputPluginFrameworkBinary
;
late
File
outputPluginFrameworkBinary
;
late
ProcessResult
buildResult
;
setUpAll
(()
{
setUpAll
(()
{
processManager
.
runSync
(<
String
>[
buildResult
=
processManager
.
runSync
(<
String
>[
flutterBin
,
flutterBin
,
...
getLocalEngineArguments
(),
...
getLocalEngineArguments
(),
'build'
,
'build'
,
...
@@ -94,6 +118,11 @@ void main() {
...
@@ -94,6 +118,11 @@ void main() {
});
});
testWithoutContext
(
'flutter build ios builds a valid app'
,
()
{
testWithoutContext
(
'flutter build ios builds a valid app'
,
()
{
printOnFailure
(
'Output of flutter build ios:'
);
printOnFailure
(
buildResult
.
stdout
.
toString
());
printOnFailure
(
buildResult
.
stderr
.
toString
());
expect
(
buildResult
.
exitCode
,
0
);
expect
(
outputPluginFrameworkBinary
,
exists
);
expect
(
outputPluginFrameworkBinary
,
exists
);
expect
(
outputAppFrameworkBinary
,
exists
);
expect
(
outputAppFrameworkBinary
,
exists
);
...
...
packages/flutter_tools/test/host_cross_arch.shard/macos_content_validation_test.dart
View file @
c5d046c0
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// @dart = 2.8
import
'package:file_testing/file_testing.dart'
;
import
'package:file_testing/file_testing.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
...
...
packages/flutter_tools/test/src/common.dart
View file @
c5d046c0
...
@@ -18,19 +18,19 @@ import 'package:test_api/test_api.dart' hide test; // ignore: deprecated_member_
...
@@ -18,19 +18,19 @@ import 'package:test_api/test_api.dart' hide test; // ignore: deprecated_member_
export
'package:test_api/test_api.dart'
hide
test
,
isInstanceOf
;
// ignore: deprecated_member_use
export
'package:test_api/test_api.dart'
hide
test
,
isInstanceOf
;
// ignore: deprecated_member_use
void
tryToDelete
(
Directory
director
y
)
{
void
tryToDelete
(
FileSystemEntity
fileEntit
y
)
{
// This should not be necessary, but it turns out that
// This should not be necessary, but it turns out that
// on Windows it's common for deletions to fail due to
// on Windows it's common for deletions to fail due to
// bogus (we think) "access denied" errors.
// bogus (we think) "access denied" errors.
try
{
try
{
if
(
director
y
.
existsSync
())
{
if
(
fileEntit
y
.
existsSync
())
{
director
y
.
deleteSync
(
recursive:
true
);
fileEntit
y
.
deleteSync
(
recursive:
true
);
}
}
}
on
FileSystemException
catch
(
error
)
{
}
on
FileSystemException
catch
(
error
)
{
// We print this so that it's visible in the logs, to get an idea of how
// We print this so that it's visible in the logs, to get an idea of how
// common this problem is, and if any patterns are ever noticed by anyone.
// common this problem is, and if any patterns are ever noticed by anyone.
// ignore: avoid_print
// ignore: avoid_print
print
(
'Failed to delete
${
director
y.path}
:
$error
'
);
print
(
'Failed to delete
${
fileEntit
y.path}
:
$error
'
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment