Commit graph

435 commits

Author SHA1 Message Date
Janice Collins 613a2095d5 Delete the old fe comparison logic in the test runner.
This doesn't look like it would be functional even if it was referenced
somewhere as the package is gone.

Change-Id: I819987ed7718db67941a00cb844a142fb5bb8bd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250781
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-07 17:21:43 +00:00
Devon Carew 3dbed884c2 [pkg] use package:lints when analying pkg/
Change-Id: Ib25573375ea1f54e07846af6fcd9cd74a8fefb7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250784
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-07-07 14:29:22 +00:00
Janice Collins 822cd1cbd5 Remove dartanalyzer from built SDK.
Bug: https://github.com/dart-lang/sdk/issues/48457
Change-Id: Ic0d038299712989b8445859590ff870ce3bdc13a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249662
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-01 17:43:20 +00:00
Alexander Thomas 81d86a05b2 [testing] Simplify analyzer configurations
Bug: b/237755665
Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,analyzer-mac-release-try,analyzer-win-release-try
Change-Id: Ia48331d6fd6bf00df9dbe1b895e157a0957064f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249608
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-07-01 16:16:42 +00:00
Ahmed Ashour c7a02bc43e [_fe_analyzer_shared] fix 4 spaces comments as code block
Fixes #49047

Change-Id: I1aa08fc417365ca894467b15d5094ea203f01940
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245162
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-07-01 15:55:00 +00:00
William Hesse 132810f343 [testing] Fix failure in test runner's batch compilation while deflaking tests.
All subclasses of Command must override indexedCopy.
A @subClassMustOverride annotation could have caught this problem.

Bug: https://github.com/dart-lang/sdk/issues/30175
Change-Id: I836cf58ae2233e3b2a5c7a494461e570aad5ffb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250300
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2022-06-30 20:01:21 +00:00
Alexander Aprelev 0c3455e52f [infra] Fix hanging test cleanup logic.
This is follow-up to a2d2d693dc.

TEST=ci

Bug: https://github.com/dart-lang/sdk/issues/49303
Change-Id: I2db7d4518f12adca125395b4a3315fcf84b30de0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250002
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-06-28 00:39:28 +00:00
William Hesse b153d46c4e [testing] Allow pkg/front_end tests to fail with exit code 1
The test runner expects VM tests to exit with a compile error or
an uncaught exception, which have special exit codes.
Some front end tests fail by explicitly exiting with exit code 1.
Recognize these tests as test failures, and not as failures
of the test infrastructure.

Change-Id: Ib89d89c69f0e4f289fde0f762a7dd47dad446953
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249820
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2022-06-27 10:20:22 +00:00
Devon Carew e9f7cab5ca [tools] migrate the rest of tools/ to null safety
Change-Id: Ieec55a99e9020f8f3962654e07518726d9f66fc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249540
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-06-24 16:38:39 +00:00
Alexander Aprelev 6d923dfd99 Revert "Deprecate outdated errors, drop CastError and NullThrownError."
This reverts commit 0f3dea33f9.

Reason for revert: breaks dart->engine roller as flutter still uses NullThrownError, fails analysis step

Original change's description:
> Deprecate outdated errors, drop `CastError` and `NullThrownError`.
>
> Both `CastError` and `NullThrownError` becomes just (deprecated) aliases for `TypeError`.
>
> `FallThroughError` becomes deprecated. Fall-through was made a compile-time error in Dart 2.0, the error should no longer be used.
>
> `CyclicInitializationError` is deprecated. Null safe Dart doesn't specify which error a late initialization error throws. We use internal errors now.
>
> These errors should not be needed in sound null-safe mode (if they are even needed now), and so should be removed in Dart 3.0.
>
> TEST= No new tests, should not change behavior in a significant way.
>
> Bug: https://github.com/dart-lang/sdk/issues/49141
> Change-Id: I636e9a0d0c32021d40bb819a88a1f57db6efc5a9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247384
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Reviewed-by: Brian Quinlan <bquinlan@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/49141
Change-Id: I1b2802ec69fe654525e683527ff3554ff972f0c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248741
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-06-16 17:12:19 +00:00
Joshua Litt 878901a16f [test_runner] Fix nullcheck failure when running tests.
This fixes infra failure on the dart2wasm bot.

Change-Id: I22df35f3750f2f7f608dd333ab4b811997a069c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248700
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2022-06-16 12:09:49 +00:00
Alexander Thomas a2d2d693dc [infra] Migrate test_runner to null safety
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-android-release-arm64c-try
Fixes: b/232495224
Change-Id: I0338db48c0cc89ec35d52bff2f508105e80c3538
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248008
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2022-06-15 15:51:58 +00:00
Lasse R.H. Nielsen 0f3dea33f9 Deprecate outdated errors, drop CastError and NullThrownError.
Both `CastError` and `NullThrownError` becomes just (deprecated) aliases for `TypeError`.

`FallThroughError` becomes deprecated. Fall-through was made a compile-time error in Dart 2.0, the error should no longer be used.

`CyclicInitializationError` is deprecated. Null safe Dart doesn't specify which error a late initialization error throws. We use internal errors now.

These errors should not be needed in sound null-safe mode (if they are even needed now), and so should be removed in Dart 3.0.

TEST= No new tests, should not change behavior in a significant way.

Bug: https://github.com/dart-lang/sdk/issues/49141
Change-Id: I636e9a0d0c32021d40bb819a88a1f57db6efc5a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247384
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-06-15 15:35:58 +00:00
Nicholas Shahan 6bcb186436 [ddc] Add new test and builder configurations
- Add new versions of exisiting configurations to support the arm64
architecture. The current DDC configurations don't name one but
default to x64. In the future I would like to remove the default
and simply specify (x64|arm64) but I'm not making this change now
because I don't want to break the history in the test database.

- Add new "canary" named test configurations that rely on a
specific builder to pass a build time flag
`--gn-args ddc_canary=true`.

Change-Id: I675899ea2e952e2183b8379b60ddaa67e8b864a5
Issue: https://github.com/dart-lang/sdk/issues/48950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243562
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-06-14 17:54:47 +00:00
Konstantin Shcheglov ba4b3d20d2 Import dart:typed_data instead of deprecated re-export from dart:io
Bug: https://github.com/dart-lang/sdk/issues/23067
Change-Id: I6bfe7afabe344bb0de690f762b5f80604809021e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248344
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2022-06-14 06:29:37 +00:00
Devon Carew 2acf036023 move the third_party/pkg_tested packages into third_party/pkg
Change-Id: I7e2499aafb1ae85da4699358909ac67337593a11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247927
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-06-13 17:04:36 +00:00
Ryan Macnak 6a1749edbc [vm, ffi] Misc fixes for RV32 FFI.
TEST=local
Change-Id: I50f0a848cfd973389a7e903aa89e650aa7420aaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247503
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-06-08 19:41:52 +00:00
Alexander Thomas 8d6e0a85ee [test_runner] Prepare static error testing for null safety migration
Bug: b/232495224
Change-Id: I3c9de9574637bbc114d42da9804ca77cf0d054f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247082
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-06-04 18:42:47 +00:00
Devon Carew f7c46f145c [pkg] prefer 'any' deps for package dev dependencies
Tested: CI validation
Change-Id: If65cc156130a65ffe00c6f1660ac320e2921afae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246053
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-05-27 01:34:59 +00:00
Devon Carew 0e8eece6b6 [pkg/test_runner] remove an explicit reference to package:file
Change-Id: I553161706c96413493fd525bbee17498b991f4f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246001
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2022-05-26 00:09:38 +00:00
Alexander Thomas ddad653842 [test_runner] Use package:args
* Use lowercase-with-hyphens for option names
* Add backwards compatible aliases_with_underscores.
* Deny list `reset-browser-configuration`.
* Add more tests.

Bug: b/232495224
Change-Id: Ife56c48450b5e15577c4aec859355e80c2f57bdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245366
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-05-24 10:51:51 +00:00
Nate Bosch 6ebd2633cd Use any deps for all unpublished packages
It should not be necessary to ever run `pub get` for a package which is
not published. All packages used in the SDK are controlled by a single
package config, so it's not necessary to declare versions or paths for
any packages.

Remove all dependency overrides.

R=devoncarew@google.com

Change-Id: Icb328813b471f35ee4c99995f4e90aac4d8ed438
Tested: Covered by existing static analysis.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244767
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-05-17 01:22:25 +00:00
Alexander Thomas 526d85ad79 [testing] Remove vendored args package
The vendored package was just used in some tooling that should be easy
to update to any breaking changes in args. Language versioning ensures
we can handle changes in the language as well.

Bug: b/232495224
Change-Id: I15223187f19b6fe2229dd4ac05e51fd794cbfbd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244627
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2022-05-13 17:15:46 +00:00
Nate Bosch c54ade0cce Use package config in more test runner config
Change-Id: I7ac7c619be321c8e63d6b95537d68f7b8617da0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244046
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-05-11 08:58:04 +00:00
Michael Thomsen 0baa3c1e62 Discontinue .packages file
Contributes to https://github.com/dart-lang/sdk/issues/48275

Change-Id: I3acb90b91b9b206b69ca0ae311aa43f5954c29a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243625
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-05-11 08:50:45 +00:00
Sigmund Cherem 98e565a7f7 [test_runner]: provide package_config.json by default.
As we intend to remove the '.packages' file in the SDK, the test runner
should no longer use it as a default value for the '--packages' flag.

Change-Id: Iaaa16a974f8fc137e6f779494903859a242d7f9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243643
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Auto-Submit: Sigmund Cherem <sigmund@google.com>
2022-05-09 14:07:42 +00:00
Alexander Thomas 660d985695 [testing] Use absolute paths as default value for Chrome and Firefox
The browser_controller now checks if the file exists, but that check
fails for the default Linux paths. We use absolute paths on all other
platforms.

Change-Id: Ifde383cc680047f103abbb79d3bb2ce8502a91e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243906
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-05-09 07:54:52 +00:00
Alexander Thomas f964af3bf3 [test_runner] Add web driver service
This changes safaridriver to be running whenever test.py runs any safari
configuration. The service exists when all tests are done. The process
can only be used by a single browser but supports many consecutive
sessions.

Bug: b/208186791
Cq-Include-Trybots: luci.dart.try:dart2js-strong-mac-x64-safari-try
Change-Id: I7c1d5910f8c97ae97c1806a07251df918f139e0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243720
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-05-05 21:49:56 +00:00
Alexander Thomas d45ae603f7 [infra] Improve port selection for safaridriver
Bug: b/208186791
Cq-Include-Trybots: luci.dart.try:dart2js-strong-mac-x64-safari-try
Change-Id: I654ce8a60746c79d2922eebbda4cced822c821cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242871
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2022-04-29 12:55:41 +00:00
Alexander Thomas 11a6820f7c [infra] Use safaridriver to launch Safari
For some reason, we launched Safari from a file, which since macOS 10.14
requires the user to confirm the operation in a modal dialog which
caused timeouts.

* Removed unused http test driver port option.
* Added some basic tests for test.py's browser interactions.

Bug: b/208186791
Change-Id: I070529148d37bf312f219c576abca3da972f73e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204202
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-04-29 08:57:41 +00:00
Clement Skau af2de233e5 [infra][nit] Make test.py output a little cleaner.
test.py's output is truncated to a certain length to avoid
tests flooding the terminal.
However, the way it's implemented it likely cuts off a line
of output at an arbitrary point, and then prints its own
message to let the user know the truncation happened.
This ultimately means that said message will often be hard to
spot as it flows together with the output.

This change makes sure there is always a newline at the end
of the output, ensuring the message will be on its own line.

TEST=Manual testing locally.
Change-Id: I91146ce7ce3d4fb0a35465a77aaf783df2acf4b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241742
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2022-04-20 15:21:28 +00:00
Clement Skau 1320e644d5 [infra] Make test.py --build fail fast.
Currently, running `test.py --build` will attempt to build
the necessary files, before running the tests specified.
However, the tests are run even if this build fails, which
usually means old build artefacts are used for running the tests.
This can lead to some very confusing results if you do not yourself
catch that the build failed half-way through the run.

This change makes `test.py` exit with an error code and a message,
and does not proceed with the tests, if the build fails.

TEST=Manual testing locally.
Change-Id: I4e0f1d3f8d695219f2e4c0d7b474542af136aca9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241740
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2022-04-20 13:55:58 +00:00
Ryan Macnak f59e196703 [vm, ffi] Callbacks on AOT RISC-V.
TEST=ffi_2/*callback*
Bug: https://github.com/dart-lang/sdk/issues/48164
Change-Id: I22e27584247c014fef371dd0a68bc01e73c73b5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240141
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-05 18:23:03 +00:00
Mark Zhou 60857f8bc7 Fixing test runner --help typo
Change-Id: I2fc4bfc8f9f43ae379cfc590c4dc4d6765a493de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239732
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2022-04-01 00:39:25 +00:00
Paul Berry 5c0e0922d0 Defer analysis of closure arguments when inference-update-1 is enabled.
In order to address https://github.com/dart-lang/language/issues/731
(improved type inference for `fold` etc.) we're going to need to
sometimes defer analysis of invocation arguments that are closures, so
that closure parameters can have their types inferred based on other
parameters.  To avoid annoying the user with inconsistent behaviors,
we defer analysis of closures in all circumstances, even if it's not
necessary to do so for type inference purposes.

This has a minor user-visible effect: if an invocation contains some
closures and some non-closures, any demotions that happen due to write
captures in the closures are postponed until the end of the
invocation; this means that the write-captured variables remain
promoted for other invocation arguments, even if those arguments
appear after the closure.  This is safe because there is no way for
the closure to be called until after all of the other invocation
arguments are evaluated.  See the language tests in this CL for
details.

Note that this change only has an effect when the experimental feature
`inference-update-1` is enabled.

Change-Id: I283fc5eb07af2aeca0a06d523011d8c4617fbad7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237720
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-03-25 16:40:10 +00:00
Konstantin Shcheglov 3d69c3c0c4 Restore sync file methods in AnalysisSession.
There are clients, like `built_value` that cannot be updated.

Change-Id: I27371018039f22cd7ca2cb82b30ec33469aa6e4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238002
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-21 23:27:57 +00:00
Ryan Macnak c9d2394c02 [infra] Remove references to unsupported ARMv6 and ARMv5TE.
Change-Id: I2fb2f438940866333c7d34d26f7eb4c447b25a95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237624
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-03-17 00:07:54 +00:00
Konstantin Shcheglov 0b7b70b758 Deprecate synchronous methods in AnalysisSession.
Change-Id: I9bd3bf2d3d6dbc74ffefde1c06f83e9200b0f552
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2022-03-07 18:17:41 +00:00
Robert Nystrom e003a831a3 Add myself to OWNERS in the various test packages.
I don't seem to have much time for hacking on the test runner these
days, unfortunately, but I'm still happy to review changes and keep an
eye on it.

Change-Id: I273f720e7bbd0b6658d1554898cfc8ff2f815111
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235480
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-03-05 08:14:17 +00:00
Ryan Macnak b1564fa711 [infra] Include RISC-V in --arch=all.
Change-Id: Ic4cd7e80e73c68ea11e184791988e36c0ebb0dbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234907
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-03-03 00:37:40 +00:00
Aske Simon Christensen 6faa5f3bd0 [dart2wasm] Initial commit for the Dart-to-WasmGC compiler.
This is work in progress. Several language features are still
unimplemented or only partially implemented.

Instructions for running the compiler and its output can be found in
pkg/dart2wasm/dart2wasm.md. These procedures are preliminary and
expected to change.

The best version of d8 to use for this version of dart2wasm is 10.0.40,
as explained here: https://dart-review.googlesource.com/c/sdk/+/232097

This commit also adds a dart2wasm-hostasserts-linux-x64-d8 testing
configuration to run the compiler over the test suite.

The history of the prototype that this is based on can be seen here:

https://github.com/askeksa-google/sdk/tree/wasm_prototype

Issue: https://github.com/dart-lang/sdk/issues/32894

Change-Id: I910b6ff239ef9c5f66863e4ca97b39b8202cce85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175728
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-02-16 11:11:14 +00:00
Alexander Thomas 30beab0f43 [infra] Add OWNERS to the Dart SDK
* 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>
2022-02-14 14:06:34 +00:00
Nate Bosch 33e174084a Replace Uri.scheme == with Uri.isScheme
Use `hasScheme` in place of comparing against the empty string, and
`isScheme` to compare against all other schemes.

TEST=No behavior changes.

Change-Id: Ifc9fd13c6cf37933ebd4a754c4b500dedbcb291b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231185
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-02-08 21:38:57 +00:00
Sigmund Cherem b0aebc3b33 [test_runner]: remove uses of dartdevc script in test_runner.
These scripts will be removed in a future version of Dart,
so we switch to run ddc from either sources or from the snapshot instead.

Change-Id: I1c8e2cf6014d484b5951ec66ae9c4f667470b435
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229303
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2022-01-27 21:13:41 +00:00
Sigmund Cherem 20ed5e0dc6 [test_runner]: cleanup on Dart2jsCompilationCommand
Changes are:
* remove case in createOutput, this is unreachable and
  now handled by the subclass
* remove "|| true" - it was meant for debugging and I forgot
  to delete it.

Change-Id: I32dbc34ec51c02c9f311fa1b3a246b3cb73db194
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229380
Reviewed-by: Alexander Thomas <athom@google.com>
2022-01-27 21:13:41 +00:00
Sigmund Cherem d19a405abb [test_runner]: launch dart2js via 'dart compile js'.
We will be deprecating the dart2js script shipped with the sdk under
dart-sdk/bin/. This change starts using 'dart compile js' when
running dart2js in `useSdk` mode.

For host-asserts, we continue to use a helper script that invokes
dart2js from sources. We will continue to support this helper
script, but it will become an internal only tool. It is a bit
confusing that such script lives under sdk/bin/dart2js and
sdk/bin/dart2js_developer. We may consider renaming this in a later
CL or moving it to a new location (e.g. under tools).

Change-Id: I4f426936f5e0e0a1a7854f4f555198d5ae382079
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229060
Reviewed-by: Alexander Thomas <athom@google.com>
2022-01-21 16:42:40 +00:00
Sigmund Cherem 79dbdea71b [test_runner]: combine dart2x and dart2js configurations.
Dart2xCompilerConfiguration is no longer needed now that the only
use of it is to be subclassed by Dart2jsCompilerConfiguration.


Change-Id: I6c52ee477d9a3aceecbd8f65b41bc14bc2e1b58b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229040
Reviewed-by: Alexander Thomas <athom@google.com>
2022-01-21 16:42:40 +00:00
Ryan Macnak 04ba20aa98 [vm] Support RISC-V.
Implements a backend targeting RV32GC and RV64GC, based on Linux standardizing around GC. The assembler is written to make it easy to disable usage of C, but because the sizes of some instruction sequences are compile-time constants, an additional build configuration would need to be defined to make use of it.

The assembler and disassembler cover every RV32/64GC instruction. The simulator covers all instructions except accessing CSRs and the floating point state accessible through such, include accrued exceptions and dynamic rounding mode.

Quirks:
  - RISC-V is a compare-and-branch architecture, but some existing "architecture-independent" parts of the Dart compiler assume a condition code architecture. To avoid rewriting these parts, we use a peephole in the assembler to map to compare-and-branch. See Assembler::BranchIf. Luckily nothing depended on taking multiple branches on the same condition code set.
  - There are no hardware overflow checks, so we must use Hacker's Delight style software checks. Often these are very cheap: if the sign of one operand is known, a single branch is needed.
  - The ranges of RISC-V branches and jumps are such that we use 3 levels of generation for forward branches, instead of the 2 levels of near and far branches used on ARM[64]. Nearly all code is handled by the first two levels with 20-bits of range, with enormous regex matchers triggering the third level that uses aupic+jalr to get 32-bits of range.
  - For PC-relative calls in AOT, we always generate auipc+jalr pairs with 32-bits of range, so we never generate trampolines.
  - Only a subset of registers are available in some compressed instructions, so we assign the most popular uses to these registers. In particular, THR, TMP[2], CODE and PP. This has the effect of assigning CODE and PP to volatile registers in the C calling convention, whereas they are assigned preserved registers on the other architectures. As on ARM64, PP is untagged; this is so short indices can be accessed with a compressed instruction.
  - There are no push or pop instructions, so combining pushes and pops is preferred so we can update SP once.
  - The C calling convention has a strongly aligned stack, but unlike on ARM64 we don't need to use an alternate stack pointer. The author ensured language was added to the RISC-V psABI making the OS responsible for realigning the stack pointer for signal handlers, allowing Dart to leave the stack pointer misaligned from the C calling convention's point of view until a foreign call.
  - We don't bother with the link register tracking done on ARM[64]. Instead we make use of an alternate link register to avoid inline spilling in the write barrier.

Unimplemented:
 - non-trivial FFI cases
 - Compressed pointers - No intention to implement.
 - Unboxed SIMD - We might make use of the V extension registers when the V extension is ratified.
 - BigInt intrinsics

TEST=existing tests for IL level, new tests for assembler/disassembler/simulator
Bug: https://github.com/dart-lang/sdk/issues/38587
Bug: https://github.com/dart-lang/sdk/issues/48164
Change-Id: I991d1df4be5bf55efec5371b767b332d37dfa3e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217289
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-01-20 00:57:57 +00:00
Konstantin Shcheglov fd0908dea4 Remove sdk/bin/dartanalyzer_developer.
Change-Id: I148ea995a94929b763ae0cfae0cc1a1af4d43933
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228683
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-18 20:34:15 +00:00
Alexander Aprelev b453c6bcba [gardening] Fix env_test/has_mirror_support.
Fix the test so it reports that mirrors are not supported in aot configuration.

Fixes https://github.com/dart-lang/sdk/issues/48125

Change-Id: I07fceebf8cbee8048988c8bd5287c8aec1bb8f0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227582
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-01-14 23:33:11 +00:00
Ryan Macnak 72f37422b3 [test] Work around linker bug first appearing in XCode 13.
Bug: https://github.com/dart-lang/sdk/issues/47948
Change-Id: Id7cb3ceb461750f2ea3b7f9750693e8f30fa424e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227641
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-01-12 19:14:02 +00:00
Ben Konyi 4475267f70 [ VM / Service ] Add --log_service_response_sizes=<log.csv> debug option
Providing `--log_service_response_sizes` will cause the VM to log VM service
response sizes to the provided file in CSV format.

Also added `--service_response_sizes_directory` to the service test
runner to allow for collecting response size data for the entire service
test suite.

TEST=Local

Change-Id: I7aaf4ba936e2593e67d46ff9052e2130374ef461
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226805
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-07 21:22:56 +00:00
Stephen Adams 8bdd732e08 [dart2js] Add --utf8 canary option
Change-Id: I98078be0fe07b1037d0bb70986be8769e170708a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225520
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-01-06 05:24:25 +00:00
Sam Rawlins e7e8a6e723 test_runner: Use strict-casts over deprecated no-implicit-casts
Bug: https://dart-review.googlesource.com/c/sdk/+/224800
Change-Id: I16848d313a2442a1498fa0660bb6a2ac1ec79fcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225047
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-20 23:47:43 +00:00
Sergey G. Grekhov b0977940fa Upload requests handler added to test servers
Change-Id: I86d65a11afadb367ef28d91e1daeca23adeb9a19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221946
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-12-10 09:27:49 +00:00
Paul Berry 6153e0536b Test runner: if analyzer crashes, ensure stack trace is printed
Change-Id: I61e2b7348ac121db07dfc8500ce6808b57bbecbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222404
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-12-08 18:05:50 +00:00
omerlevran46 35202a3c5f [fuchsia] use the binary tools in the fuchsia SDK
This commit moves from using the bash scripts to using the binary tools.

Closes https://github.com/dart-lang/sdk/pull/47749
https://github.com/dart-lang/sdk/pull/47749

GitOrigin-RevId: 4098a9c5d09e2c4e209edd8ac7490f2aacd1f85e
Change-Id: If4cdcb8472f15c4e8bb202828c4205b8859e9e69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221024
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2021-11-29 19:53:14 +00:00
Vyacheslav Egorov a643e537fb [vm/infra] Improve IL testing framework
* Add support for dumping flow graphs in JSON (to make it machine
readable);
* Add support for controlling which functions are dumped through
a pragma annotation:
`@pragma('vm:testing:print-flow-graph'[, "passes filter"])`
* Replace simple matching DSL with programmatic matching
* Support obfuscated builds

Fixes https://github.com/dart-lang/sdk/issues/47340

TEST=vm/dart{,_2}/aot_prefer_equality_comparison_il_test

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try
Change-Id: Ie067ba451d311e6019a8c3a88c012231b0c50eb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219240
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-11-16 12:39:11 +00:00
Ahmed Ashour d041cf0478 Remove extra the, be and of
Fixes #https://github.com/dart-lang/sdk/issues/47504

TEST=No tests needed, only comments affected.

Change-Id: Ie096307b5ce314d328fea6780f396aaa226ad3b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216182
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-10-20 09:29:01 +00:00
Alexander Thomas 056afdac39 [testing] Merge dart2js-batch into the global batch option
* Remove all uses of `--dart2js-batch`.
* Enable batch mode for dart2js by default.
* Rename `--noBatch` to `--no-batch`.
* Make `--no-batch` affect dart2js configurations.

Change-Id: I33bdb5cfe8a82ccfc6ce9e43843f1b7a34ff1fbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217006
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-10-19 13:49:02 +00:00
Alexander Thomas 52294b4056 [testing] Remove self-check runtime
This config hasn't been running at least since Dart 2.0. This basically
reverts https://codereview.chromium.org/2549793002.

test.py no longer supports these options:
* --skip-compilation (skipped compilation commands)
* --runtime=self-check (ran the self-check tests)

Change-Id: I135c8d488a9319ee3482131cd22eb7cd3dfa3f25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217003
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-10-15 09:43:22 +00:00
Vyacheslav Egorov 8740a4f10f [vm/infra] Nascent AOT IL tests infrastructure.
Our current unit testing infrastructure does not make it possible to
test AOT compilation pipeline end-to-end, because it does not run TFA
when generating Kernel.

This makes it challenging to write regression tests for certain issues.

Instead we extend test runner with a capability to perform IL matching
when running AOT tests.

runtime/docs/infa/il_tests.md provides details on how to write such tests.

TEST=manually

Change-Id: I6f5220b814f4a5d8c053efacd3711df495dea404
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214961
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-09-30 13:19:42 +00:00
Alexander Thomas b846a20e26 [testing] Detect test failures caused by test expectation changes
* Move compare_results.dart to pkg/test_runner.
* Clean up analyzer issues in compare_results.dart.
* Add a test for compare_results.dart.
* Fix compare and extend results to detect expectation changes.

Change-Id: I451ddc2d0b01a7e5fd7c9d791b000c786c2f2c93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214805
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-09-29 13:07:19 +00:00
Alexander Thomas 63932dc7d3 [testing] Fix logic for detecting invalid named configurations
* Fix regression (https://dart-review.googlesource.com/c/sdk/+/214040).
* Add tests for invalid configurations with and without named configs.
* Add a custom test matrix for testing.

Change-Id: If169571c3163c5f4da1d3d989a2fcff6dc0a7d97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214044
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-09-22 09:34:46 +00:00
Alexander Thomas b3cfd293ad [infra] Allow arm64c on Android configurations
* Fail test.py if an invalid named configuration is used.

Cq-Include-Trybots: luci.dart.try:vm-ffi-android-product-arm64c-try
Change-Id: Ib700511a639ee39fd58441dd6fee8bd6dad8c2e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214040
Reviewed-by: William Hesse <whesse@google.com>
2021-09-21 10:15:29 +00:00
Alexander Markov d0ac9e2620 [Test tool] Pass --sound-null-safety to VM unit tests
This was probably broken since we stopped specifying
--sound-null-safety explicitly in test_matrix.json in
https://dart-review.googlesource.com/c/sdk/+/164160.

TEST=ci

Change-Id: I0a41f13749784db1a076aba434985327291ce71a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212660
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-09-09 17:43:01 +00:00
Ahmed Ashour f1ded6af56 Remove import dart:core
Fixes #47092

TEST=existing

Change-Id: I3c5c0a1ec5e0426642a5dc70aa9a0391a143ed93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212298
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-06 11:57:40 +00:00
Johnni Winther 184fd50728 [test_runner] Support multiple arguments in update_static_error_tests.dart
This improves usability of the tool when a multiple tests needs updating.

Change-Id: I034e3da7381ae79b2149429e5271904e0dfcae59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210862
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-08-24 08:02:38 +00:00
Konstantin Shcheglov cac96f7f8d Rename AnalysisSession.getXyz2() into getXyz().
Change-Id: Ia76aafc6a1190dcdca026097c364270389f2860a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206565
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-12 22:42:58 +00:00
Devon Carew ee1774ca6c several minor edits to various dart-lang/sdk files
Change-Id: I62e5b46811ef5d4d4f280a9e334ba87a355bc1cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205302
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-06-29 17:47:48 +00:00
Alexander Thomas 41aa60ea2b [infra] Add explicit gen_snapshot build target to macOS arm64 AOT builds
macOS arm64 builds only create the x64 gen_snapshot by default because
they are cross-compiled in Rosetta. Adding the gen_snapshot target
ensures that we have a gen_snapshot for arm64 as well.

These bots require clang which currently isn't provisioned on shards, so
they are running on the main bot.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-mac-release-arm64-try
Change-Id: I842f37019a65dfb30e522d2d9bead5e62bb3ff79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204505
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2021-06-25 19:35:32 +00:00
Tess Strickland f75d1819bc [test_runner] Adjust VMTestSuite to appropriately use qemu.
No qemu-using CI bot runs vm/cc tests currently, but this allows
developers to run vm/cc tests locally using qemu. This way, tests
like those from assembler_arm_test.cc can be tested both with and
without our own ARM7/ARM8 simulators.

Change-Id: I7fd97e411936954b59d9f0fc65e16c518e9ee332
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204781
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2021-06-25 07:33:26 +00:00
Alexander Thomas 9bcebce220 [infra] Upgrade Chrome to 91
* Sort command line options passed to chrome.
* Add --disable-component-updates to reduce flakiness from self-updates.
* Add --use-mock-keychain to avoid modal permissions dialog on macOS.

Change-Id: I63bf4895c219efe691af683dab527a036a8e018b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203520
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-06-21 06:30:27 +00:00
Devon Carew 6b4f2a7aae [dartanalyzer] have the dartanalyzer command emit json output to stdout
Change-Id: I2044771cc28a3b04a2b8bd3bd79b5261b4d20467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-06-17 23:39:51 +00:00
Robert Nystrom dea0488efe Don't mask crashes and timeouts in Fasta static error tests.
Fix #45162.

Change-Id: I1d3b3a885a40ec1c8d5b7efc9270da746af903f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203822
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-06-16 23:58:37 +00:00
Karl Klose 1a20be74b2 Remove support for '///' multi-test marker
Change-Id: I7d0341c758e547d457dbf4b60e1d5c7bf67bbb67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196483
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-06-16 06:05:45 +00:00
Robert Nystrom 93cc1317fe Remove outdated comment now that "///" multitest syntax is gone.
Change-Id: I18b85db108c286dd41877f4ee599bd6ad1773898
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203662
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2021-06-15 20:05:03 +00:00
Lasse R.H. Nielsen e85042b403 Allow error test expectations to omit the implicit line.
Error tests with explicit line/column markers, like
 [error line 123, column 456]
currently require both "line" and "column".
All existing occurrences of `[error line 123, column 456]` always
refer to the most recent non-comment line *just like* the `// ^^` lines,
so omitting the line, and having the most recent non-comment line
as the *default* line, seems reasonable.

This CL makes the line optional, the new format without a "line" entry
will be just `[error column 456]`.

This allows files to change the number of lines in the code without
invalidating any later expectations.
(Or, say, remove a comment line at the top of the file!)

Omits the line entry by default when writing/updating expectations.

Change-Id: Ia0c95bf804a1c6b11c0c1621bfd481e43f8fa0c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200429
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-06-14 12:00:13 +00:00
Alexander Thomas 7baeabe0e4 [testing] Rely on language versions in the analyzer tests
https://github.com/dart-lang/co19/issues/1090

TEST=Standard tryjobs, all changes are in test code only.

Change-Id: Ie73174447ab165827335652cf035f85b7510ab55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201564
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-06-02 07:47:46 +00:00
Robert Nystrom 6fd24ef3c4 Show analysis errors when a non-static error analyzer test fails.
There are two ways the test runner might want to parse and show errors
from analyzer:

1. When a static error test's output doesn't match the expected errors.
2. When a normal runtime test produces unexpected errors.

The former were correctly migrated over to parse and read the analyzer's
JSON output. The latter wasn't. It was still trying to parse the old
"|"-separated machine format.

Worse, when migrating to the new JSON output, a try-catch-block was
added to handle any unexpected errors. That had the unintended side
effect of silently catching this parse error and then continuing. The
end result is that if an analyzer test failed on a normal runtime test,
the test runner didn't print any of the analyzer errors. :(

This fixes that. It uses a single code path to parse the JSON output to
AnalyzerError. Then, for static error tests, it converts those to
StaticErrors.

Change-Id: I51c1277f0ed04faead82f579d668f8897f379a49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201382
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2021-06-02 01:51:25 +00:00
Zach Anderson 8beec1d9cc Fix abstract unix socket test
There was a race between the subprocess listening on the socket and
the test trying to connect.

Also the Android bits of the test harness needed to be taught about
the abstract_socket_test program, similar to how process_test is
handled.

TEST=Fixes tests
Change-Id: I5e1c5d2e23e4bff2a01cd5c491a45e1c58d2578e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201861
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2021-06-01 17:30:54 +00:00
Brian Wilkerson 06638483e1 Improve the highlight range for conflicting_generic_interfaces
Change-Id: I4ec19c1ceba747f5f23f7c95462de323fe76ecf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200240
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-18 20:42:33 +00:00
Karl Klose a0865fad28 [pkg/test_runner] Add test for options passing
Change-Id: I9fc656bddae68767edd79b768abbf679c86efd6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199421
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2021-05-18 12:10:13 +00:00
Robert Nystrom 8efd49860f Add a tool to detect orphaned Dart files in "test/".
Change-Id: I20322067f2cb65c858adfbfef5f785322b8a7a6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198060
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2021-05-11 01:23:03 +00:00
Robert Nystrom 7363505cfb Remove support for ancient multitest marker syntax.
TEST=fixing tests

Change-Id: I0857ff9275b4b915e0b79824c7e16f4d07c8a239
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198445
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2021-05-06 22:36:04 +00:00
Karl Klose 323cd5914e Reland "[pkg/test_runner] Write experiments to results.json"
This is a reland of 4e34ea06a9

TBR=athom@google.com

Original change's description:
> [pkg/test_runner] Write experiments to results.json
>
> Change-Id: I32423ddf665a24443de1ad60ca8f323f5c6d3aca
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196489
> Reviewed-by: Alexander Thomas <athom@google.com>
> Commit-Queue: Karl Klose <karlklose@google.com>

Change-Id: I894616f77cb47df25c8da46d2bf6ddb87734db41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198404
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2021-05-06 07:49:52 +00:00
Karl Klose e97329da49 Revert "[pkg/test_runner] Write experiments to results.json"
This reverts commit 4e34ea06a9.

Reason for revert: The data does not show up in bigquery

Original change's description:
> [pkg/test_runner] Write experiments to results.json
>
> Change-Id: I32423ddf665a24443de1ad60ca8f323f5c6d3aca
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196489
> Reviewed-by: Alexander Thomas <athom@google.com>
> Commit-Queue: Karl Klose <karlklose@google.com>

TBR=karlklose@google.com,athom@google.com

Change-Id: Ifccdf3a6031dd55bebfe5d282bcce21c5ab5632a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198403
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2021-05-06 06:14:54 +00:00
Karl Klose 4e34ea06a9 [pkg/test_runner] Write experiments to results.json
Change-Id: I32423ddf665a24443de1ad60ca8f323f5c6d3aca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196489
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2021-05-06 05:28:02 +00:00
Robert Nystrom cc1f9b9564 Remove the last vestiges of two dead multitest outcomes.
A multitest section marked "dynamic type error" or "checked mode
compile time error" didn't actually do anything. It was silently treated
as "ok", which makes for a very confusing looking test.

Fixed the only remaining four tests that used "dynamic type error".
The other outcome was not used by any test.

Change-Id: I9727b3b524cf1effb0dd899bf206aa65dbd60803
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198180
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-05-05 15:39:45 +00:00
pq 46909507a6 fix sort_directives violations
See: https://dart-review.googlesource.com/c/sdk/+/196026

TEST=Code cleanup exclusively (sorting imports); no new tests.

Change-Id: I0d419bbeb73f0763175dd29eadfd84e3d0290af5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196223
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-04-21 00:13:48 +00:00
pq a6e3008ded fix sort_directives violations
See: https://dart-review.googlesource.com/c/sdk/+/196026

TEST=Code cleanup exclusively (sorting imports); no new tests.


Change-Id: Ib07a82ff418138c542d6a83cfab9aabbb285f866
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196180
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-04-20 22:21:28 +00:00
Paul Berry 5662ce3813 Add test runner support for context messages without location information.
The CFE implementation of "why not promoted" functionality for
non-promotion of `this` doesn't associate the context message with any
location information, because there is no relevant location to cite.
For example, the output can look like this:

    tests/language/why_not_promoted/this_error_test.dart:16:10: Error: Property 'isEven' cannot be accessed on 'int?' because it is potentially null.
    Try accessing using ?. instead.
        this.isEven;
             ^^^^^^
    Context: 'this' can't be promoted.
    See http://dart.dev/go/non-promo-this

The test runner assumes that all messages have a location, so it
wasn't picking up on this context message at all.  This CL avoids the
problem by having the test runner associate any location-less context
message with the error above it.

(Note that the analyzer doesn't have this problem; all of its context
messages have locations).

Change-Id: Ied52daa8b0090f28617e7d3784233aa44dcc897a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195301
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-04-20 18:46:38 +00:00
Alexander Thomas b5c63ce757 [infra] Migrate scripts to python3
* Migrate to python3; drop python support.
* Update Windows toolchain support.
* Remove some unused methods.
* Python 2.7 is still needed on Windows.
* Update gsutil to a version that supports python3.

Fixes: https://github.com/dart-lang/sdk/issues/28793

TEST=Manually tested common user journeys.

Change-Id: I663a22b237a548bb82dc2e601e399e3bc3649211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192182
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-15 10:10:20 +00:00
Sam Rawlins a75fdd4d98 Remove unnecessary imports from analyzer_plugin, analysis_server, analyzer_cli, test_runner
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I52753bf0ac8112e0a2e6864ca2bd3289e63d5cf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-04-08 19:02:31 +00:00
Robert Nystrom 9b8584b3ad Don't truncate command output in the test runner.
I'm not sure if the output truncation was ever practically useful. But
it causes problems now that we have a CFE test that wants to validate
that the CFE can produce many errors in one go.

I thought about allowing a test to extend the truncation size, but I
figured the simplest fix was to just not truncate at all and make the
test runner a little simpler. Also did a little clean up on this
ancient code while I was at it.

Fix #44493.

Change-Id: Ie678c80e7114e0fb7f68931335075e3d319fb53a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178940
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-04-07 23:42:38 +00:00
Paul Berry c82c2f9948 Modify test runner to use the new dartanalyzer --format=json feature.
This allows the test runner to support context messages, for example
the context error messages associated with the new "why not promoted"
feature.

Bug: https://github.com/dart-lang/sdk/issues/44905
Change-Id: Ie342bde21c43641eafc5d117f328e9fde23c49bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193740
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-04-05 14:12:56 +00:00
Paul Berry 4d696edc97 Fix static error test handling of duplicate context messages.
It can sometimes happen that multiple error messages point to equal
context messages.  To prevent the static error test runner from
getting them mixed up, we need to use identity maps to track the
mapping from error message to context number.

Change-Id: I6d03484a37519d5db1f92750273daf898cb4381a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193527
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-03-31 23:03:22 +00:00
Devon Carew 26061ae61e Fix an iterable_contains_unrelated_type warning.
Change-Id: Ie9b5ff4298b1213ccec8764728a9a40475e56603
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193340
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-03-30 20:37:11 +00:00
Robert Nystrom 2a966bcf6b Fix old bug in the test runner's test server.
I apparently broke this four years ago (in
https://codereview.chromium.org/2919573003) and never realized. Caught
it today because of a lint warning.

Change-Id: I00d71ccde581e685620800b603b0ffb9e8e3a1b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192951
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2021-03-30 18:49:31 +00:00
Robert Nystrom fdb6ca6d01 Add support for context messages to static error tests.
Currently only CFE ("Fasta") tests have their context message output
parsed. It should be easy to extend that to dart2js and DDC if that's
useful. Analyzer might be more work.

This also adds support to the test updater for inserting context
messages when updating tests. By default, that flag is off, so the
existing behavior is preserved where context messages are ignnored. If
you want them, pass "-c" when updating a test.

When validating test output, if the test file contains context messages,
then they are validated. Otherwise, any context messages in the CFE
output are ignored. This way existing tests still pass.


Change StaticError to represent a single error for a single front end.

Before, the data model collapsed errors for different front-ends at the
same location into a single StaticError object which tracked different
messages for each front end. The idea was to move towards a world where
they really are the "same" error with eventually the same message.

But this adds a lot of complexity with things like merging errors and
doesn't reflect the reality that each error from each front end is
basically its own thing. Also, critically, it makes it much harder to
attach context messages to a specific front end's error object.

This changes it so that an instance of StaticError represents a single
error for a single front end. The test file syntax is unchanged and the
updated tool behaves the same. In a static error test, multiple
expectations can still share the same "//   ^^^" marker line. They are
just expanded to multiple StaticError objects at parse time.

This eliminates all of the complexity around merging and simplifying
errors.

Change-Id: Ida1736bfcde436fc2d1ce2963d91fa9cb154afa8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193281
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2021-03-30 18:41:21 +00:00
Robert Nystrom 5cc772b8aa Optimize static error test file parsing.
For some reason, the regexp to strip off multitest comments was very
slow. On a couple of co_19 tests with pathologically long lines, it
would hang practically forever. Even on shorter lines, it was noticeably
slow. This fixes that.

Change-Id: I04f2894f474dcc593e982dd691945421396274a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193222
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2021-03-30 16:58:11 +00:00
Robert Nystrom 073eb9b806 Change StaticError to represent a single error for a single front end.
Before, the data model collapsed errors for different front-ends at the
same location into a single StaticError object which tracked different
messages for each front end. The idea was to move towards a world where
they really are the "same" error with eventually the same message.

But this adds a lot of complexity with things like merging errors and
doesn't reflect the reality that each error from each front end is
basically its own thing. Also, critically, it makes it much harder to
attach context messages to a specific front end's error object.

This changes it so that an instance of StaticError represents a single
error for a single front end. The test file syntax is unchanged and the
updated tool behaves the same. In a static error test, multiple
expectations can still share the same "//   ^^^" marker line. They are
just expanded to multiple StaticError objects at parse time.

This eliminates all of the complexity around merging and simplifying
errors.

Change-Id: I1d55a6e885e12cc9c438f928297fc0db7dd5ce85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193280
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2021-03-30 16:30:21 +00:00
Robert Nystrom 02a0396f74 Don't crash on --help, --find-configurations, or --list-configurations.
Change-Id: Ib774469489d9acfae7aa35fc75f00189b25a8161
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192952
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-03-30 00:20:54 +00:00
Alexander Thomas a745657050 [testing] Simplify stream handling for buildbucket responses
Follow up to 3b64509 to apply post-submit review comments.

Change-Id: I4a573312777fea4701abc3b3c9efbb2f8b7971ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192929
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-03-25 09:56:03 +00:00
Alexander Thomas 3b645094f5 [testing] Use buildbucket v2 API in test.dart
The buildbucket v1 API is deprecated and may stop working at any time.
This also fixes the buildset tag to use the latest format.

Change-Id: I7fe889c1293b002d65a201a8ea4c9d75b9489074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192927
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-03-25 03:24:13 +00:00
Ryan Macnak 8db0a975c1 [vm] Allow garbage in the upper-half of compressed Smis.
Allows removing a branch when decompressing pointers and removing fixup sign-extension after Smi ops that use 32-bit ops to detect overflow. Increases the code size of indexed and stores for some widths due to addressing mode limitations.

TEST=ci
Change-Id: Ia48353cccbbc586dd0d2e055a843c65e37c63a30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185660
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2021-03-11 19:39:01 +00:00
Devon Carew eb58f3da6c Update the dart fix cli docs.
Change-Id: Ib5dbc9ac999eb95f19b99124fd4ab170ed994d0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-02-26 18:13:47 +00:00
Srujan Gaddam 774b80f2d3 [pkg:test_runner] Replace space from test config name
https://dart-review.googlesource.com/c/sdk/+/181404 disallows spaces
in Configurations.

Change-Id: I0582eca064bd6d88ebcbbf411e44a6147895148c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184902
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-02-13 21:35:39 +00:00
Clement Skau 0914f10a8e [TestRunner] Recognise TCP/IP ADB devices.
This makes the TestRunner's ADB class able to recognise TCP/IP ADB
devices, e.g. "localhost:1234  device".

TEST=Tested 'tools/test.py -n dartk-android-release-arm ..' with
remote device.

Change-Id: I1ee8d27736e30c61cf057e0bc34a75667a0f9bb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184465
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-02-12 08:52:40 +00:00
Ryan Macnak f40113cda5 [infra] Further teach test harness about new compressed architectures.
Change-Id: Ibfcad1997c79b1839b1842a1b7f7b14b328c3599
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183720
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-02-09 17:55:27 +00:00
Leaf Petersen 1a03d262d4 Set CFE weak/strong nnbd flag in the static error updater
Change-Id: Icfe7c5d41e5851fe9aadbf16daca2e753c65e86e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183361
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-02-09 02:25:44 +00:00
Ben Konyi 848121e6d4 Reland "[ CLI ] Improved consistency of -D and --define across tools and commands"
- Added support for --define to the VM and dart2js
- Added support for -D and --define for `dart run` and `dart compile js`

Remaining improvements:
- Add support for providing multiple comma separated values for `dart
  run`, `dart`, and `dart2js`

Related issue: https://github.com/dart-lang/sdk/issues/44562

TEST=Updated CLI tests and added new dart2js tests.

This reverts commit e49937769f.

Change-Id: I5f9275b829665eb5e8695403d67f230e752ab0e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183180
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-02-05 23:53:28 +00:00
Sigmund Cherem 912005267d [web] rename suite dart2js -> web.
Change-Id: I46be49b2effec3e38a3dc44cd45cfe736f77fa78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182680
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-02-04 23:11:32 +00:00
William Hesse 4a39a9b9fe [infra] Disallow spaces in test configuration names
Change-Id: Ibd96e414d9a8c76a36b4fc8360ceca3560f1dd91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181404
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2021-01-29 14:55:56 +00:00
Jens Johansen 6e191c11e5 [CFE] Rename 'verifySkipPlatform' to 'skipPlatformVerification'
Follow-up to https://dart-review.googlesource.com/c/sdk/+/180562

Change-Id: I242da8dc94109008d33611067b62f5352d52f454
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180565
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-01-25 10:19:52 +00:00
William Hesse 56de044376 [test] Use test configuration name to name generated test directories
The directories where generated tests and compilation output are stored
by the test runner were named based on all the relevant configuration
options. Change this so that the directory path is based on the
name of the tested configuration instead. This allows simultaneous
test runs of configurations that don't differ on relevant options.

Change-Id: Iaad8d0212cb900bc91d7472d99e266183d29a0b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178986
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2021-01-14 10:12:56 +00:00
Karl Klose e776054596 [pkg/test_runner] Support 'enable-experiments' in multi-test converter
This change adds support for the 'enable-experiments' option to control
the experiments used in the analyzer and CFE.

It also adds support for multiple input files.

Change-Id: I15b9082e96f276249165efc66734ac9506b93ca1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178560
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2021-01-13 06:50:54 +00:00
Sigmund Cherem 72cdf5beb8 [test_runner] support testing dartdevk with d8
Change-Id: If38d3013a4ac60b6ef552f004451556898838445
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177001
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2021-01-06 01:53:30 +00:00
Lasse R.H. Nielsen 6e29700e16 Update List constructor documentation, deprecate constructor.
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>
2020-12-07 16:20:28 +00:00
Clement Skau 2d36c85ff8 [vm] Removes support for --causal-async-stacks
All existing embedders have been opted into --lazy-async-stacks, the
VM also uses it as it's default in all configurations.

After this CL, any user of --causal-async-stacks will get an error
message when trying to use it.
=> In any such case, please simply remove the flag.

TEST=Exhaustive CQ.

Bug: https://github.com/dart-lang/sdk/issues/37668
Change-Id: Ia440afcf2dba464aa8b8cf381b93bbac8eb9f8dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172564
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-12-01 07:27:14 +00:00
Jake Macdonald bf24df2671 Reland "Reland "update Glob in the sdk, also adds package:file to the sdk""
This reverts commit 85174e4d8c.

Reason for revert: CL was OK, it looks like we just need a manual roll in order to add deps, only the HHH bots apply patches.

EDIT: Landing file dep ahead of time in flutter/engine to avoid manual roll + patch.

Original change's description:
> Revert "Reland "update Glob in the sdk, also adds package:file to the sdk""
>
> This reverts commit c62709e87b.
>
> Reason for revert: Still breaking flutter HHH bots
>
> Original change's description:
> > Reland "update Glob in the sdk, also adds package:file to the sdk"
> >
> > This reverts commit ce614d33c4.
> >
> > Original change's description:
> > > Revert "update Glob in the sdk, also adds package:file to the sdk"
> > >
> > > This reverts commit 18b19db300.
> > >
> > > Reason for revert: Breaks Flutter 3H/Golem. Tried making an appropriate patch for 3H that would pull file into its dependencies (see https://dart-review.googlesource.com/c/sdk/+/173960/), but that still failed, so reverting.
> > >
> > > Original change's description:
> > > > update Glob in the sdk, also adds package:file to the sdk
> > > >
> > > > Change-Id: Ia8628c28bfaf6343c19eecfef391339968cd57e9
> > > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172063
> > > > Commit-Queue: Jake Macdonald <jakemac@google.com>
> > > > Reviewed-by: Nate Bosch <nbosch@google.com>
> > >
> > > TBR=jakemac@google.com,nbosch@google.com
> > >
> > > Change-Id: I0616e3df7505f348edeefee40cbaf4adc59487cd
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173963
> > > Reviewed-by: Tess Strickland <sstrickl@google.com>
> > > Commit-Queue: Tess Strickland <sstrickl@google.com>
> >
> > TBR=jakemac@google.com,nbosch@google.com,sstrickl@google.com
> >
> > # Not skipping CQ checks because this is a reland.
> >
> > Change-Id: Ia85fe3b81214ca4ef2bed8e08ecc1b617927a579
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173981
> > Reviewed-by: Nate Bosch <nbosch@google.com>
> > Commit-Queue: Jake Macdonald <jakemac@google.com>
>
> TBR=jakemac@google.com,nbosch@google.com,sstrickl@google.com
>
> Change-Id: Iaff06dcbc3ef813ee9edb5ca8de163fdcc2041e2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174060
> Reviewed-by: Jake Macdonald <jakemac@google.com>
> Commit-Queue: Jake Macdonald <jakemac@google.com>

TBR=jakemac@google.com,nbosch@google.com,sstrickl@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: If2181a9d5ec6b96d6a61cd5cf8857bddd937e59f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174382
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-11-30 21:58:44 +00:00
Jake Macdonald 85174e4d8c Revert "Reland "update Glob in the sdk, also adds package:file to the sdk""
This reverts commit c62709e87b.

Reason for revert: Still breaking flutter HHH bots

Original change's description:
> Reland "update Glob in the sdk, also adds package:file to the sdk"
>
> This reverts commit ce614d33c4.
>
> Original change's description:
> > Revert "update Glob in the sdk, also adds package:file to the sdk"
> >
> > This reverts commit 18b19db300.
> >
> > Reason for revert: Breaks Flutter 3H/Golem. Tried making an appropriate patch for 3H that would pull file into its dependencies (see https://dart-review.googlesource.com/c/sdk/+/173960/), but that still failed, so reverting.
> >
> > Original change's description:
> > > update Glob in the sdk, also adds package:file to the sdk
> > >
> > > Change-Id: Ia8628c28bfaf6343c19eecfef391339968cd57e9
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172063
> > > Commit-Queue: Jake Macdonald <jakemac@google.com>
> > > Reviewed-by: Nate Bosch <nbosch@google.com>
> >
> > TBR=jakemac@google.com,nbosch@google.com
> >
> > Change-Id: I0616e3df7505f348edeefee40cbaf4adc59487cd
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173963
> > Reviewed-by: Tess Strickland <sstrickl@google.com>
> > Commit-Queue: Tess Strickland <sstrickl@google.com>
>
> TBR=jakemac@google.com,nbosch@google.com,sstrickl@google.com
>
> # Not skipping CQ checks because this is a reland.
>
> Change-Id: Ia85fe3b81214ca4ef2bed8e08ecc1b617927a579
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173981
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Commit-Queue: Jake Macdonald <jakemac@google.com>

TBR=jakemac@google.com,nbosch@google.com,sstrickl@google.com

Change-Id: Iaff06dcbc3ef813ee9edb5ca8de163fdcc2041e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174060
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-11-26 00:11:11 +00:00
Jake Macdonald c62709e87b Reland "update Glob in the sdk, also adds package:file to the sdk"
This reverts commit ce614d33c4.

Original change's description:
> Revert "update Glob in the sdk, also adds package:file to the sdk"
>
> This reverts commit 18b19db300.
>
> Reason for revert: Breaks Flutter 3H/Golem. Tried making an appropriate patch for 3H that would pull file into its dependencies (see https://dart-review.googlesource.com/c/sdk/+/173960/), but that still failed, so reverting.
>
> Original change's description:
> > update Glob in the sdk, also adds package:file to the sdk
> >
> > Change-Id: Ia8628c28bfaf6343c19eecfef391339968cd57e9
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172063
> > Commit-Queue: Jake Macdonald <jakemac@google.com>
> > Reviewed-by: Nate Bosch <nbosch@google.com>
>
> TBR=jakemac@google.com,nbosch@google.com
>
> Change-Id: I0616e3df7505f348edeefee40cbaf4adc59487cd
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173963
> Reviewed-by: Tess Strickland <sstrickl@google.com>
> Commit-Queue: Tess Strickland <sstrickl@google.com>

TBR=jakemac@google.com,nbosch@google.com,sstrickl@google.com

# Not skipping CQ checks because this is a reland.

Change-Id: Ia85fe3b81214ca4ef2bed8e08ecc1b617927a579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173981
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-11-25 19:52:08 +00:00
Tess Strickland ce614d33c4 Revert "update Glob in the sdk, also adds package:file to the sdk"
This reverts commit 18b19db300.

Reason for revert: Breaks Flutter 3H/Golem. Tried making an appropriate patch for 3H that would pull file into its dependencies (see https://dart-review.googlesource.com/c/sdk/+/173960/), but that still failed, so reverting.

Original change's description:
> update Glob in the sdk, also adds package:file to the sdk
>
> Change-Id: Ia8628c28bfaf6343c19eecfef391339968cd57e9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172063
> Commit-Queue: Jake Macdonald <jakemac@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>

TBR=jakemac@google.com,nbosch@google.com

Change-Id: I0616e3df7505f348edeefee40cbaf4adc59487cd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173963
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2020-11-25 10:46:27 +00:00
Jacob MacDonald 18b19db300 update Glob in the sdk, also adds package:file to the sdk
Change-Id: Ia8628c28bfaf6343c19eecfef391339968cd57e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172063
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-11-25 01:47:49 +00:00
Daco Harkes 1245a196ce [samples] Duplicate samples prior to NNBD migration
We want to migrate the samples to NNBD. In order for the old samples
to keep running on the legacy bots, this duplicates all samples, and
changes the legacy bots to run the copies.

Note this will cause the legacy bots to report that all the samples
tests are skipped and that there are now new tests in the samples_2
suite. Existing failures may re-appear. These will be be re-approved
or alternatively Skipped.

The follow up CL migrates samples/ffi to NNBD.

Issue: https://github.com/dart-lang/sdk/issues/43600.

TEST=samples
TEST=samples_2

Change-Id: Ib40f8fb71f81c091973aa0f860b1a49bac120d6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173523
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-24 18:50:28 +00:00
Daco Harkes 4a39b74029 [test] Fixes for running tests on Fuchsia emulator
1. Adds a message explaining how to build the .far file.
2. Passes --disable-dart-dev, because there is no dart-dev snapshot.

This makes the following steps succeed in running the a Fuchsia test:
`tools/build.py --os=fuchsia -m debug create_sdk fuchsia_test_package`
`tools/test.py -n dartk-fuchsia-debug-x64 tests/standalone_2/int_array_test.dart`

TEST=This is currently untested on the CI. We should consider adding
running the simulator to the CI/CQ Fuchsia bot.

Change-Id: I756863685b6d9042392814838024ec2b6054ee28
Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173275
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-11-24 08:02:18 +00:00
Karl Klose 4b488f6fa8 [infra] Ignore builds that did not upload test results in test.dart
TEST=Ran and manually verified output of:
  tools/test.dart -b front-end-linux-release-x64 -C ef39baee37 not-a-test-name (expected to skip build numbers 12609 and 12608)

Change-Id: I0991f841527d2490aa1a4c67dbef00b4f6cff6c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173272
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-11-23 11:03:33 +00:00
William Hesse ed2fc40689 [infra] Mark flaky records as inactive on stable tests
Previously, we removed flaky records when they became
stable for 100 builds.

Recognize the new "inactive" field in flakiness records.

Bug: https://github.com/dart-lang/dart_ci/issues/90
Change-Id: I59c0918c7d8e091795d7ab51d2edc0be0f63a1a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172500
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-20 13:00:05 +00:00
Nicholas Shahan bfe8aa8d5b [ddc] Add option to throw null safety violations
Allows sound-like null safety when running mixed applications in weak
mode.

This is not a specified option and is only intended to assist large
scale migration efforts.

Change-Id: Icd0abb0e876d16e719a01e8381eef55a2b511051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171821
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2020-11-16 22:58:50 +00:00
Devon Carew cdbfe0af68 [test_matrix.json] perform additional analysis validation on the bots
Change-Id: Ia09c8734533e2ef5b59dad96861d3ecec29db8bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172029
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-11-16 16:36:48 +00:00
Daco Harkes 9f96aeda6f [test/ffi] Add C++ unit tests for all target ABIs
This CL introduces unit tests for the Native* classes in compiler/ffi
that can run for all supported target ABIs on any host architecture.

The unit tests are compiled for all target ABIs with
`tools/build.py run_ffi_unit_tests` and run for all target ABIs with
`tools/test.py ffi_unit`.

The unit test and tested code do not conceptually depend on having a
DartVM. The tests are compiled with a custom `dart::Zone` and
`platform/`. This enables compiling for all `TARGET_ARCH_*` and
`TARGET_OS_*` on any host, and running unit tests for all target ABIs
on any host.

Because the `run_ffi_unit_tests` executables do not include the DartVM
their build is quick (<10seconds) and they are small (~6MB) when
compared to `run_vm_tests` (~250MB).

The tests are added to the existing FFI QEMU bot to prevent adding an
extra bot which would add checkout overhead.

The unit tests themselves are set up to be fairly similar to vm/cc
tests. The only difference is the NativeCallingConvention tests which
are set up with `.expect` files for easy inspection and updating.

TEST=runtime/vm/compiler/ffi/native_calling_convention_test.cc
TEST=runtime/vm/compiler/ffi/native_location_test.cc
TEST=runtime/vm/compiler/ffi/native_type_test.cc

Change-Id: I7b8bf4de9ef070e7546472217e571a60362b9639
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171725
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-16 16:10:55 +00:00
William Hesse d03b7e31f5 Add --build flag to test.py and test.dart
This flag causes test.py and test.dart to (re)build the necessary
build targets locally to run the selected configurations.

Change-Id: I526de702ac0eb8269c91d0be3673af096c94c1f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170822
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-12 11:19:38 +00:00
William Hesse d09c73d7fb [infra] Remove test/kernel directory from testing scripts and infra scripts
The directory was deleted in an earlier change.

Change-Id: Ib6191c5624c7db2462c67a62d4221eacb034eec9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171280
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-11-10 11:48:14 +00:00
Clement Skau e90967f29d [SDK] Makes --lazy_async_stack default.
Bug: https://github.com/dart-lang/sdk/issues/42062
Change-Id: If22ed42b363e2d75d0be5cc14aef9e909b8ff2e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149288
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-06 14:12:52 +00:00
Alexander Markov 4054a9edf4 [Test tool] Remove -c dartkb configuration
Change-Id: I178f18484b853aa35248fa9f6252509ec0df6832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169500
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-11-02 14:06:19 +00:00
Leaf Petersen a6faf8f2f9 [Language] Enable null safety in Dart 2.12.
Closes https://github.com/dart-lang/sdk/issues/22

Change-Id: I662dd17fda0ff62a871314896fbf1dbe220f41de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166790
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2020-10-29 18:25:56 +00:00
Robert Nystrom 30d13109e7 Error on all ignored command line arguments with a named config.
Context: https://github.com/dart-lang/sdk/issues/43881
Change-Id: I456e319564a620b44fa4bd36e8ed949c83ab6373
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168766
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
2020-10-29 01:15:03 +00:00
Jens Johansen 2350776a1c [CFE] Don't continuously try to verify the platform libraries
This takes co19_2 tests from ~10 minutes to <3 minutes on my machine.

Change-Id: I98c27d0692b9279cf4c7d680cfa18c50b4ab5d6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167573
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-10-15 08:04:23 +00:00
Ryan Macnak 79db8e0055 [test] Add option to test harness to run VM tests under rr and save traces from crashes.
E.g., ./tools/test.py --rr --repeat=100

Change-Id: I2776b38daa6b14d1ca59800969a0ecfaeb71a0ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167241
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-13 21:59:54 +00:00
Alexander Thomas 15d7023b60 [testing] Fix name expansion for service tests with multiple VMOptions
This fixes an issue introduced when DDS testing support was added to the
test suite. Previously, tests with multiple VMOptions lines would get
the same name for both DDS and service variants. This caused incorrect
behavior in the results processing that broke deflaking, but also
caused one of the results to be ignored by the infrastructure.

Also adds some tests for VMOptions handling in test_suite.dart.

Fixes https://github.com/dart-lang/sdk/issues/43768

Change-Id: I3c0f9cbc1807fe814aed5ecb7531ef4289e95683
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166858
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-10-13 12:56:57 +00:00
Ryan Macnak 6c31582031 Copy Dart 2 version of Observatory and service tests.
Change-Id: If47aa98918b0166dba781a0008c23b991d46fe1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165420
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-10-07 22:20:25 +00:00
Alexander Thomas c3d37c1ad6 [infra] Add additional nnbd VM builders
See also Luci configuration here:
https://dart-review.googlesource.com/c/sdk/+/164084

https://github.com/dart-lang/sdk/issues/43463

Change-Id: I071c8c6055004574cbe35f14a28e0cd8c468988f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164164
Reviewed-by: William Hesse <whesse@google.com>
2020-09-29 09:57:44 +00:00
Alexander Thomas 3417dd6836 [testing] Add null-safety arguments to a few more places
The arguments were missing for some dartkp subcommands and for AppJit.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try
Change-Id: I467b10eea1187d44b978170b12a0b2b5927f5b1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164380
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-09-24 19:26:37 +00:00
Alexander Thomas c34eef4fd8 [testing] Simplify test.py arguments for null safety testing
test.py invocations that specify a null safety mode will now work
without tool specific options.

For instance, `test.py --nnbd=strong -cdartkp -mrelease` will now add
the `non-nullable` experiment flag as well as the pass
`--sound-null-safety` to the relevant subcommands.

Fixes https://github.com/dart-lang/sdk/issues/42370

Change-Id: I1ae5bf569cc77ed6f26411c171c2cafe0a12eaff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164160
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-09-24 08:49:00 +00:00
Nicholas Shahan ec821fd2ae [test_runner] Allow tab completion on co19 suites
Expand the recent addition of tab completion for test files to
allow completion in the co19 and co19_2 directories.

Change-Id: I02f39ef8c7e4c829a2feef7d51f3f24fea5d745d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163120
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-09-16 22:32:19 +00:00
Alexander Thomas ece694b96b [test] Use default permissions for test resources
If test resources have read-only permissions and are copied to
generated_compilations copySync will fail the next time because it can't
overwrite the write protected file.

Creating the file first ensures that it has default permissions that
won't be changed when copySync overwrites it.

Change-Id: I1b4a07c4644dc6d0c25275ebc84ba4ebc07a56c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162754
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-09-16 13:18:28 +00:00
Johnni Winther 4948c31b7a [test_runner] Support detection of CFE warnings
+ some test expectation fixes

Change-Id: Ibf0259914960ea25978f2b8e29aa89336e209f2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162321
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-09-15 07:57:31 +00:00
Johnni Winther 0e93845ba1 Make update_static_error_tests work on Windows (again)
+ update some test expectations

Change-Id: I63ca86309ea3352a88686f5e3f416311ee7bc03c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162185
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-09-10 06:21:13 +00:00
Robert Nystrom 8b21a49f61 Turn on the "isEmpty" and "isNotEmpty" lints and fix violations.
Change-Id: Ia6d957ebcc2b19f8043fa58f0c6e2202b2c1104f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160982
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
2020-08-31 18:33:48 +00:00