Commit Graph

246 Commits

Author SHA1 Message Date
Robert Nystrom bdcde6beec Pass a "--default-language-version" flag to analyzer for legacy tests.
When the test runner runs a legacy test with the non-nullable experiment
enabled, this passes an extra command line flag to tell analyzer to
treat the test library as opted out of NNBD.

This CL also removes the guard that made the test runner skip all legacy
tests when running analyzer with the non-nullable experiment enabled.
We want to run those tests now and (when analyzer supports the new
command line flag) they should be correctly treated as opted out.

This change also removes the tests package config file since that no
longer needs to be used to set the language version. It also removes the
code to generate a package config for the multitests. This CL replaces
both of those mechanisms.

Change-Id: Iedc1e6111bc0623ac21263499f3f5d11bd6fdf7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135346
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-02-11 21:34:15 +00:00
Robert Nystrom 21758fe93c Create a package_config.json file for the generated multitests.
Change-Id: Ic603d2827184aa88c0b3d78032966591516094e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134873
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-02-10 15:46:54 +00:00
Daco Harkes 9920801424 [vm/ffi] Split FFI tests in NNBD and legacy
Closes: https://github.com/dart-lang/sdk/issues/40233

This CL creates nnbd versions of the tests and runs them on the nnbd sdk.

This CL does not (1) migrate sdk_nnbd/lib/ffi fully yet, and does not (2) fix all the tests/ffi (which is NNBD tests) yet.

Uncovered new issues:
Issue: https://github.com/dart-lang/sdk/issues/40234 nullptr should have type Pointer<Never>.
Issue: https://github.com/dart-lang/sdk/issues/40247 Structs need external fields.
Issue: https://github.com/dart-lang/sdk/issues/40271 Callbacks hit assert in debug.

Change-Id: Icb1b83577e03ed283165eb17703fc8dfc7fa5960
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132604
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-01-29 14:04:41 +00:00
Martin Kustermann 6199853cad [infra] Fix test runner to correctly parse android adb output and fix test to always expect compile-time error
Change-Id: Ib7c7bf92f929092693437231ea69ada8a6b719c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133585
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-01-29 12:26:40 +00:00
Daco Harkes a86288a1d8 [test_runner] QEMU named configurations
Issue: https://github.com/dart-lang/sdk/issues/40337

Change-Id: Ifd6855406686ff87f3a600cf5acef8777e44bed7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133525
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-01-28 16:08:27 +00:00
Daco Harkes dad3545c5b [test_runner] Support for arm32 VM in AOT mode on x64 via QEMU
Closes: https://github.com/dart-lang/sdk/issues/40337
Change-Id: I7f7ec89a910a258c7912e57e0463e808de343c0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133521
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-01-28 15:50:57 +00:00
Daco Harkes 62291efcfd [test_runner] Support for arm32 VM in JIT mode on x64 via QEMU
Using QEMU in AOT mode is still pending.

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

Change-Id: Idf68f5420eee91048eeca01534954f26ddba11ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133231
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-01-28 08:44:07 +00:00
Sigmund Cherem 4a42831e85 Use source-maps in test runner to expand JavaScript stack traces.
This works on all browsers, in d8, and supports both dartdevk and
dart2js. In the case of dart2js, this also expands minified names and
inlined data.

The result is presented to users as a separate section, so the original
JS stack trace is printed as is, and a second deobfuscated stack trace
is printed afterwards.

Change-Id: I10af5e0241a8c87ad8db48234ce52cfb51a27411
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132966
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-01-24 20:00:13 +00:00
Vijay Menon 528edcf6a9 Add node-source-map-support for better web stack traces during testing
Change-Id: I9e500c4e47819d77c4c81a1027e6665a34d3fd29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132520
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2020-01-21 22:09:19 +00:00
Robert Nystrom 51aa8987e3 Allow tab completion to test suites in subdirectories.
Change-Id: I05d20305620e48f77ea3fc807f9eddfee13d81ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131905
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-01-16 17:37:58 +00:00
Alexander Thomas f9e9f37068 [testing] Pass the experiment flags to all batch runners
Sometimes, the batch runners need the experiment flags set. This is
especially true when running in NNBD mode which needs to be enabled in
the VM running the batch runner as well as in the test code.

Previously this was only done for the CFE batch runner, this CL moves
the logic to apply to all compilation commands using batch runners.

Change-Id: I9358ae7cfed4f082075ef91b59408edcb2912361
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131831
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-01-16 12:24:14 +00:00
Alexander Thomas d6d921ba12 [infra] Fix cfe NNBD builder
* Correct mistake in the named configuration.
* Add missing test directories to the fileset.
* Add configurations for all operating systems (for local testing).
* Avoid duplicate experiments specified by both configuration and test.
* Pass experiment flags also to VM running the batch runner.

Change-Id: I47f2c1b07e91e2f8120a2712ce362689b68e9ce4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130900
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-01-09 20:16:27 +00:00
Robert Nystrom 5eb585cfaf Make selector argument parsing smarter.
Allow a selector that starts with "tests/" or ends with ".dart" mainly
to make tab-completion in the command line usable.

Change-Id: I53cb4d365df79d2708e062ff245fb825fea9239c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129001
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-12-20 21:24:15 +00:00
Nicholas Shahan 171059d276 [test_runner] Avoid potential errors using the wrong SDK fork in paths
Followup from comments in https://dart-review.googlesource.com/c/sdk/+/128570

Change-Id: I12c1f157154d0bc30e08d0b0f5631946fc00f361
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128774
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-12-18 20:44:47 +00:00
Nicholas Shahan e71af58fef [test_runner] Only skip analyzer configurations with NNBD on language_2
We have reached the point where we no longer want to skip these tests when
running DDC.

Change-Id: I7680414f8652526d1fec3d4d9ff00ce34dbe5331
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128804
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-12-18 18:40:31 +00:00
Robert Nystrom cb2cbb7074 Enable "omit_local_variable_types" lint in test_runner and fix violations.
Also turned a couple of "final" locals to "var" to be consistent with others.
Removed a no-longer valid analysis option.

Change-Id: I741989b20199ba8f1e86e464e1cf994137332fad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128500
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2019-12-17 19:48:54 +00:00
Nicholas Shahan 3fc1fe9af9 [test_runner] Pass non-nullable experiment flag to VM
It seems that we need to pass this flag to the VM now based on the
following message that appears when trying to run tests with the
experiment enabled:

```
VM initialization failed: Snapshot not compatible with the current VM
configuration: the snapshot requires 'release no-dwarf_stack_traces
use_bare_instructions nnbd-experiment' but the VM has
'release no-dwarf_stack_traces use_bare_instructions'
```

Alternatively, we could use the script from the sdk_nnbd/bin/ directory
where the experiment is hardcoded on, but that could be more confusing
when we unfork. WDYT?

Bug: #38665
Change-Id: I033e9e2e4a38f04c5cb8227efeee5a66826b46e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128570
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-12-17 19:21:10 +00:00
Sigmund Cherem 8ad8abfb74 Enable strong/weak strict checking in ddc runtime from the test runner
Change-Id: Ia7bad573f07ba7327907ab29d1301c2d004cbe0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128363
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-12-13 19:11:53 +00:00
Ryan Macnak 3678a3bd42 [build] Use separate out directories for each sanitizer.
Bug: https://github.com/dart-lang/sdk/issues/39611
Change-Id: Ie0aeaff758234220c2f0267b462d14f4c076bdf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127821
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-12-11 18:12:47 +00:00
Nicholas Shahan 5069f7a8c6 [test_runner] Temporarily remove some packages from the DDC config
Allows us to more easily start running tests that use the NNBD sdk and do not
depend on these packages. We can add them back when they are migrated or can
easily be opted out and they build without errors.

Also cleans up a little of the ddk/ddc split and the location of the package
.dill files when running without --use-sdk.

Change-Id: I12fcbf18b47ad3189040f7e42c3ce9a4a06ed838
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127966
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-12-11 00:45:49 +00:00
Alexander Thomas 7fcaafbb3e [infra] Move IE registry settings from Puppet to the test runner
Removing puppet rules allows GCE VMs to be provisioned without Puppet.
This will reduce the startup time for new GCE VMs.

Bug: https://crbug.com/871818
Change-Id: I33d9ff9ccf423d5291b94b74b2e86a6cb757b976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127241
Reviewed-by: William Hesse <whesse@google.com>
2019-12-09 13:43:28 +00:00
Karl Klose 413867d678 [infra] Add a script to convert multi-tests to the new static error test framework
The script verifies that the multi-test only contains static annotations
and that converting it to a single test produces the same error messages
as testing the sub-tests generated by the multi-test.

If that is the case, it uses
  pkg/test_runner/tool/update_static_error_tests.dart
to insert the expected errors and removes the multi-test markers.

Additionally, a copy of the '/none' test and of all the sub-tests with an
'OK' marker are created to preserve the testof runtime behavior.

Change-Id: I6eb67246f209dfbdf9b4ba8705c368c6f1978938
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124128
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-12-04 11:25:19 +00:00
Johnni Winther a87c563ecb [test_runner] Make update_static_error_tests work on Windows
Change-Id: Ia2e9a1b122953d1565f5829932cd21705a725f45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125972
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-22 21:06:57 +00:00
Robert Nystrom 361d96227b Remove support for negative tests from the test runner.
- Remove the `retry` field from `BrowserTestCommand` since it isn't read and the only criteria to assign it was whether a test was a negative test

Change-Id: I4ff431ccf3fcd4c754fccbfdc6c89fc1ce5fa66f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125841
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2019-11-22 00:20:58 +00:00
Robert Nystrom 11d523dfe1 Add a test suite for "co19", which will be the NNBD-migrated co19 tests.
It doesn't do anything useful yet because the forked co19 tests aren't
getting pulled into the repo, but once gclient syncs them to
tests/co19, this should start doing something.

Change-Id: I5ee54f9afc19353c7a7a379178df1084c6f2e8d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125681
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-11-20 10:04:28 +00:00
Robert Nystrom 582cec84f4 Set up new test suites for migrating the tests to NNBD.
- Copies corelib_2/a*    -> corelib/
- Copies language_2/ab*  -> language/
- Copies lib_2/math/     -> lib/math/
- Copies standalone_2/a* -> standalone/

And also copies over and renames all of the status files in those
directories.

Then it migrates those tests to be static error free in NNBD.

Finally, adds support to the test_runner for the new suites.

Note that this review is split into multiple patchsets. The first
patchset is a straight copy of the existing files. Then the later
patchsets have the interesting changes.

Change-Id: Icec2ff850a3aee30b653066ac184495d1e3814d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125467
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-11-19 00:18:43 +00:00
Karl Klose ec0d042955 [infra] Support multiple named configurations in test infrastructure
This change allows to run test.dart and pkg/test_runner with multiple arguments
for the -n option to run tests for multiple configurations with one invocation.

Change-Id: If62e0bfc364460fa415c7f700f7e449b0de56987
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122395
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2019-11-08 08:06:36 +00:00
Samir Jindel c885bdde1d [vm] DBC is obsolete. Remove dead code.
Change-Id: Ica33af158cca53c8e951e4b2582de83660e8a60d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121851
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-27 18:18:29 +00:00
Alexander Thomas e62c7ae3bb [infra] Add legacy AST mode builder to the test-matrix.json
This also removes the now redundant bytecode testing from the dartkb
builders.

Replace the useKernelBytecode boolean option with a more flexible
genKernelOptions string list option.

See also See also https://dart-review.googlesource.com/c/sdk/+/122321/ for the
corresponding Luci config updates.

Change-Id: Iabb207bc02637b758c42c00ae9175bd52f46559f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122320
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-25 15:11:00 +00:00
Martin Kustermann e82fedc345 [vm] Remove deprecated (and untested) ARMv5 support from the VM
Since we have no CQ/CI test coverage of ARMv5 and none of our customers
uses it, a breaking change request was made (see issue further down).

The breaking change has been approved and a corresponding email has been
sent out:

https://groups.google.com/a/dartlang.org/forum/?nomobile=true#!topic/announce/vRQja7di3FQ

This CL removes any armv5 related code from our codebase.

Closes https://github.com/dart-lang/sdk/issues/36666

Change-Id: I9abf32f1980ca19a9cf882b43c9966b2127f89e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122540
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-10-23 14:44:33 +00:00
Karl Klose 5814319bf9 [infra] Remove support for run.json
Change-Id: I5d8b02df2d2dad6b53e6365a9d004bed07f4c59f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122387
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2019-10-22 11:40:14 +00:00
Ben Konyi 0b045aea2b [ VM ] Removed tests/standalone along with any references in build bot / test runner configurations
Deleted irrelevant tests and migrated valid tests to Dart 2

Change-Id: If37611e051b7e2f128c53267f606d480d7fe23a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121902
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-10-17 00:41:16 +00:00
Robert Nystrom aab88791b8 Change experiment flag name in test runner and test config.
Use "enable-experiment" to be consistent with other tools.

Change-Id: If9598f667517443a4f61ef91955ff57a477f0a5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121681
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-10-14 23:24:58 +00:00
Robert Nystrom 4a2adf5734 Allow an unspecified error expectation to match multiple errors.
Fix #38792.

Change-Id: I6fc98538f75ed03612cd25ba4f0c12054819a3fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121406
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2019-10-14 23:11:58 +00:00
Robert Nystrom 90ff37e011 Plumb the configuration's experiments flags through to tools.
Both a test file and now a test configuration can specify that
experiment flags should be enabled. Since they both can, passing those
to the tools is a little tricky because we need to merge the two
command line arguments. It's made worse by the fact that this corner of
test_runner is riddled with poorly factored code.

This doesn't fix the redundant code, but does merge and pass the flags
through. Right now, it parses them from the test file by looking for
them in the SharedOptions line, which is where they currently appear.

That's pretty hacky. Eventually, we should change these tests to use:

// Requirements=

Fixes #38386, #38387, #38388, and #38389.

Change-Id: I1aea1482b30b9ba19c427319f895822d81ee12ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121262
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-10-11 20:33:36 +00:00
Karl Klose eaeedd1988 [infra] Remove class UniqueObject
Object as a base class already behaves the way we want.

Change-Id: Ic769ed5d413f016a6f6258d0b0e2b94ebaf5cc8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120664
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2019-10-11 11:31:57 +00:00
Robert Nystrom 965b8cb1d8 Use the forked NNBD SDK in the test runner.
If the current test configuration enables the "non-nullable" experiment,
the test runner will read from the NNBD build directory instead of the
normal one.

This only kicks in when the experiment is enabled by the
*configuration*. If the test file enables it using:

  // SharedOptions=--enable-experiment=non-nullable

It has no effect on which directory is used. I think the right fix for
this is to use a different mechanism for these tests to specify that
they require NNBD. I'll send an email about that.

Change-Id: I4be2de8d0f7301c93dfb3f7e81c12372fc5d154a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121143
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-10-10 22:55:44 +00:00
Robert Nystrom 7e20ae579a Skip non-NNBD tests in NNBD test configurations.
Change-Id: I9845ca7bb8f50e0f4497f45d94550f6c8e2210c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121161
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-10-10 22:44:54 +00:00
Samir Jindel 8c5236f55e [vm/ffi] Fix host-target word mismatch breaking AOT callbacks in ARM_X64.
Addresses https://github.com/dart-lang/sdk/issues/38718

Change-Id: If416feb182da1d3a13d4a78770c9e240a0fe17cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120584
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-10-07 14:49:31 +00:00
Samir Jindel db352304ec [vm] Test AOT on Android with the 64->32 bit cross-compiler.
We introduce a new architecture ARM_X64, which is the same as ARM except that
the host-targeting-host binaries are compiled for X64 instead of X86.

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

Change-Id: I00a2b1cc71948adec9f66c7b2ee61e9e5ac53d2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120121
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-07 10:35:45 +00:00
Samir Jindel 85948bd799 [vm/elf] Run strip --strip-unneeded on ELF snapshots during testing.
Android's strip can make incorrect assumptions about the ELF it's processing,
which has caused bugs leaking into Flutter:

- https://github.com/dart-lang/sdk/issues/37146
- https://github.com/flutter/flutter/issues/41010

These kinds of bugs may be difficult to reproduce and have subtle effects.
We should run strip ourselves on the CQ to catch them earlier.

Change-Id: I1ba39aa7996749f90d3f7373f668c797d2e300d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118388
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-09-27 13:24:46 +00:00
Samir Jindel ee1ab89987 [vm/infra] Fix compiler_configuration to use existing cross-compiler.
Also fix the ELF loader to allow segment alignment >page size.

Change-Id: Icc4c2eaae44171e74cc41d9f2b06701acad86a90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118983
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-09-27 11:56:55 +00:00
Samir Jindel 9a683de40d [vm] Support testing assembly snapshots for ARM.
We have had several bugs propagate to Flutter end-users due to our lack of testing of
AOT Assembly snapshots on ARM (SIMARM_X64 in particular), causing reverts of SDK commits
and disrupting the Dart -> Flutter roll.

This leverages our custom ELF loader to load the generated ELF objects, which cannot be
loaded by dlopen() because they are marked with the ARM ABI.

For example, see:
  - https://github.com/flutter/flutter/issues/40114
  - https://github.com/flutter/flutter/issues/41228

Also do some tree-shaking of the snapshot writers for dart_precompiled_runtime.

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

Change-Id: I5990769c623b8a13131b1848349af2c0a026272b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118569
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-09-25 17:09:16 +00:00
Karl Klose 209180d280 Treat the case that the reported error location has length 0
Change-Id: I419dc317098beda89991df57ec599b681043070b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117701
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2019-09-23 06:46:39 +00:00
Robert Nystrom 7516af7237 Add support for test requirements.
This gives us a way to specify that a test is only meaningful for
certain NNBD modes and should be skipped on other configurations. My
hope is we can extend this for other platform capabilities and then
eventually use this to express "skips" instead of relying on status
files for them.

Change-Id: I99548c326ee6fbe6db64e28e7f7f07d2fc1fd23c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117080
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-09-13 00:27:30 +00:00
Nate Bosch 97925ece63 Delete test_runner/tool/co19.dart
Towards #37318

Removes a script using the deprecated `--checked` flag. No one appears to be
using this tool.

Change-Id: Ib9d30790943845ece2cb5e4af1e4f45da5a28f79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115769
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-09-12 18:43:09 +00:00
Robert Nystrom 0d1636e0b2 Simplify how the list of TestCases for each TestConfiguration is made.
- Make it synchronous. I did some benchmarking and the async didn't seem
  to make a measurable difference and made the code harder to follow.
- Fix a bunch of small-scale idiom things: "var", names, etc.
- Move TestCase.hash into TestFile since that lets us access it before
  we've created a TestCase.
- Remove dead code.
- Make it clearer which functions work with TestFiles and which with
  TestCases.
- Clarify the code that determines whether or not to enqueue a test.

The last point is the motivating one. Soon, I'll be extending this code
to take NNBD into account when determining which tests to skip, so I
wanted to clean it up some first.

Change-Id: I488ed6c7d2453535968ac43389a2fd8370ead57d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116662
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-09-11 23:05:59 +00:00
Robert Nystrom 3f7805a90e Make the NNBD command-line options less, uh, half-baked.
- Better name than "optedIn".
- Actually hook up the command-line option to the configuration.
- Add tests, which would have caught the previous mistake.
- Don't allow comma-separated values for "--progress" and "--nnbd".
- Remove unused dead "--strong" option.

Change-Id: I57d7cb0d81af50d662dcf3f7f4c9ca1f2b102f2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116544
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-09-10 22:39:19 +00:00
Dmitry Stefantsov ccb6ba948b [cfe] Gather constraints from both possibilities for FutureOr
Closes #37778.

Bug: http://dartbug.com/37778.
Change-Id: Ia8828c27ccc912831a0fea8a473c547184c99229
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115243
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-09-10 09:50:30 +00:00
Robert Nystrom 981be87206 Add configuration options and flags for controlling NNBD mode.
This data is parsed by configurations and allowed as command-line
options to the test runner, but isn't currently plumbed through to any
of the tools. That's the next step.

Change-Id: I7931a11502a1c460e28b2a4a13d8722d8ad6974d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115767
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-09-06 01:17:07 +00:00