Commit Graph

1689 Commits

Author SHA1 Message Date
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
Bob Nystrom 556c0550bf Simplify CommandOutput and friends.
- Merge CommandOutputImpl and CommandOutput. There were no classes that
  implemented CommandOutput that didn't extend the Impl.
- Remove "Impl" from the other class names.
- Make stuff private when possible. Likewise final.
- Other tiny style changes.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2946783002 .
2017-06-23 12:13:31 -07:00
William Hesse 6482690781 Rebased simplify CompilerConfiguration
BUG=

Review-Url: https://codereview.chromium.org/2954113002 .
2017-06-23 14:10:03 +02:00
Zachary Anderson ac16656161 Remove MIPS support
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2858623002 .
2017-06-22 08:49:22 -07:00
William Hesse d8ec6450d0 Fix compiler==none case in browser testing (Dartium case)
Error was introduced in https://codereview.chromium.org/2947473002/

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2950173004 .
2017-06-22 11:30:23 +02:00
Bob Nystrom b452b39962 Basic support for dev_compiler in test.dart.
It can compile and run tests on Chrome. There are a lot of failing tests
that I (or the team) will need to triage, but I think at least basic
tests are working as expected.

There is code that could be cleaned up to more neatly factor how dart2js
and dartdevc are handled now that there are two separate compilers to
JS. There's also some redundant code between the path for testing
compile errors (enqueueStandardTest()) and the path for running a test
in the browser.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2947473002 .
2017-06-21 13:19:28 -07:00
Siva Chandra bac83e0973 Replace the --platform vm_option with --kernel-binaries option.
This new flag value specifies the directory in which the VM should look
up the platform.dill file. A future change will require the VM to load
another kernel binary from disk. This binary will also live in the same
directory that --kernel-binaries specifies. This way, we avoid adding a
different flag for each of the different binaries.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2933203004 .
2017-06-16 12:22:31 -07:00
William Hesse f99509ad42 Fix bad merge in refactoring
The land of https://codereview.chromium.org/2933973002 merged badly
with https://codereview.chromium.org/2934243002/

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

Review-Url: https://codereview.chromium.org/2938383002 .
2017-06-16 10:10:54 +02:00
Bob Nystrom a6ca718e98 Simplify Command classes.
- Get rid of separate CommandBuilder class and singleton pattern. It
  was being passed around explicitly even though half of the places
  that received a CommandBuilder as a parameter still directly called
  CommandBuilder.instance instead of using it.
- Get rid of Command caching. As far as I can tell, it makes no
  measurable difference in runtime performance or memory usage. Even
  with a large invocation of a lot of configurations and tests, the
  Command classes don't seem to be a significant use of memory.
- Shorten the factory names. "get" adds no value, and we know it
  returns a "Command" since it's on Command.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2933973002 .
2017-06-15 14:19:03 -07:00
Bob Nystrom 979026abef Don't allow "none" as a runtime for dartk.
Also, add a little sanity checking in TestCase.

Fix #29842.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2941603002 .
2017-06-14 10:31:09 -07:00
William Hesse e64ee95959 Move ie11 timeout handling code to BrowserControllerTestOutcome
Only content_shell testing uses the BrowserCommandOutputImpl class.
Rename the class to ContentShellCommandOutputImpl.

BUG=https://github.com/dart-lang/sdk/issues/28955
BUG=https://github.com/dart-lang/sdk/issues/29869
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2934243002 .
2017-06-14 15:50:41 +02:00
William Hesse d98d32b63c Report ie11 timeouts in debug log, not as errors (attempt 2)
BUG=https://github.com/dart-lang/sdk/issues/28955
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2938813002 .
2017-06-14 14:17:27 +02:00
Bob Nystrom 571839ed90 Remove negated variables now that we support "!".
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2924183002 .
2017-06-12 15:50:59 -07:00