Commit graph

224 commits

Author SHA1 Message Date
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
Robert Nystrom 451e420612 Add support for web errors to the static error test updater.
Change-Id: I666d081a8ad18a1aef7dd2a2d0fbe2f12b740e11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160980
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-08-31 18:15:18 +00:00
Robert Nystrom 98e781f632 Enable two more lints with only a few violations.
Change-Id: Ibd72d53740b06370b12ae4dd7e4a3f471de09978
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160983
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
2020-08-30 18:36:15 +00:00
Robert Nystrom 1d93f9cc7b Run the analyzer from the built SDK directory.
The static error updater used to run analyzer using the scripts in
sdk/bin/, but those are no longer reliable now that analyzer looks for
a nearby VERSION file. Instead, look for the most recently built
analyzer in the build directory.

Change-Id: If2b437b12d036e15f5503aba816dc2a007e39cfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160943
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-08-28 23:53:29 +00:00
Robert Nystrom 7ec29a9b6d Add filtering to "--list-configurations".
I got tired of wading through the giant list and guessing at which one
matches the options I want to run the tests on, so I added filtering.
If you pass any of the common options like "-m", "-r", etc. when also
passing "--list-configurations", then it only prints configurations
that match those options.

Also, by default it only prints configurations that match the current
host OS.

Eventually, I would like *running* tests to work the same way, where
passing "-c" means "find me a config in the test matrix with this
compiler. But this seems like a good start.

Also, I removed the slow way that test.dart calls test.py to handle
--list-configurations now that those are all in the same package.

Change-Id: Ifabb415a9fad889afc12cfcd7dd81bd02c918612
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158980
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
2020-08-20 19:05:49 +00:00
Devon Carew 274d610dc0 update pubspec.yaml files to reflect actual package usage
Change-Id: I26a194c2f69e4babc6cea34d26959c276e6076b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159144
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-08-19 15:17:22 +00:00
Ryan Macnak 56a4d7c5f8 [vm] Support --use_table_dispatch when splitting snapshots.
When reading a secondary snapshot, re-run the dispatch table initialization found in the root snapshot. Since each loading unit's contribution to the dispatch table is scattered, it would take more snapshot size to try to serialize their contributions separately. We'll revisit this when we can defer Class, Function and Code, which will prevent the root snapshot from referencing all Codes.

Bug: https://github.com/dart-lang/sdk/issues/41974
Change-Id: Iefd2b98647b96ae59a7efe92897538f5cf8c2426
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158923
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-08-18 16:46:50 +00:00
Robert Nystrom 1c5d3dfd4a Run web static error tests on dart2js and DDC and validate output.
If a static error test contains "[web]" error markers, this runs them
on DDC and dart2js, parses the output, and tests that the compilers
report the expected errors.

Change-Id: I8b846f75828a0078f61c2fc1f3da0a4a587349cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158100
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-08-12 23:15:38 +00:00
Ryan Macnak 91ed534139 [vm] Support --use_bare_instructions when splitting snapshots.
- Don't use PC-relative calls when calling between loading units.
 - Sort the contents of the code cluster by loading unit, then by text offset.
 - Handle binding PC-relatives calls and inserting trampolines per loading unit.
 - Create one code order table per loading unit to implement PC -> Code lookup.
 - Read code order tables directly, instead of copying into malloc'd memory.

--use_table_dispatch still not yet supported.

This slightly shrinks non-split binaries (~2% clustered part, 0.4% total snapshot) due to the new delta encoding when Code references Instructions.

Bug: https://github.com/dart-lang/sdk/issues/41974
Change-Id: I51052ebc7b4968b554897d1710135a6c41821302
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157820
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2020-08-12 17:23:14 +00:00
Liam Appelbe 6bd220f556 Reland "[vm] Fix some Fuchsia tests"
This reverts commit 17faf89d02.

The fix is in eventhandler_fuchsia.cc. Rather than changing the
condition on line 401, I've just weakened the assert.

Change-Id: Ia6b1f35e479e4b2fdf1adc77e9513551221a7696
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157564
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-08-06 21:29:29 +00:00
Liam Appelbe 79cec0e864 [vm] Delete ABI infrastructure
Change-Id: I26d455d96c87010293a6dcb9f6c0eecfcaf3c816
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157102
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-08-06 19:55:12 +00:00
Robert Nystrom e3c5c591d1 Don't skip warning-only static error tests on runtime configurations.
If a static error test only has expectations for *warnings* then it
still has well-defined runtime semantics that we want to test.

This distinguishes those tests and runs them on non-front-end
configurations.

Change-Id: I41b8d84a229ba53ad0db0271b28a9b9482ad582d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155305
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-08-06 02:22:56 +00:00