Commit Graph

1865 Commits

Author SHA1 Message Date
Bob Nystrom ca987d5c01 Capture stack traces in asynchronous browser test failures.
This works for both dart2js and DDC.

Change-Id: Ic27a99c3691ee06259597b227239b974a60b2484
Reviewed-on: https://dart-review.googlesource.com/15320
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2017-10-19 21:10:57 +00:00
Bob Nystrom ba2e4aff24 Some minor clean-up in test.dart.
- Fix fuzzy arrow errors.
- Default the Dart repo URI so it doesn't always need to be explicitly
  set.
- Run dartfmt on everything.
- Move some members out of the garbage bin "TestUtils" class:
  - Move the stuff around the Dart repo directory to a new Repository
    class.
  - Move absolute() into Path where it belongs.
  - Move workingDirectory in Path since it is a Path.
  - Delete the random number stuff since it was apparently unused.

Change-Id: I3dab3a4f1713b7a749e64b6776149d05a0ce1b69
Reviewed-on: https://dart-review.googlesource.com/14502
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2017-10-19 19:05:58 +00:00
Bob Nystrom 5f8f77fd03 Capture DDC JavaScript stack traces in synchronous test failures.
This still doesn't *display* then very nicely (they are buried in the
giant blob of "events" JSON in the output), but it captures them and
plumbs them out of the browser into test.dart.

Change-Id: I54ab024ed55f18af89da7742967117f0a212673d
Reviewed-on: https://dart-review.googlesource.com/15005
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-19 18:32:27 +00:00
Régis Crelier 0e5efbda08 Implicitly pass --reify-generic-functions option to the VM when testing Dart 2.0
Fix migrated Dart 1.0 tests for Dart 2.0
Update status files

Change-Id: I41c8a6d06008ec0213e78cdc578b24b24668d312
Reviewed-on: https://dart-review.googlesource.com/14940
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-10-18 22:18:46 +00:00
Peter von der Ahé b96ac4520a Update most clients to use computePlatformBinariesLocation.
Change-Id: I6e6960c471b2fab3f0cd8a672da05d7699217410
Reviewed-on: https://dart-review.googlesource.com/12291
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-17 10:48:40 +00:00
Erik Ernst 63de49ccde test.py will now run the spec parser.
This CL modifies tools/test.py such that it can run the spec parser
(after doing `make parser` in tools/spec_parser, and assuming that the
ANTLR 3 library is available at /usr/share/java/antlr3-runtime.jar)
with a command line like

  `tools/test.py -c spec_parser -r none language/callable_test`

It also changes status files to have a name which follows the expected
patterns (e.g., `language/language_spec_parser.status`). Finally, it
adds/changes many entries in status files, such that parsing of the
directories `language` and `language_2` run successfully.

Change-Id: I82a22e32ac4fecd23ac0d4434bcac08f75dd8ffe
Reviewed-on: https://dart-review.googlesource.com/12680
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2017-10-12 09:22:28 +00:00
Siva Annamalai bd2a8e1d60 Reland migrate most of the tests in standalone to be strong mode clean and move them to standalone_2 directory.
Bug:
Change-Id: I4ca50f315361422db1d4356055862463bfe1d6f3
Reviewed-on: https://dart-review.googlesource.com/12240
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2017-10-07 01:29:36 +00:00
Siva Annamalai ff32187145 Revert "Migrate most of the tests in standalone to be strong mode clean and move"
This reverts commit c85563f582.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Migrate most of the tests in standalone to be strong mode clean and move
> them to standalone_2 directory.
> 
> Change-Id: I9887b8d6d4d86001e4660b400224b881205e6273
> Reviewed-on: https://dart-review.googlesource.com/6080
> Reviewed-by: Ben Konyi <bkonyi@google.com>

TBR=bkonyi@google.com,asiva@google.com

Change-Id: I3c7b6081f17fca45e7828603538f50d06417e2be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/12020
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2017-10-06 17:24:20 +00:00
Siva Annamalai c85563f582 Migrate most of the tests in standalone to be strong mode clean and move
them to standalone_2 directory.

Change-Id: I9887b8d6d4d86001e4660b400224b881205e6273
Reviewed-on: https://dart-review.googlesource.com/6080
Reviewed-by: Ben Konyi <bkonyi@google.com>
2017-10-06 17:07:34 +00:00
Peter von der Ahé 16aa720d27 Remove compiling platform.dill from patch_sdk.dart
This separates compiling platform.dill files from the patch_sdk.dart
script. The motivation for that is that I'm working on reading patch
files directly from Fasta, so we can completely remove the build step
for generating patched_sdk and dart2js_patched_sdk.

Short-term this should allow Paul to add a strong-mode version of
platform.dill without causing to many conflicts with my work on
patches.

Change-Id: I1150845b2986348d4fffe27092701d8a9b57ea54
Reviewed-on: https://dart-review.googlesource.com/11506
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-06 15:34:37 +00:00
Morten Krogh-Jespersen 2564d99b65 New limit for truncating stdoutput from a running test.
Bug:
Change-Id: I0ad4ea30ef0ca0b9e1f15de8dd0313be27bcff12
Reviewed-on: https://dart-review.googlesource.com/11445
Commit-Queue: Morten Krogh-jespersen <mkroghj@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2017-10-05 12:48:00 +00:00
Johnni Winther f9cb6c4137 Remove dart2js_with_kernel_in_ssa test option
Change-Id: I2da692a4d458acc4b36e14beb99e1fb9d2bdec70
Reviewed-on: https://dart-review.googlesource.com/10861
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-05 06:53:39 +00:00
Zachary Anderson 6140210df2 [Fuchsia] Don't refer to python in the test harness
There's no python on Fuchsia.

Change-Id: I9fcb64d6ec625a79c00860104512211ebe66f330
Reviewed-on: https://dart-review.googlesource.com/9784
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-29 21:03:54 +00:00
Morten Krogh-Jespersen a0caa09bcf Listing of status files for win environment
Bug:
Change-Id: Idbc6990f60ba82fb88e3084370129432fc5c12ae
Reviewed-on: https://dart-review.googlesource.com/9486
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morten Krogh-jespersen <mkroghj@google.com>
2017-09-29 12:15:23 +00:00
Sigmund Cherem 8e1c242393 Add dart2jsoptions for browser runtimes.
The `dart2js_options` flag was used in some other codepaths including
"runtime=d8", this change allows us to pass --dart2js-options when using a
browser runtime as well.

Change-Id: I2864f52aff320ab3c2fbfb5a3b4bce34798a1792
Reviewed-on: https://dart-review.googlesource.com/8738
Reviewed-by: Emily Fortuna <efortuna@google.com>
2017-09-27 02:05:08 +00:00
Morten Krogh-Jespersen c6af2dbc49 Adding debug info to assertion resultcode check
Bug:
Change-Id: I02c4eae12c557157e1d61a5cfc8ffad752be8f30
Reviewed-on: https://dart-review.googlesource.com/8441
Reviewed-by: Jonas Termansen <sortie@google.com>
2017-09-26 11:57:57 +00:00
Morten Krogh-Jespersen fb0b2c5a73 Adding info about negative tests to result log
Bug:
Change-Id: Ic868ca637477bce4a7857304ce6b23aa4ea30817
Reviewed-on: https://dart-review.googlesource.com/8420
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morten Krogh-jespersen <mkroghj@google.com>
2017-09-26 10:19:31 +00:00
Bob Nystrom edee53f93d Bring back the deleted 1.0 corelib tests.
What is dead may never die.

Change-Id: I80ef766b8ce2b6e1416df8e1f9b91fb74169dc79
Reviewed-on: https://dart-review.googlesource.com/7483
Reviewed-by: William Hesse <whesse@google.com>
2017-09-21 18:29:40 +00:00
Florian Loitsch 38bf70d7ac Use generic functions in zones.
Migrated from https://chromiumcodereview.appspot.com/2893893002/

Change-Id: I0bd6dc1438eb1e6762e7760a08b5a760b07d4b10
Reviewed-on: https://dart-review.googlesource.com/4942
Reviewed-by: Florian Loitsch <floitsch@google.com>
Commit-Queue: Florian Loitsch <floitsch@google.com>
2017-09-20 15:46:06 +00:00
William Hesse 12b9849c80 Set requirejs timeout in DDC testing to 30 seconds
Bug:
Change-Id: I4b2148b4f526e583025d78c9b47bfac357fa45bb
Reviewed-on: https://dart-review.googlesource.com/5761
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2017-09-15 01:38:17 +00:00
Alexander Markov fe2e114e8e [Test tool] Support testing of Dart VM experimental strong mode
This CL extends '--compiler dartkp' configuration of the testing
tool (tools/test.py) to take '--strong' option into account.

'tools/test.py -c dartkp --strong' runs tests through kernel
front-end (pkg/front_end/tool/_fasta/compile.dart) and Dart VM
precompiler, and in addition:

* Enables strong mode in the kernel front-end.
* Enables experimental optimizations in the kernel front-end
  with '--target=vm_precompiler'.
* Enables experimental optimizations in Dart VM with
  '--experimental-strong-mode'.

Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: I565a4a7f79f880a872a28fe6b91372af1e77f978
Reviewed-on: https://dart-review.googlesource.com/5295
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-09-14 16:32:37 +00:00
Morten Krogh-Jespersen d695a17edd Adding selectors to summary map.
Change-Id: Id5bfc3282b85415ccca6bf0b81595b67dcba9111
Reviewed-on: https://dart-review.googlesource.com/5663
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morten Krogh-jespersen <mkroghj@google.com>
2017-09-14 13:15:58 +00:00
Morten Krogh-Jespersen a90bb3a104 Revert "Revert "Adding option to print out status files for a configuration.""
This reverts commit f50c2c2b6a.

Bug:
Change-Id: I895c1e498b58999127ebb6d7656c12fba1cb338b
Reviewed-on: https://dart-review.googlesource.com/5422
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morten Krogh-jespersen <mkroghj@google.com>
2017-09-13 12:52:18 +00:00
William Hesse f50c2c2b6a Revert "Adding option to print out status files for a configuration."
This reverts commit 0fcffaaeb5.

Bug:
Change-Id: I8852ce88c190e420615314b7fe95bf9d69a5f8d1
TBR=mkroghj@google.com
Reviewed-on: https://dart-review.googlesource.com/5361
Reviewed-by: William Hesse <whesse@google.com>
2017-09-13 09:11:32 +00:00
Morten Krogh-Jespersen b3788bc610 Adding extra information to toSummaryMap().
This will allow external clients to rebuild an environment to
correctly identify tests in status files.

Change-Id: Id359224df758600161cc7e32472638559eee0719
Reviewed-on: https://dart-review.googlesource.com/3881
Reviewed-by: William Hesse <whesse@google.com>
2017-09-13 08:36:58 +00:00
Morten Krogh-Jespersen 0fcffaaeb5 Adding option to print out status files for a configuration.
This will help other tools to use the same status files at test.py
uses.

Bug:
Change-Id: Ib01d0c8368089a35682d0d79e257b8df01e54de6
Reviewed-on: https://dart-review.googlesource.com/3941
Reviewed-by: William Hesse <whesse@google.com>
2017-09-13 08:30:38 +00:00
Sigmund Cherem 436ed70100 Add preview-dart-2 flag to analyzer cli and plumb it through test.py.
This allows us to collect stats about language-style tests as follows:

 ./tools/test.py -m release -c dart2analyzer -r none --preview-dart-2 --report \
      language language_2 corelib corelib_2

As of this morning, the command above has 87% of the tests passing.

Change-Id: I0f84211d5f33659d5923601267367be90c578107
Reviewed-on: https://dart-review.googlesource.com/3381
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2017-09-07 20:13:40 +00:00
Morten Krogh-Jespersen 955ce3e05b Removing compilationSkipped from result json log.
Change-Id: Ifc4a0d64a15f2de3f65808a40fb8cf8275937982
Reviewed-on: https://dart-review.googlesource.com/3600
Reviewed-by: William Hesse <whesse@google.com>
2017-09-06 13:27:22 +00:00
Morten Krogh-Jespersen 70e3e8aac1 Added json result of test output to output debug directory.
R=whesse@google.com

Review-Url: https://codereview.chromium.org/3005013002 .
2017-09-04 10:13:27 +02:00
Janice Collins 51cc9689b3 Remove corelib and corelib_strong and migrate last two remaining tests.
This includes a migration of linked_hash_map_from_iterable_test and
stacktrace_current_test, which were migrated without changes.

BUG=
R=rnystrom@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/3004073002 .
2017-09-01 08:11:15 -07:00
Ben Konyi a7a97e41ed Migrated test block 218 to Dart 2.0.
Fairly simple block, with changes made to some mirrors tests to make
them strong-mode clean. Modified test script to also accept
*_app_jit.status files.

BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2999373002 .
2017-08-30 07:29:11 -07:00
Bob Nystrom 58b96b7e60 Don't print "Necessary status file updates:" if there are none.
Also cleaned up the surrounding code to be more idiomatic.

R=jcollins@google.com

Review-Url: https://codereview.chromium.org/3007583002 .
2017-08-28 16:31:23 -07:00
Bob Nystrom 46320c5208 Migrate block 115.
Interesting changes:

- A static getter colliding with an inherited non-static setter is a
  compile error, not a type warning.

- Trying to call a setter on what is only a getter is a compile error
  with no runtime behavior.

- Add support to test.dart for negative tests in DDC.

BUG=
R=jcollins@google.com

Review-Url: https://codereview.chromium.org/3005643002 .
2017-08-28 16:17:28 -07:00
Vyacheslav Egorov 7d5231796e [VM, Precompiler] Support obfuscation of the symbolic information in precompiler
Obfuscation is controlled by obfuscate flag in Dart_IsolateFlags.

Obfuscation of identifiers is performed during script tokenization - when TokenStream is generated from the source. All kIDENT and kINTERPOL_VAR tokens are renamed consistently using a persistent obfuscation map stored in ObjectStore::obfuscation_map.

Some identifiers (pseudo-keywords, arithmetic operators, builtin recognized methods and entry-points) are not renamed to keep name based lookups from breaking. All other identifiers are renamed.

Constant instances of Symbol-s (both created via literal syntax #ident and using constant constructor const Symbol("ident")) are renamed consistently with corresponding identifiers.

Script urls and Library urls and names are also obfuscated.

Obfuscation map can be dumped as a JSON array at the end of precompilation using Dart_GetObfuscationMap API.

BUG=https://github.com/dart-lang/sdk/issues/30524
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/3003583002 .
2017-08-25 09:48:23 +02:00
Stephen Adams 88388cb5ca Revert "Remove support for "packages" URL from testing server."
This reverts commit f38f91bb7e.

Lots of browser bots are red with this change.
Hopefully it can be recommitted atomically with changes that fix the redness.

TBR=whesse@google.com

BUG=

Review-Url: https://codereview.chromium.org/2997753002 .
2017-08-10 17:04:21 -07:00
William Hesse f38f91bb7e Remove support for "packages" URL from testing server.
This support was only needed for testing Dartium.
This also removes the dependency upon package_resolver from test.py.

BUG=
R=eernst@google.com, mkroghj@google.com

Review-Url: https://codereview.chromium.org/2994073002 .
2017-08-10 14:33:07 +02:00
Jennifer Messerly a77f151461 fix #30330, don't ignore cast failures in DDC for language/lib tests
R=leafp@google.com

Review-Url: https://codereview.chromium.org/2999593002 .
2017-08-08 21:57:45 -07:00
Bob Nystrom 9a0c11c26b Split language_2.status into multiple files.
This mainly splits along compiler lines, but uses runtime for a couple
of things -- VM and Flutter mainly.

I did most of the work automatically by hacking up the migration script
to re-migrate the existing file, but I also went through and manually
cleaned the result up as best I could.

R=bkonyi@google.com, jcollins@google.com

Review-Url: https://codereview.chromium.org/2993043002 .
2017-08-04 11:33:01 -07:00
Jennifer Messerly 62303b6711 enable batch mode for dartdevc tests, also fix status so ddc bots pass
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2987393002 .
2017-08-03 14:39:45 -07:00
Siva Annamalai f1689b6eb0 Migrate first block of tests in standalone to standalone_2
R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2984363004 .
2017-08-01 09:05:01 -07:00
Sigmund Cherem b1065335cd Use dart2js_plaform.dill from the sdk.
This will enable --use-kernel tests in the dart2js bots.

After this change, running our tests will change a little bit, either of these
would work:

Option A: --use-sdk (host-checked not allowed)

python tools/test.py -m release \
   -c dart2js -r d8 --dart2js-batch --report \
   --dart2js-with-kernel --use-sdk \
   language corelib library_2 corelib_2 \
   dart2js_native dart2js_extra

Option B: pass --library-root, --host-check works here.
python tools/test.py -m release \
   -c dart2js -r d8 --dart2js-batch --report \
   --dart2js-with-kernel --host-checked \
   --dart2js_options="--library-root=out/ReleaseX64/dart-sdk/" \
   language corelib library_2 corelib_2 \
   dart2js_native dart2js_extra

In the future, when fasta supports compiling sdk with @patch files, we will
be able to remove the --library-root option and simply compile the SDK from
sources at that point.

BUG=
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2988063002 .
2017-07-28 10:07:08 -07:00
Bob Nystrom 796eb21071 Move the status file parser into its own package.
This required munging a bit of test.dart code too to tease out some
dependencies, but the changes are minor. I considered moving all of
test.dart out into a package and making the status file library a
public one that other packages in the repo could import but this seemed
like the less intrusive change.

R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2984203002 .
2017-07-25 15:29:59 -07:00
Sigmund Cherem 985dee0f5b We'll be using dart2js_with_kernel for a more general purpose, but need dart2js_with_kernel_in_ssa while we transition over.
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2981403002 .
2017-07-24 13:07:15 -07:00
Sigmund Cherem 64541f6bdc Fix co19_test script: --fast-startup is only an option for dart2js
BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2985593002 .
2017-07-21 11:44:09 -07:00
Bob Nystrom 673c813c17 Fix merge bug.
Accidentally dropped a variable rename on the floor when I merged with
latest.

Review-Url: https://codereview.chromium.org/2979373002 .
2017-07-20 12:52:26 -07:00
Bob Nystrom 012774c78e Remove Dartium support from test.dart.
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2981223002 .
2017-07-20 12:46:50 -07:00
Bob Nystrom 18ba6eb06d Pass shared options to dartdevc in test.dart.
This fixes the from_environment tests. Before, DDC wasn't getting
passed the names being defined.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2986513002 .
2017-07-19 17:06:11 -07:00
Bob Nystrom a8878ea655 Remove references to deleted test directories.
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2986473002 .
2017-07-19 13:55:13 -07:00
Bob Nystrom 489c96ac2e Re-land beginning Dart 2.0 test migration.
This is similar to:

47985d6dbd
452d2d0840
7af2d86ed3

Except that it also fixes the status for dart2analyzer.

R=jcollins@google.com

Review-Url: https://codereview.chromium.org/2980213002 .
2017-07-17 12:40:18 -07:00
Alexander Aprelev 9882d494db "Set up directories.." commit below broke the buildbot tests, two others are collateral damage.
Revert "Precompiler doesn't report Dart 2.0 static type errors yet."

This reverts commit 7af2d86ed3.

Revert "Move absstract_exact_selector back into the language tests. (#30169)"

This reverts commit 452d2d0840.

Revert "Set up directories for migrated Dart 2.0 tests and migrate a couple. (#30149)"

This reverts commit 47985d6dbd.

R=zra@google.com

BUG:dartbug.com/30171
Review-Url: https://codereview.chromium.org/2979073002 .
2017-07-14 14:43:55 -07:00