Use path dependencies for testing/symbols (flutter/engine#26261)
This commit is contained in:
@@ -104,6 +104,12 @@ analyze \
|
||||
--options "$FLUTTER_DIR/analysis_options.yaml" \
|
||||
"$FLUTTER_DIR/testing/scenario_app"
|
||||
|
||||
echo "Analyzing testing/symbols..."
|
||||
analyze \
|
||||
--packages="$FLUTTER_DIR/testing/symbols/.dart_tool/package_config.json" \
|
||||
--options "$FLUTTER_DIR/analysis_options.yaml" \
|
||||
"$FLUTTER_DIR/testing/symbols"
|
||||
|
||||
# Check that dart libraries conform.
|
||||
echo "Checking web_ui api conformance..."
|
||||
(cd "$FLUTTER_DIR/web_sdk"; pub get)
|
||||
|
||||
@@ -1,6 +1,24 @@
|
||||
# Copyright 2013 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.
|
||||
|
||||
name: verify_exported
|
||||
publish_to: none
|
||||
environment:
|
||||
sdk: '>=2.11.0 <3.0.0'
|
||||
|
||||
# Do not add any dependencies that require more than what is provided in
|
||||
# //third_party.pkg, //third_party/dart/pkg, or
|
||||
# //third_party/dart/third_party/pkg. In particular, package:test is not usable
|
||||
# here.
|
||||
|
||||
# If you do add packages here, make sure you can run `pub get --offline`, and
|
||||
# check the .packages and .package_config to make sure all the paths are
|
||||
# relative to this directory into //third_party/dart
|
||||
|
||||
dependencies:
|
||||
path: 1.6.2
|
||||
collection: 1.14.11
|
||||
path: any
|
||||
|
||||
dependency_overrides:
|
||||
path:
|
||||
path: ../../../third_party/dart/third_party/pkg/path
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:collection/collection.dart' show MapEquality;
|
||||
|
||||
// This script verifies that the release binaries only export the expected
|
||||
// symbols.
|
||||
@@ -43,7 +42,7 @@ void main(List<String> arguments) {
|
||||
assert(Directory(outPath).existsSync());
|
||||
|
||||
final Iterable<String> releaseBuilds = Directory(outPath).listSync()
|
||||
.where((FileSystemEntity entity) => entity is Directory)
|
||||
.whereType<Directory>()
|
||||
.map<String>((FileSystemEntity dir) => p.basename(dir.path))
|
||||
.where((String s) => s.contains('_release'));
|
||||
|
||||
@@ -61,7 +60,7 @@ void main(List<String> arguments) {
|
||||
|
||||
int _checkIos(String outPath, String nmPath, Iterable<String> builds) {
|
||||
int failures = 0;
|
||||
for (String build in builds) {
|
||||
for (final String build in builds) {
|
||||
final String libFlutter = p.join(outPath, build, 'Flutter.framework', 'Flutter');
|
||||
if (!File(libFlutter).existsSync()) {
|
||||
print('SKIPPING: $libFlutter does not exist.');
|
||||
@@ -73,10 +72,10 @@ int _checkIos(String outPath, String nmPath, Iterable<String> builds) {
|
||||
failures++;
|
||||
continue;
|
||||
}
|
||||
final Iterable<NmEntry> unexpectedEntries = NmEntry.parse(nmResult.stdout).where((NmEntry entry) {
|
||||
final Iterable<NmEntry> unexpectedEntries = NmEntry.parse(nmResult.stdout as String).where((NmEntry entry) {
|
||||
return !(((entry.type == '(__DATA,__common)' || entry.type == '(__DATA,__const)') && entry.name.startsWith('_Flutter'))
|
||||
|| (entry.type == '(__DATA,__objc_data)'
|
||||
&& (entry.name.startsWith('_OBJC_METACLASS_\$_Flutter') || entry.name.startsWith('_OBJC_CLASS_\$_Flutter'))));
|
||||
&& (entry.name.startsWith(r'_OBJC_METACLASS_$_Flutter') || entry.name.startsWith(r'_OBJC_CLASS_$_Flutter'))));
|
||||
});
|
||||
if (unexpectedEntries.isNotEmpty) {
|
||||
print('ERROR: $libFlutter exports unexpected symbols:');
|
||||
@@ -93,7 +92,7 @@ int _checkIos(String outPath, String nmPath, Iterable<String> builds) {
|
||||
|
||||
int _checkAndroid(String outPath, String nmPath, Iterable<String> builds) {
|
||||
int failures = 0;
|
||||
for (String build in builds) {
|
||||
for (final String build in builds) {
|
||||
final String libFlutter = p.join(outPath, build, 'libflutter.so');
|
||||
if (!File(libFlutter).existsSync()) {
|
||||
print('SKIPPING: $libFlutter does not exist.');
|
||||
@@ -105,17 +104,17 @@ int _checkAndroid(String outPath, String nmPath, Iterable<String> builds) {
|
||||
failures++;
|
||||
continue;
|
||||
}
|
||||
final Iterable<NmEntry> entries = NmEntry.parse(nmResult.stdout);
|
||||
final Map<String, String> entryMap = Map<String, String>.fromIterable(
|
||||
entries,
|
||||
key: (dynamic entry) => entry.name,
|
||||
value: (dynamic entry) => entry.type);
|
||||
final Iterable<NmEntry> entries = NmEntry.parse(nmResult.stdout as String);
|
||||
final Map<String, String> entryMap = <String, String>{
|
||||
for (final NmEntry entry in entries)
|
||||
entry.name: entry.type,
|
||||
};
|
||||
final Map<String, String> expectedSymbols = <String, String>{
|
||||
'JNI_OnLoad': 'T',
|
||||
'_binary_icudtl_dat_size': 'A',
|
||||
'_binary_icudtl_dat_start': 'D',
|
||||
// TODO(fxb/47943): Remove these once Clang lld does not expose them.
|
||||
// arm
|
||||
// TODO(dnfield): Remove these once Clang lld does not expose them.
|
||||
// arm https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=47943
|
||||
'__adddf3': 'T',
|
||||
'__addsf3': 'T',
|
||||
'__aeabi_cdcmpeq': 'T',
|
||||
|
||||
@@ -18,6 +18,7 @@ ALL_PACKAGES = [
|
||||
os.path.join("src", "flutter", "flutter_frontend_server"),
|
||||
os.path.join("src", "flutter", "testing", "litetest"),
|
||||
os.path.join("src", "flutter", "testing", "smoke_test_failure"),
|
||||
os.path.join("src", "flutter", "testing", "symbols"),
|
||||
os.path.join("src", "flutter", "tools", "android_lint"),
|
||||
os.path.join("src", "flutter", "tools", "const_finder"),
|
||||
os.path.join("src", "flutter", "tools", "licenses"),
|
||||
|
||||
Reference in New Issue
Block a user