Commit Graph

1551 Commits

Author SHA1 Message Date
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
Bob Nystrom 47985d6dbd Set up directories for migrated Dart 2.0 tests and migrate a couple. (#30149)
* Set up directories for migrated Dart 2.0 tests and migrate a couple.

- Create new "_2" directories where tests that have been validated as
  ready for Dart 2.0 will end up.
- Create empty status files for each directory.
- Add those directories to the set of default selectors you get when you
  run test.py. This gets the VM bots running them.
- Get the DDC bots running those suites.
- Move abstract_exact_selector_test over to dart2js since it's a
  dart2js-specific regression test and not an actual language test.
- Migrate corelib/apply_test.dart.
- Delete abstract_beats_arguments[2]_test.dart since that code is
  statically wrong in 2.0 and can't be run.

This doesn't get the dart2js bots running the new suites. I'll email
the relevant folks to get help with that.

* Resurrect abstract_beats_arguments_test.dart.

It usefully checked that an implementation reports an warning (now
error) if you construct an abstract class.

Also added support to test.dart to mark a test as expecting to
generate a compile error in the test itself. That way, the status file
reflects what is *wrong* about the current status, not what is *right*.

* Change static error syntax to match front_end notation.

* Migrate abstract_getter_test.
2017-07-14 10:27:37 -07:00
Bob Nystrom b1fdd84817 One more fix to Windows file path handling. (#30133) 2017-07-10 17:02:56 -07:00
Bob Nystrom 15f80a42d6 More Windows path whack-a-mole in test.dart. (#30132) 2017-07-10 16:19:25 -07:00
Bob Nystrom b1ae919390 Fix test.dart path arguments to DDC on Windows (hopefully). (#30130) 2017-07-10 14:47:37 -07:00
Bob Nystrom 7b17a3dd01 Use "|" as the separator between module path and name. (#30106)
* Use "|" as the separator between module path and name.

":" is already a path character in Windows. This is why the
dartdevc tests aren't working on Windows. Because they try to do:

-sC:/some/path/blah.dart:blah

And it splits at the first ":". Oops.

* Switch to "=" for separating module path from name.

It looks a little funny when used with "--summary=", but it works fine
and is very unlikely to be used for anything else on any platform
(since we already use it as the separator between arg name and value).
2017-07-07 17:13:43 -07:00
Bob Nystrom 5a3b8326e4 Handle spaces in paths in status files. (#30107)
Also triage a couple more dartdevc tests.
2017-07-07 16:49:44 -07:00
Erik Ernst 3b05eb9553 Add support to dart2js for option --enable-asserts.
R=johnniwinther@google.com, sigmund@google.com, sra@google.com

Review-Url: https://codereview.chromium.org/2879153005 .
2017-07-07 10:59:09 +02:00
Bob Nystrom 1bd907dc2e Run dartdevc tests on drt instead of Chrome on the bots.
Also, do another triage pass on the tests.

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2964043004 .
2017-07-05 09:45:16 -07:00
Vyacheslav Egorov f167ad18da test.py: temporarily disable background optimizer in vm-dartk-debug config.
It is causing flakiness on bots.

Unmark tests marked as flaky by 45e4d848d2

See https://github.com/dart-lang/sdk/issues/30016.

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2970733002 .
2017-07-03 17:05:12 +02:00
Bob Nystrom 0b2c9b048d Dynamically load packages for dartdevc tests in test.dart.
This involves a few pieces:

- Add support to DDC for specifying the module name associated with a
  given summary. This lets test.dart invoke DDC using summaries in the
  build directory outside of the directory containing the test itself.

- Add support to the build scripts for building the packages. This adds
  a new GN target that builds everything needed to run test.dart with
  dartdevc. In particular, it invokes build_pkgs.dart to compile the
  relevant packages to JS+summary so that the tests can use them.

  This requires some changes to build_pkgs.dart so it can output to a
  given directory.

- In test.dart, when tests are compiled with dartdevc, pass in the
  summaries for the packages so they don't get compiled in. Then, when
  the test is run, configure require.js with the right paths to their
  JS files so they can be loaded.

  I also removed a bunch of unneeded buildDir parameters being passed
  around the various CompilerConfiguration class methods now that they
  have direct access to the configuration.

Fix #29923.

R=vsm@google.com, whesse@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2955513002 .
2017-06-29 13:45:57 -07:00
Bob Nystrom 82df163eca Refactor dependency_graph.dart.
It multiplexed a bunch of different events onto a single stream. But
every single listener on that stream immediately demuxed them and only
cared about a subset of the events.

So I made separate streams for each event. Other minor clean-ups too.

R=sigmund@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/2957703002 .
2017-06-26 17:07:37 -07:00
Erik Corry 029b1cb948 Spelling fixes e to i.
R=kevmoo@google.com
BUG=

Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Bob Nystrom dfb4f52b43 Simplify enqueueBrowserTest().
It's still big and monolithic, but it's not as big as it was before.

- Remove old unused Polymer stuff.
- Move some of the logic out into a helper function.
- Other small tweaks.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2949823003 .
2017-06-23 15:02:36 -07:00
Bob Nystrom 3144296c4f Remove unused PubCommand stuff.
The rest of the pub functionality was removed already, so I think this
is just a straggler.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2944163002 .
2017-06-23 12:55:46 -07:00