* 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.
* 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).
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 .
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 .
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 .
- 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 .
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 .
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 .
- 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 .
This is a pretty massive change but my hope is it will make
test.dart easier to maintain going forward. Instead of
passing around a stringly-typed Map<String, dynamic> all
throughout the program, we parse the options and then create
a Configuration object that has typed getters for all of the
various bits of configuration data.
This is a little tedious because it means declaring a new
option requires also declaring a corresponding field in the
Configuration class and passing it through the constructor.
I think it's worth it.
Also, enum-like configuration properties like architecture
and runtime now have their own classes as well. Moved a
bunch of stuff from TestUtil into those classes now that
there is an object to hang those methods off of.
In the process, I found a few typos in string literals where
the code wasn't correctly looking up a configuration
property.
Added more sanity checking and validation to status file
parsing. You will get an error at parse time if you try to
refer to a variable that isn't in the whitelist of known
variables. Also, you'll get an error if you try to compare
a variable to a value that it isn't expected to have.
Many other small-scale cleanups.
Aside from the status file validation, this should behave
mostly the same as current test.dart except that tests
may be enqueued in a slightly different order. The
rewritten code for expanding configurations iterates
through the architecture, runtime, etc. options in a
slightly different order.
R=whesse@google.com
Review-Url: https://codereview.chromium.org/2901923003 .
This removes all implicit casts and many implicit uses of dynamic. It
adds a gratuitous number of explicit "as" casts and arguably makes the
code worse.
This is an interim step towards replacing the big configuration map
with an actual typed object. These "as" casts should help catch places
where the configuration object is being used and where the code will
need to be changed to use a new object.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2903703002 .
This doesn’t touch the resulting configuration map, which is what this
is leading up to, but it cleans up the specification and parsing of the
options and removes a lot of redundancy.
Behavior should be the same as it was before, except that all options
now allow both their underscore-separated and hyphen-separated names.
So this is now valid:
test.py --hot_reload --append-logs
Where before, you use to have to do --hot-reload (OK) and
--append_logs (bad, since almost all other options expect hyphens).
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2902023002 .
This reverts commit f62a2a9562.
Commit above [expectedly] broke runtime/vm tests since it uses DFE
instead of vm parser, but I didn't realize we actually test -cdartk
configuration. This has to be resubmitted with status file update to
mark 235 vm tests failing with DFE.
TBR=siva
BUG=
Review-Url: https://codereview.chromium.org/2901733002 .
- Separate out parsing a status file from applying the environment to
determine which sections are active. This makes it possible to, for
example, generate expectation sets for multiple environments without
having to reparse each time.
- Simplify expression parsing. Remove set expressions since they weren't
used for anything useful. A test's expectations are a simple
comma-separated list and don't need anything beyond that. Merge
Scanner and Tokenizer since the latter was a glorified function.
- Make more names private so that it's clearer what's used outside of
various libraries.
- Generally modernize the style.
- Add *lots* of documentation.
Again, there should be no behavioral changes. I ran:
./tools/test.py -m release,debug -c none,dart2js,dart2analyzer -r none,vm,d8 corelib
Before and after the change and verified that the output was the same
(aside from timing).
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2891753003 .