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
2e06ed07
Unverified
Commit
2e06ed07
authored
Mar 19, 2021
by
Jenn Magder
Committed by
GitHub
Mar 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for dart compilation error build output (#78381)
parent
c90cd65a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
21 deletions
+77
-21
flutter_build_with_compilation_error_test.dart
...tion.shard/flutter_build_with_compilation_error_test.dart
+76
-0
ios_content_validation_test.dart
...s/test/integration.shard/ios_content_validation_test.dart
+0
-20
macos_content_validation_test.dart
...test/integration.shard/macos_content_validation_test.dart
+1
-1
No files found.
packages/flutter_tools/test/integration.shard/flutter_build_with_compilation_error_test.dart
0 → 100644
View file @
2e06ed07
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'package:file/file.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'../src/common.dart'
;
import
'test_utils.dart'
;
void
main
(
)
{
Directory
tempDir
;
Directory
projectRoot
;
String
flutterBin
;
final
List
<
String
>
targetPlatforms
=
<
String
>[
'apk'
,
'web'
,
if
(
platform
.
isWindows
)
'windows'
,
if
(
platform
.
isMacOS
)
...<
String
>[
'macos'
,
'ios'
],
];
setUpAll
(()
{
tempDir
=
createResolvedTempDirectorySync
(
'build_compilation_error_test.'
);
flutterBin
=
fileSystem
.
path
.
join
(
getFlutterRoot
(),
'bin'
,
'flutter'
,
);
processManager
.
runSync
(<
String
>[
flutterBin
,
'config'
,
'--enable-macos-desktop'
,
'--enable-windows-desktop'
,
'--enable-web'
,
]);
processManager
.
runSync
(<
String
>[
flutterBin
,
...
getLocalEngineArguments
(),
'create'
,
'hello'
,
],
workingDirectory:
tempDir
.
path
);
projectRoot
=
tempDir
.
childDirectory
(
'hello'
);
writeFile
(
fileSystem
.
path
.
join
(
projectRoot
.
path
,
'lib'
,
'main.dart'
),
'''
int x = '
String
';
'''
);
});
tearDownAll
(()
{
tryToDelete
(
tempDir
);
});
for
(
final
String
targetPlatform
in
targetPlatforms
)
{
testWithoutContext
(
'flutter build
$targetPlatform
shows dart compilation error in non-verbose'
,
()
{
final
ProcessResult
result
=
processManager
.
runSync
(<
String
>[
flutterBin
,
...
getLocalEngineArguments
(),
'build'
,
targetPlatform
,
'--no-pub'
,
if
(
targetPlatform
==
'ios'
)
'--no-codesign'
,
],
workingDirectory:
projectRoot
.
path
);
expect
(
// iOS shows this as stdout.
targetPlatform
==
'ios'
?
result
.
stdout
:
result
.
stderr
,
contains
(
"A value of type 'String' can't be assigned to a variable of type 'int'."
),
);
expect
(
result
.
exitCode
,
1
);
},
timeout:
const
Timeout
(
Duration
(
minutes:
3
)));
}
}
packages/flutter_tools/test/integration.shard/ios_content_validation_test.dart
View file @
2e06ed07
...
...
@@ -57,26 +57,6 @@ void main() {
File
outputAppFrameworkBinary
;
setUpAll
(()
{
flutterRoot
=
getFlutterRoot
();
tempDir
=
createResolvedTempDirectorySync
(
'ios_content_validation.'
);
flutterBin
=
fileSystem
.
path
.
join
(
flutterRoot
,
'bin'
,
'flutter'
,
);
processManager
.
runSync
(<
String
>[
flutterBin
,
...
getLocalEngineArguments
(),
'create'
,
'--platforms=ios'
,
'-i'
,
'objc'
,
'hello'
,
],
workingDirectory:
tempDir
.
path
);
projectRoot
=
tempDir
.
childDirectory
(
'hello'
).
path
;
processManager
.
runSync
(<
String
>[
flutterBin
,
...
getLocalEngineArguments
(),
...
...
packages/flutter_tools/test/integration.shard/macos_content_validation_test.dart
View file @
2e06ed07
...
...
@@ -107,7 +107,7 @@ void main() {
expect
(
outputFlutterFramework
.
childDirectory
(
'Modules'
),
isNot
(
exists
));
// Archiving should contain a bitcode blob, but not building.
// This mimics Xcode behavior and pre
sent
a developer from having to install a
// This mimics Xcode behavior and pre
vents
a developer from having to install a
// 300+MB app.
final
File
outputFlutterFrameworkBinary
=
outputFlutterFramework
.
childDirectory
(
'Versions'
)
...
...
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