Collects files from `package:async_helper` and `tests/language`
that are generally useful, so that all test-related helpers are
in `package:expect`.
Moves the two libraries from `package:async_helper` into `package:expect`,
and the `tests/language/static_type_helper.dart` file too.
Deprecates `async_minitest.dart`, to follow `minitest.dart`,
expecting the Flutter use of it to have been fixed to not break
on deprecation (I believe Flutter no longer breaks builds on deprecations at all).
Patch 1 is the actual change.
Patch 2+4+8 is changing all existing references to the files.
Patch 6 ignores deprecation in files still using `async_minitest.dart`.
3+5+7+9 are updating this text to make the numbers match.
Then it's just test-expectations and small tweaks from there.
Change-Id: I1b665135b5fef9b9a0c3b340ffe9daf874d0174c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373120
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
The weekly bot this week finished in half the time, but was green.
Turns out the splitting of ast.dart into parts made the actual leak
testing not work because `Library` no longer existed in `ast.dart` (but
rather in `src/ast/libraries.dart`).
This CL:
1) Fixes the issue by also looking up the libraries uri (which is still
`ast.dart`.
2) Adds an option for requiring to find instances of some things it
looks for (e.g. `Library` in kernel) and throw if it doesn't. This
would have made the weekly bot turn red (fail) instead of being green
(saying that everything was fine) when really it wasn't.
3) Adds a test that is run on the try bots that will exercise the leak
finding - and throw if it doesn't find `Library` in kernel.
Change-Id: Ie69bfbd188eb870fdc1e340a341c1271187ef110
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389162
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
E.g. compile to aot:
out/ReleaseX64/dart-sdk/bin/dart compile aot-snapshot pkg/front_end/test/isolates_v_processes.dart
And run with a different number of isolates:
$ out/ReleaseX64/dart-sdk/bin/dartaotruntime --deterministic pkg/front_end/test/isolates_v_processes.aot --isolates -j1
=> 0:01:13.683401
$ out/ReleaseX64/dart-sdk/bin/dartaotruntime --deterministic pkg/front_end/test/isolates_v_processes.aot --isolates -j2
=> 0:00:53.379932
$ out/ReleaseX64/dart-sdk/bin/dartaotruntime --deterministic pkg/front_end/test/isolates_v_processes.aot --isolates -j4
=> 0:01:12.864165
(you might change `const bool doPrint = false;` to `true`,
compile again, run with -j4 and see interesting stops when it runs)
...or you could try the same but using processes:
$ out/ReleaseX64/dart-sdk/bin/dartaotruntime --deterministic pkg/front_end/test/isolates_v_processes.aot --processes -j1
=> 0:01:17.590922
$ out/ReleaseX64/dart-sdk/bin/dartaotruntime --deterministic pkg/front_end/test/isolates_v_processes.aot --processes -j2
=> 0:00:44.055109
$ out/ReleaseX64/dart-sdk/bin/dartaotruntime --deterministic pkg/front_end/test/isolates_v_processes.aot --processes -j4
=> 0:00:26.360444
Change-Id: Ie161e7dfa0f29931af34058b7b043ce93b839218
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/375481
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This:
* Keeps the '...' syntax so bash-history doesn't become useless
* Adds support for '*' in selecting, e.g.
`pkg/front_end/test/fasta/strong_suite.dart strong/*ffi*` or simply
`pkg/front_end/test/fasta/strong_suite.dart *ffi*`
Change-Id: I357d1972e21268b1fb017b9ee92259ce6d42f1ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358900
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
* Delete unused stuff
* rename 'path' to 'root'
* accept 'includeEndsWith' as a plain text string so we often can avoid
using regexp
* accept 'subRoots' to filter to directories faster and more precisly
than when using regexps in 'pattern'
* make 'list' async instead of async* (no more yield stuff which we
promptly turn into a list when actually using it)
Note that some changes in testing.json is not 100% semantic-preserving,
e.g. the "parser_all" suite previously had a pattern "/tests/.*\\.dart$"
which was probably meant to include all dart files in the "tests" folder
in the root, but in fact included all dart files in a "tests" folder
anywhere. The updated version does not.
Change-Id: Idd014274f86bf6214dee0753a7738ec80bc6a49e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358442
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
This code
```
import 'dart:isolate';
Future<void> main([List<String> arguments = const []]) async {
await something();
print("After the call!");
if (1+1==2) throw "This will be swallowed";
print("This will never be printed.");
}
Future<void> something() async {
Isolate.current.setErrorsFatal(false);
}
```
prints
```
$ out/ReleaseX64/dart pkg/front_end/test/fasta/hmm.dart
After the call!
$ echo $?
0
```
I.e. it dies silently, swallowing the throw and has a 0 exit code.
Using package:testing (and having it run at least one thing), it
previously did this so that if anything crashed, say, in user code
after the run (or maybe even some places inside package:testing?) it
would just swallow the error and leave a 0 exit code.
This CL sets the errors fatal thing to true (which must be the default)
causing the normal behaviour of it not swallowing any throws.
Change-Id: I9850bbf504e172cc4077e5e17265833ef58dfe90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350321
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
* Add team "groups" in tools/OWNERS_<group name>.
* Add top-level OWNERS as a fallback.
* Add OWNERS for all top-level directories.
* Add OWNERS to all packages.
For additional background information see go/dart-sdk-owners.
TEST=No op until code-owners is enabled.
Bug: b/200915407
Change-Id: I7fe6116cc599c749cd50ca16151d6d6a801d99d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229147
Reviewed-by: Jonas Termansen <sortie@google.com>
Most of these arguments are flowing through to a `--packages` argument
which allows passing the `package_config.json` file. In the long term we
should remove the `.packages` file entirely.
TEST=None, the change should have no visible impact.
Change-Id: I60a8b175d5e217a85588bbcb91cc5095514066b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211503
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This CL shards the CFE try bot tests better.
* co19_2 runs was previously made faster, so using 10 shards on that is
way too much.
* sdk_test runs was previously made faster, so using 5 shard on that is
way too much.
* unit_tests was taking ~10 minutes and wasn't sharded. This CL shards
it. Note that this sharding is semi-complicated because a few tests
use git which is not usable on shard-runs. To overcome this a previous
CL renamed the tests that use git and here the sharded runs only run
the tests that doesn't require git. Then the "main bot" runs the tests
that require git.
* unit tests suites was taking ~12 minutes and wasn't sharded. This CL
shards it. Note that this sharding is semi-complicated because a few
of the suites use git which is not usable on shard-runs. Also a single
suite uses many more files that it is reasonable to include in the
fileset for the shards. In both cases these are run on the "main bot"
instead. The suit runnier was already "threaded", but simply launched
all threads (say around 20 or something like that) at the same time.
That's not ideal if having, say, 8 cores to work with (which is what
the bots seem to have) - or 12 (which is what my computer has).
Now only 'cores - 1' "threads" are run at any one time, and most
"sub-suites" are sharded, so that if one finishes early that core
can start another "sub-suite" - hopefully utilizing more of the
resources avaiable on the computer running it.
In total - in my 'benchmarks' (i.e. try bot runs) - the
front-end-linux-release-x64-try bot previously rook around 35 minutes
to complete, and with these changes it takes around 15 minutes to
complete. The biggest entry in the timeline is now building dart which
takes almost half that time. It does so with fewer shards than before,
but each might be utilized for longer.
Change-Id: Ie034058d8f33aafd21bc49f2bc878484563ba01c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181383
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Emphasize that the operation is going away,
and mark constructor as deprecated.
TEST= Refactoring+deprecation only, covered by existing tests.
Change-Id: I82aa044cd2cf7bf347b624371399f44bda8f4a07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173261
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
This changes the reported failure from Crash to something more specific
to the encounter error, like ExpectationFileMismatch. Validation errors
for the .yaml file still produce Crash, and so does a couple of the
checks on Component integrity that were also used outside
incremental_load_from_dill_suite.dart
Change-Id: I48aa8cb25198d24e986b0f354db2b370dc9b8ac8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167565
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Breaking change 40678 requires the constructors int.fromEnvironment and
String.fromEnvironment to get new default values for the named
parameter `defaultValue`. This CL changes usages of these constructors
such that they do not depend on the default value, such that it
becomes a non-breaking change for code in the SDK repo to perform the
change in sdk and in sdk_nnbd.
Change-Id: I82af0e1f92d6cd3618b65c0c50d754ae8c39eb0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140284
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Some tests in pkg/frontend/test are actually test suites written using the
pkg/testing framework.
This change runs these suites using a custom test runner instead of simply
running the test file, which makes the individual test results, timings and
logs available to the test system.
Change-Id: Iae5f37d9bd1b3e9b26c66443fe10e5cca6a6b6bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118540
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Splits strong_test into 4 shards. This test took 4+ minutes locally with
the fast_strong_test and analyze_test ticking in at ~1:45. This change
makes local testing of frontend unittests take 2 instead of 4 minutes in
total.
Change-Id: Id6015de86d547b209a699b1e5196b3edad1e6977
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114501
Reviewed-by: Jens Johansen <jensj@google.com>
This makes it an actual Pub package like most other code inside the SDK
repo. The main goal is to make it easier to write tests for the test
runner itself.
This change:
- Moves all of the code from tools/testing/dart/ over to
pkg/test_runner. Most of it ends up under test_runner/lib/src.
- Move tools/testing/dart/main.dart to
pkg/test_runner/bin/test_runner.dart.
- Move standalone_2/io/test_runner_test.dart to
pkg/test_runner/test/test_runner_test.dart. I don't think it currently
works, but it wasn't being run in its old location either.
- Add test_runner to the analysis-server bot. This ensures the
test_runner package is static error clean.
- Remove standalone_2/io/test_runner_analyze_test.dart which used to
attempt to do the above and is no longer needed.
- Update test.py to look for the test runner at its new location.
- Add test_runner to the repo .packages file and remove the weird
test_dart pseudo-package. (I think this fixes #35279.)
- Remove status file entries for the removed standalone_2 tests.
There are no code changes to the test runner itself aside from fixing
up import paths.
Change-Id: I3d05d50d222b291848fa5a30de2846e803bc81e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105821
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
These versions don't run the VM on the generated .dill files.
These tests are still "Slow" in status-file lingo, as they run for
about 30 seconds on a fast machine.
Change-Id: I7bd326a14c8f1f1905d4c6b4d5f850a95b135325
Reviewed-on: https://dart-review.googlesource.com/c/88967
Reviewed-by: Aske Simon Christensen <askesc@google.com>