Also, --limit-ints-to-64-bits is enabled when running tests in _2 test
suites.
This is the re-landing of 92ebd8aefa with
fixes:
* Revert changes in pkg/dev_compiler/test/browser/language_tests.js
and tests/language/language_dart2js.status as they describe
'language' test suite, not 'language_2'
* Correct tests/standalone_2/io/fuzz_support.dart as file_fuzz test was
timing out on Windows and failing on android/arm.
Closes https://github.com/dart-lang/sdk/issues/31396
Change-Id: If9ca77fca300ddc605f17a7be39d1707e9724e25
Reviewed-on: https://dart-review.googlesource.com/21700
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
* kernel-service.dart is moved to pkg/vm/bin and renamed to
kernel_service.dart
* LICENSE, pubspec.yaml and analysis_options.yaml added to pkg/vm.
* Kernel isolate name is corrected to be independent of URI passed
in --dfe VM option.
Change-Id: I5b7b860297314e240e557af80913e7ac3e6324ad
Reviewed-on: https://dart-review.googlesource.com/21260
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This CL modifies the Dart source used from test.py such that it takes
`syntax error` into account as an expected outcome in test files (so
that we can have `//# 01: syntax error` with a similar meaning as
`//# 01: compile-time error`).
For all tools except the spec_parser, `syntax error` is the same
outcome as `compile-time error`; that is, nobody else will see the
difference.
For the spec_parser, `syntax error` is the outcome where parsing has
failed; `compile-time error` is taken to mean some other compile-time
error, i.e., the spec_parser is expected to _succeed_ when the
expected outcome is `compile-time error`.
Test files in language and language_2 have been adjusted to use the
outcome `syntax error` where appropriate.
The status files in language and language_2 for the spec_parser have
been adjusted such that they fit all the new `syntax error` outcomes
in test files.
Other status files have been adjusted in a few cases where tests were
corrected (because a compile-time error which was clearly not intended
to be a syntax error turned out to be caused by a typo, which means
that the actual compile-time error has never been tested).
The spec grammar Dart.g was adjusted in a few cases, when some bugs
were discovered. In particular, the treatment of Function has been
changed: It is now known by the parser that Function does not take
any type arguments. This makes no difference for developers, because
they cannot declare a type named Function anyway, but it means that
a number of tricky parsing issues were resolved.
Dart.g was also adjusted to allow `qualified` to contain three
identifiers, which is an old bug (preventing things like metadata on
the form `@p.C.myConst`).
Change-Id: Ie420887d45c882ef97c84143365219f8aa0d2933
Reviewed-on: https://dart-review.googlesource.com/18262
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
If you pass "-c" or "-r", but not both, choose a smart default for the
other instead of simply yelling at the user and telling them they
forgot something.
Change-Id: Ic47a20fa8f137a8f6488f16cf883839999e2225b
Reviewed-on: https://dart-review.googlesource.com/16905
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This allows dartdevk to compile tests that import packages like expect.
There are a few pieces to this:
- Add support to build_pkgs.dart to build the kernel summaries for each
test package (in addition to the analyzer summaries it already
builds).
- Plumb that through the dartdevc_test target in the GN build as well.
- While we're at it, use GN to build the ddc_sdk.dill file and have
test.dart load that one instead of the manually built one from calling
./tool/kernel_sdk.dart.
- Add command-line arguments to dartdevk for passing in the path to the
SDK summary and the other summaries to compile against.
- Fix a little typo in processed_options.dart that was preventing it
from resolving "package:" URIs.
- In test.dart, when compiling a test, link in the summaries for all of
the test packages.
At runtime, it still uses the JS for those packages generated from the
old analyzer-based front end since the kernel-based compiler isn't
complete enough to compile any of those packages yet.
With all of this, if I change a test to:
import "package:expect/expect.dart";
main() {
Expect.equals("a", "b");
}
Then it compiles but fails at runtime. The compiler is completing, but
the generated code has some bugs. I don't know enough to fix them
myself, but here's what I've found out:
- In _libraryToModule(), the Library we get from kernel has a null
fileUri, so this returns an empty string. That in turn means the
generated JS tries to use "$" as the module name.
Using this works around it temporarily:
if (moduleName.isEmpty) moduleName = library.name;
- In _emitTopLevelNameNoInterop(), it doesn't handle the case where the
NamedNode is a static method on a class. It just generates the library
and method name, skipping the class, so "Expect.equals(1, 2)" gets
compiled to "expect.equals(1, 2)" instead of
"expect.Expect.equals(1, 2)".
Change-Id: I6bd9d98bc9706965160d8fb7cf70b20eeebab3a8
Reviewed-on: https://dart-review.googlesource.com/16687
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
This will make sure that the result.log file will always exist, even if no tests
are run. This also means that the delete result.log step for recipes can be
removed.
Bug:
Change-Id: Idf097acb990b047146a874715f992657deacf65a
Reviewed-on: https://dart-review.googlesource.com/16483
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Morten Krogh-jespersen <mkroghj@google.com>
There was an error so these tests were run unless the --report flag was
present. This fixes that error. Testing for compile-time errors in non-browser
cases is sufficient.
Bug:
Change-Id: Ifeed1a3835297a9308a94de15cabfa119604c75a
R=mkroghj@google.com
Reviewed-on: https://dart-review.googlesource.com/14480
Reviewed-by: Morten Krogh-jespersen <mkroghj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
- Clean up browser test failure output. Instead of barfing a giant blob
of JSON, show just the runtime error and its stack trace. In verbose
and on the buildbots, it still shows all the events, but even there
they are formatted nicely.
- Don't redundantly show the failure summary when most of the output is
already failure text.
- Color the failure summary end message.
Change-Id: I49724b204be55a297fc5e723b80b32e0e00748f0
Reviewed-on: https://dart-review.googlesource.com/15767
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
This CL adds handling of previously introduced 'strong-aot'
implementation (target-specific) option into VM target.
After this change, it will be possible to enable strong-mode
whole-program optimizations in Flutter (in addition to standalone VM).
Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: I054b75ce4ba1b9bcf150e0b7f25fa7ca1bdd187e
Reviewed-on: https://dart-review.googlesource.com/15644
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
It's added as a new compiler, so pass "-c dartdevk" to use it.
It doesn't support any test packages yet, so tests that, say, import
package expect won't compile. I'll work on that next, but it will
require adding some stuff to the build scripts to build .dill files for
those packages.
This does get test.dart invoking the compiler, running the resulting
test, and correctly reporting the result:
- A test that doesn't throw an exception and stays within the bounds of
what is currently implemented in dartdevk passes.
- A test that compiles correctly but fails at runtime fails with a
RuntimeError.
- A test that contains a compile error fails with a non-zero exit code
and is reported as a CompileTimeError.
Change-Id: Icacbf1ff54dfe7aa4d245382d3b0aeb375cf105b
Reviewed-on: https://dart-review.googlesource.com/15420
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Of course, if you're not using the color formatter, it stays uncolored.
But this gets rid of some unnecessary empty lines and section headers
that have no content.
Change-Id: I5b83345c583b79468af84f4e67a12ee757a3105f
Reviewed-on: https://dart-review.googlesource.com/14720
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
- 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>
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>
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>
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>
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>
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>
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>