Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ deps = {
Var('flutter_git') + '/third_party/yapf' + '@' + '212c5b5ad8e172d2d914ae454c121c89cccbcb35',

'src/flutter/third_party/boringssl/src':
'https://boringssl.googlesource.com/boringssl.git' + '@' + Var('dart_boringssl_rev'),
'https://boringssl.googlesource.com/boringssl.git' + '@' + Var('dart_boringssl_rev'),

'src/flutter/third_party/perfetto':
Var('flutter_git') + "/third_party/perfetto" + '@' + Var('dart_perfetto_rev'),
Expand Down Expand Up @@ -695,6 +695,9 @@ deps = {
'src/flutter/third_party/pkg/archive':
Var('chromium_git') + '/external/github.com/brendan-duncan/archive.git' + '@' + '9de7a0544457c6aba755ccb65abb41b0dc1db70d', # 3.1.2

'src/flutter/third_party/pkg/coverage':
Var('flutter_git') + '/third_party/coverage.git' + '@' + 'bb0ab721ee4ceef1abfa413d8d6fd46013b583b9', # 1.7.2

'src/flutter/third_party/pkg/equatable':
Var('flutter_git') + '/third_party/equatable.git' + '@' + '2117551ff3054f8edb1a58f63ffe1832a8d25623', # 2.0.5

Expand All @@ -707,6 +710,12 @@ deps = {
'src/flutter/third_party/pkg/googleapis':
Var('flutter_git') + '/third_party/googleapis.dart.git' + '@' + '526011f56d98eab183cc6075ee1392e8303e43e2', # various

'src/flutter/third_party/pkg/io':
Var('flutter_git') + '/third_party/io.git' + '@' + '997a6243aad20af4238147d9ec00bf638b9169af', # 1.0.5-wip

'src/flutter/third_party/pkg/node_preamble':
Var('flutter_git') + '/third_party/node_preamble.dart.git' + '@' + '47245865175929ec452d8058e563c267b64c3d64', # 2.0.2

'src/flutter/third_party/pkg/platform':
Var('dart_git') + '/platform.dart' + '@' + '1ffad63428bbd1b3ecaa15926bacfb724023648c', # 3.1.0

Expand Down
2 changes: 1 addition & 1 deletion ci/licenses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function verify_licenses() (

local actualLicenseCount
actualLicenseCount="$(tail -n 1 flutter/ci/licenses_golden/licenses_flutter | tr -dc '0-9')"
local expectedLicenseCount=879 # When changing this number: Update the error message below as well describing the newly expected license types.
local expectedLicenseCount=888 # When changing this number: Update the error message below as well describing the newly expected license types.

if [[ $actualLicenseCount -ne $expectedLicenseCount ]]; then
echo "=============================== ERROR ==============================="
Expand Down
28 changes: 28 additions & 0 deletions ci/licenses_golden/excluded_files
Original file line number Diff line number Diff line change
Expand Up @@ -2155,10 +2155,38 @@
../../../flutter/third_party/perfetto/ui/src/plugins/dev.perfetto.LargeScreensPerf/OWNERS
../../../flutter/third_party/perfetto/ui/src/test
../../../flutter/third_party/pkg/archive
../../../flutter/third_party/pkg/coverage/.git
../../../flutter/third_party/pkg/coverage/.github
../../../flutter/third_party/pkg/coverage/.gitignore
../../../flutter/third_party/pkg/coverage/AUTHORS
../../../flutter/third_party/pkg/coverage/CHANGELOG.md
../../../flutter/third_party/pkg/coverage/PATENTS
../../../flutter/third_party/pkg/coverage/README.md
../../../flutter/third_party/pkg/coverage/analysis_options.yaml
../../../flutter/third_party/pkg/coverage/benchmark/.gitignore
../../../flutter/third_party/pkg/coverage/pubspec.yaml
../../../flutter/third_party/pkg/coverage/test
../../../flutter/third_party/pkg/equatable
../../../flutter/third_party/pkg/flutter_packages
../../../flutter/third_party/pkg/gcloud
../../../flutter/third_party/pkg/googleapis
../../../flutter/third_party/pkg/io/.git
../../../flutter/third_party/pkg/io/.github
../../../flutter/third_party/pkg/io/.gitignore
../../../flutter/third_party/pkg/io/AUTHORS
../../../flutter/third_party/pkg/io/CHANGELOG.md
../../../flutter/third_party/pkg/io/README.md
../../../flutter/third_party/pkg/io/analysis_options.yaml
../../../flutter/third_party/pkg/io/example
../../../flutter/third_party/pkg/io/pubspec.yaml
../../../flutter/third_party/pkg/io/test
../../../flutter/third_party/pkg/node_preamble/.git
../../../flutter/third_party/pkg/node_preamble/.gitignore
../../../flutter/third_party/pkg/node_preamble/CHANGELOG.md
../../../flutter/third_party/pkg/node_preamble/README.md
../../../flutter/third_party/pkg/node_preamble/example
../../../flutter/third_party/pkg/node_preamble/package.json
../../../flutter/third_party/pkg/node_preamble/pubspec.yaml
../../../flutter/third_party/pkg/platform
../../../flutter/third_party/pkg/process
../../../flutter/third_party/pkg/process_runner
Expand Down
380 changes: 379 additions & 1 deletion ci/licenses_golden/licenses_flutter

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions testing/pkg_test_demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Demo of `package:test` with `DEPS`-vendored packages

Historically, `flutter/engine` used a homegrown test framework,
[`package:litetest`](../litetest/) to avoid depending on the unwieldy set of
dependencies that `package:test` brings in. However, `package:test` is now
vendored in `DEPS` (used by the Dart SDK).'

This demo shows that:

- It's possible to use `package:test` with entirely local dependencies.
- The functionality of `package:test` (such as filtering, IDE integration, etc.)
is available.

See <https://github.com/flutter/flutter/issues/133569> for details.

## Usage

Navigate to this directory:

```sh
cd testing/pkg_test_demo
```

And run the tests using `dart test`[^1]:

```sh
dart test
```

[^1]:
In practice, you'll want to use the `dart` binary that is vendored in the
pre-built SDK.
117 changes: 117 additions & 0 deletions testing/pkg_test_demo/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# 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: pkg_test_demo
publish_to: none

# Do not add any dependencies that require more than what is provided in
# //third_party/dart/pkg or //third_party/dart/third_party/pkg.

# 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

environment:
sdk: '>=3.2.0-0 <4.0.0'

dev_dependencies:
test:

dependency_overrides:
_fe_analyzer_shared:
path: ../../../third_party/dart/pkg/_fe_analyzer_shared
_macros:
path: ../../../third_party/dart/pkg/_macros
analyzer:
path: ../../../third_party/dart/pkg/analyzer
args:
path: ../../../third_party/dart/third_party/pkg/args
async:
path: ../../../third_party/dart/third_party/pkg/async
boolean_selector:
path: ../../../third_party/dart/third_party/pkg/boolean_selector
collection:
path: ../../../third_party/dart/third_party/pkg/collection
convert:
path: ../../../third_party/dart/third_party/pkg/convert
coverage:
path: ../../third_party/pkg/coverage
crypto:
path: ../../../third_party/dart/third_party/pkg/crypto
file:
path: ../../../third_party/dart/third_party/pkg/file/packages/file
frontend_server_client:
path: ../../../third_party/dart/third_party/pkg/webdev/frontend_server_client
glob:
path: ../../../third_party/dart/third_party/pkg/glob
http_multi_server:
path: ../../../third_party/dart/third_party/pkg/http_multi_server
http_parser:
path: ../../../third_party/dart/third_party/pkg/http_parser
io:
path: ../../third_party/pkg/io
js:
path: ../../../third_party/dart/pkg/js
logging:
path: ../../../third_party/dart/third_party/pkg/logging
macros:
path: ../../../third_party/dart/pkg/macros
matcher:
path: ../../../third_party/dart/third_party/pkg/matcher
meta:
path: ../../../third_party/dart/pkg/meta
mime:
path: ../../../third_party/dart/third_party/pkg/mime
node_preamble:
path: ../../third_party/pkg/node_preamble
package_config:
path: ../../../third_party/dart/third_party/pkg/package_config
path:
path: ../../../third_party/dart/third_party/pkg/path
pool:
path: ../../../third_party/dart/third_party/pkg/pool
pub_semver:
path: ../../../third_party/dart/third_party/pkg/pub_semver
shelf:
path: ../../../third_party/dart/third_party/pkg/shelf/pkgs/shelf
shelf_packages_handler:
path: ../../../third_party/dart/third_party/pkg/shelf/pkgs/shelf_packages_handler
shelf_static:
path: ../../../third_party/dart/third_party/pkg/shelf/pkgs/shelf_static
shelf_web_socket:
path: ../../../third_party/dart/third_party/pkg/shelf/pkgs/shelf_web_socket
source_map_stack_trace:
path: ../../../third_party/dart/third_party/pkg/source_map_stack_trace
source_maps:
path: ../../../third_party/dart/third_party/pkg/source_maps
source_span:
path: ../../../third_party/dart/third_party/pkg/source_span
stack_trace:
path: ../../../third_party/dart/third_party/pkg/stack_trace
stream_channel:
path: ../../../third_party/dart/third_party/pkg/stream_channel
string_scanner:
path: ../../../third_party/dart/third_party/pkg/string_scanner
term_glyph:
path: ../../../third_party/dart/third_party/pkg/term_glyph
test:
path: ../../../third_party/dart/third_party/pkg/test/pkgs/test
test_api:
path: ../../../third_party/dart/third_party/pkg/test/pkgs/test_api
test_core:
path: ../../../third_party/dart/third_party/pkg/test/pkgs/test_core
typed_data:
path: ../../../third_party/dart/third_party/pkg/typed_data
vm_service:
path: ../../../third_party/dart/pkg/vm_service
watcher:
path: ../../../third_party/dart/third_party/pkg/watcher
web:
path: ../../../third_party/dart/third_party/pkg/web
web_socket_channel:
path: ../../../third_party/dart/third_party/pkg/web_socket_channel
webkit_inspection_protocol:
path: ../../../third_party/dart/third_party/pkg/webkit_inspection_protocol
yaml:
path: ../../../third_party/dart/third_party/pkg/yaml
17 changes: 17 additions & 0 deletions testing/pkg_test_demo/test/example_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 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.

import 'package:test/test.dart';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Needs the engine copyright header.

(Hopefully when we finish the buildmoot, this can be enforced by a tool.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


void main() {
test('String.split() splits the string on the delimiter', () {
const String string = 'foo,bar,baz';
expect(string.split(','), equals(<String>['foo', 'bar', 'baz']));
});

test('String.trim() removes surrounding whitespace', () {
const String string = ' foo ';
expect(string.trim(), equals('foo'));
});
}
1 change: 1 addition & 0 deletions testing/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,7 @@ def build_dart_host_test_list(build_dir):
],
),
(os.path.join('flutter', 'testing', 'litetest'), []),
(os.path.join('flutter', 'testing', 'pkg_test_demo'), []),
(os.path.join('flutter', 'testing', 'skia_gold_client'), []),
(os.path.join('flutter', 'testing', 'scenario_app'), []),
(
Expand Down
2 changes: 2 additions & 0 deletions tools/pub_get_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
os.path.join(ENGINE_DIR, 'testing', 'benchmark'),
os.path.join(ENGINE_DIR, 'testing', 'dart'),
os.path.join(ENGINE_DIR, 'testing', 'litetest'),
os.path.join(ENGINE_DIR, 'testing', 'pkg_test_demo'),
os.path.join(ENGINE_DIR, 'testing', 'scenario_app'),
os.path.join(ENGINE_DIR, 'testing', 'skia_gold_client'),
os.path.join(ENGINE_DIR, 'testing', 'smoke_test_failure'),
Expand Down Expand Up @@ -92,6 +93,7 @@ def check_package(package):
os.path.join(ENGINE_DIR, 'shell', 'platform', 'fuchsia'),
os.path.join(ENGINE_DIR, 'shell', 'vmservice'),
os.path.join(ENGINE_DIR, 'sky', 'packages'),
os.path.join(ENGINE_DIR, 'testing', 'pkg_test_demo'),
os.path.join(ENGINE_DIR, 'third_party'),
os.path.join(ENGINE_DIR, 'web_sdk'),
]
Expand Down