Commit graph

268 commits

Author SHA1 Message Date
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