-
Notifications
You must be signed in to change notification settings - Fork 226
[WIP] use frontend server for VM test platform #1399
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
Merged
jakemac53
merged 28 commits into
dart-lang:master
from
jonahwilliams:frontend_server_compilation
Mar 23, 2021
Merged
Changes from 24 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
3eddc2a
use frontend server for VM test platform
jonahwilliams 5f1c76f
Merge branch 'master' of github.com:dart-lang/test into frontend_serv…
jonahwilliams 778dbbb
opt out of null safety
jonahwilliams c0879ba
switch to frontend_server_client
jonahwilliams 6c6f959
use rootPackageLanguageVersionComment
jonahwilliams 8bac872
fix year
jonahwilliams 313f557
merge with master
jonahwilliams f932ad6
tweak tests and add comment
jonahwilliams c98910b
require latest frontend_server_client
jakemac53 000da33
Merge branch 'master' into frontend_server_compilation
jakemac53 6353265
fix up some null safety issues
jakemac53 3fb3e7a
produce a LoadException if the app fails to compile
jakemac53 0a5831c
remove unused import
jakemac53 4998cc9
add errorCount and check it
jakemac53 b323cab
pass the current package config to the frotnend server
jakemac53 bf1aa14
fix tests and expectations to match the new output
jakemac53 ad98660
delete output dill dir synchronously
jakemac53 e6ea03e
dont print incremental dependencies
jakemac53 164bf1b
add --use-data-isolate-strategy flag for use primarily in bazel
jakemac53 21a1b25
add some basic data isolate strategy tests
jakemac53 2a78037
fix up help output and expectations
jakemac53 e85f228
remove unused imports
jakemac53 8d96df0
code review updates
jakemac53 dae0aa2
update to use package:pool, move fields above constructor
jakemac53 2e2fac3
improve error handling of a sigkill during suite loading
jakemac53 08d1859
Merge branch 'master' into frontend_server_compilation
jakemac53 aa23f0c
Update pkgs/test_core/lib/src/runner/configuration.dart
jakemac53 98cc83d
Update pkgs/test/test/runner/data_isolate_strategy_test.dart
jakemac53 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| // Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file | ||
| // for details. All rights reserved. Use of this source code is governed by a | ||
| // BSD-style license that can be found in the LICENSE file. | ||
|
|
||
| @TestOn('vm') | ||
|
|
||
| import 'dart:convert'; | ||
| import 'dart:isolate'; | ||
|
|
||
| import 'package:package_config/package_config.dart'; | ||
| import 'package:test_descriptor/test_descriptor.dart' as d; | ||
|
|
||
| import 'package:test/test.dart'; | ||
|
|
||
| import '../io.dart'; | ||
|
|
||
| void main() { | ||
| late PackageConfig currentPackageConfig; | ||
|
|
||
| setUpAll(() async { | ||
| currentPackageConfig = | ||
| await loadPackageConfigUri((await Isolate.packageConfig)!); | ||
| }); | ||
|
|
||
| setUp(() async { | ||
| await d | ||
| .file('package_config.json', | ||
| jsonEncode(PackageConfig.toJson(currentPackageConfig))) | ||
| .create(); | ||
| }); | ||
|
|
||
| group('The data isolate strategy', () { | ||
| test('can be enabled', () async { | ||
| /// We confirm it is enabled by checking the error output for an invalid | ||
| /// test, it looks a bit different. | ||
| await d.file('test.dart', 'invalid Dart file').create(); | ||
| var test = await runTest(['--use-data-isolate-strategy', 'test.dart']); | ||
|
|
||
| expect( | ||
| test.stdout, | ||
| containsInOrder([ | ||
| 'Failed to load "test.dart":', | ||
| "Unable to spawn isolate: test.dart:1:9: Error: Expected ';' after this.", | ||
| 'invalid Dart file' | ||
| ])); | ||
|
|
||
| await test.shouldExit(1); | ||
| }); | ||
|
|
||
| test('can run tests', () async { | ||
| await d.file('test.dart', ''' | ||
| import 'package:test/test.dart'; | ||
| void main() { | ||
| test('true is true', () { | ||
| expect(true, isTrue); | ||
| }); | ||
| } | ||
| ''').create(); | ||
| var test = await runTest(['--use-data-isolate-strategy', 'test.dart']); | ||
|
|
||
| expect(test.stdout, emitsThrough(contains('+1: All tests passed!'))); | ||
| await test.shouldExit(0); | ||
| }); | ||
| }); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.