Commit graph

4478 commits

Author SHA1 Message Date
Zachary Anderson 81e428fd39 [infra] Assembles the SDK using GN rather than create_sdk.py
This has a few advantages:
- We can track dependencies more precisely
- ninja can assemble things in parallel as they're ready rather than
  sequentially all at once.
- It is easier to customize SDKs depending on target platform, e.g.
  Fuchsia.

This CL also has a number of cleanups:
- Defining is_fuchsia and is_fuchsia host so we don't always have to check
- Piping through toolchain overrides in more places
- Fixing bugs in copy_tree.py, not using list_files.py, which is broken on Windows

related #29558

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2848943003 .
2017-05-20 23:30:09 -07:00
Martin Kustermann 22c7536d36 Reduce temporarily flakiness rate of dart2js-drt by re-running until they have been fixed
We should either remove dart2js-drt or use a stable version of
content_shell from upstream chromium (instead of our dartium-based one)
for dart2js-drt.

Issue #29655

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2891343002 .
2017-05-19 13:13:40 +02:00
Bob Nystrom 92267afc66 Refactor and clean up the status file parsing code. - Make the parser less error tolerant. The expression parser used to ignore any unrecognized tokens, which means a status like "RuntimeError CompileError" (not the missing comma) was parsed as simply "RuntimeError", which seems bad. Now it reports an error. Fixed a couple of status files that thought they were setting statuses that they weren't (!).
- 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 .
2017-05-18 12:42:52 -07:00
Bob Nystrom c269ef53a5 Revert "Re-apply status file parser changes from 0b7728da1bef08c1c1e092005d9fd8c8bff5fa6c."
This reverts commit a881aed354.

TBR.

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2888213002 .
2017-05-17 13:45:40 -07:00
P.Y. Laligand f3f599bcb5 Don't remove destination files in dry run mode. (#29633) 2017-05-17 13:18:49 -07:00
Bob Nystrom a881aed354 Re-apply status file parser changes from 0b7728da1b.
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2880203004 .
2017-05-17 13:04:35 -07:00
Sigmund Cherem cd2ebf70a2 Add dart:html and friends to patched_dart2js_sdk/platform.dill, also fix up
warnings on these libraries.

R=sra@google.com

Review-Url: https://codereview.chromium.org/2885103005 .
2017-05-17 10:58:30 -07:00
Florian Loitsch eba1a930d6 Give usage when there are no arguments to patch_sdk.
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2890463003 .
2017-05-17 14:49:14 +02:00
Stephen Adams 9c3d439b1e dart2js + html: getBoundingClientRect() returns a ClientRect
Gives better code since the general Rectangle requires getInterceptor
dispatch.

BUG= https://github.com/dart-lang/sdk/issues/29602
R=jacobr@google.com, terry@google.com

Review-Url: https://codereview.chromium.org/2879403002 .
2017-05-16 13:48:04 -07:00
Bob Nystrom 01e5b1b40c Revert "Refactor and clean up the status file parsing code."
This reverts commit 0b7728da1b.

R=nbosch@google.com

Review-Url: https://codereview.chromium.org/2885623002 .
2017-05-15 15:58:05 -07:00
Bob Nystrom 0b7728da1b Refactor and clean up the status file parsing code.
- Make the parser less error tolerant. The expression parser used to
  ignore any unrecognized tokens, which means a status like
  "RuntimeError CompileError" (not the missing comma) was parsed as
  simply "RuntimeError", which seems bad. Now it reports an error.
  Fixed a couple of status files that thought they were setting statuses
  that they weren't (!).

- 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).

BUG=
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2875203005 .
2017-05-15 15:42:15 -07:00
Bob Nystrom e0180925f6 Tighten up a bunch of types in test.dart.
This doesn't get rid of all implicit dynamic and casts, but it covers
many of them.

Also did some minor modernization when I noticed it:

- Using "var" for local variables where inference does the right thing.
- camelCase for variable names.
- More collection literals.

There are (or should be!) zero behavioral changes.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2863253002 .
2017-05-15 15:26:40 -07:00
Stephen Adams 89b9c7c8dd html: AudoTrackList is a List
BUG=
R=terry@google.com

Review-Url: https://codereview.chromium.org/2884813002 .
2017-05-15 14:44:35 -07:00
Stephen Adams 35979c3205 Add keyLocation to KeyboardEvent constructor for backwards compatibility
BUG=
R=jacobr@google.com

Review-Url: https://codereview.chromium.org/2884713002 .
2017-05-15 10:58:24 -07:00
William Hesse 6f3d45f5a3 Check for infrastructure failure before reporting timeouts and crashes.
BUG=http://dartbug.com/28955

Review-Url: https://codereview.chromium.org/2881073002 .
2017-05-15 18:27:46 +02:00
William Hesse c235977ddb Increase startup time allowed for browsers
On a cold, overloaded system, IE sometimes takes more than 60 seconds to start.

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

Review-Url: https://codereview.chromium.org/2878423002 .
2017-05-15 13:36:44 +02:00
Stephen Adams 01ba5f8d74 fix KeyEvent and KeyboardEvent
Some keyboard specific properties moved in the IDL from UIEvent to
KeyboardEvent.  We has done work to hide them on UIEvent; this needed
to be updated.

TBR=terry@google.com

BUG=

Review-Url: https://codereview.chromium.org/2883623004 .
2017-05-12 16:03:01 -07:00
Stephen Adams ca3d90c4cd Prevent ExtendableMessageEvent.data from thwarting DOM tree-shaking
We can't have the [data] and [source] getters typed as Object.
This causes it to appear that all DOM types are instantiated.

I have modelled the annotations after the same getters from
MessageEvent.

TBR=jacobr@google.com

BUG=

Review-Url: https://codereview.chromium.org/2879763002 .
2017-05-11 19:31:20 -07:00
Stephen Adams 0879884d80 web_audio: rename OfflineAudioContext.suspend
Rename member to avoid warning due to incompatible signature of base class method of same name.

TBR=terry@google.com

BUG=

Review-Url: https://codereview.chromium.org/2872023006 .
2017-05-11 18:05:09 -07:00
Stephen Adams 91f9ce3f71 Better type for _match argument in AttributeMatch
This fixes two warnings in analyze_api_test:

R=jacobr@google.com

sdk/lib/html/dart2js/html_dart2js.dart:41478:31:
Warning: The getter '_namespaceUri' is not defined for the class 'Node'.
  bool _matches(Node node) => node._namespaceUri == null;
                              ^^^^^^^^^^^^^^^^^^
sdk/lib/html/dart2js/html_dart2js.dart:41514:31:
Warning: The getter '_namespaceUri' is not defined for the class 'Node'.
  bool _matches(Node node) => node._namespaceUri == _namespace;
                              ^^^^^^^^^^^^^^^^^^
Review-Url: https://codereview.chromium.org/2875183002 .
2017-05-11 16:59:17 -07:00
Sigmund Cherem db331244d0 Generate outline without transformations in patched_sdk, use it for unit tests
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2881603003 .
2017-05-11 15:10:33 -07:00
Stephen Adams f3734a9fc5 dom: Recognize __getter__ indexers
BUG=
R=alanknight@google.com

Review-Url: https://codereview.chromium.org/2879663002 .
2017-05-11 13:59:41 -07:00
Zachary Anderson 5ec18fc68e [infra] Fix copy_tree.py to avoid extra rebuilding in Fuchsia
This CL computes the correct input and output in the copy_tree GN template by
modifying tools/copy_tree.py to perform a dry-run that lists the files to be copied.

Also, shutil.copytree uses shutil.copy2 to copy files and their metadata, but copying
the metadata appears to confuse ninja dependency tracking.

To do the dry run and to use shutil.copy instead of shutil.copy2, copy_tree.py now
uses its own CopyTree function instead of shutil.copytree.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2875893002 .
2017-05-11 09:46:15 -07:00
William Hesse 8a5cc82e77 Suppress failures from taskkill when killing content_shell on Windows.
BUG=https://github.com/dart-lang/sdk/issues/29599
R=terry@google.com

Review-Url: https://codereview.chromium.org/2875043002 .
2017-05-11 14:45:32 +02:00
William Hesse bff560292c Fix bug in test_runner.dart
This error was introduced in https://codereview.chromium.org/2875683002/
committed as d6ca1a5def.

BUG=
TBR=karlklose@google.com

Review-Url: https://codereview.chromium.org/2874193002 .
2017-05-11 13:39:46 +02:00
William Hesse d6ca1a5def Report IE11 timeouts in debug log, not as failing tests.
BUG=https://github.com/dart-lang/sdk/issues/28955
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2875683002 .
2017-05-11 11:18:42 +02:00
Terry Lucas f27144d7b5 Roll 50: Updated for push to origin/master.
TBR=jacobr@google.com

Review-Url: https://codereview.chromium.org/2875773003 .
2017-05-10 18:16:51 -07:00
Zachary Anderson 713b89fbe7 [infra] Stop console spam from utils.py on a cross-build
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2873613004 .
2017-05-10 09:41:45 -07:00
Bob Nystrom 0592404cc3 Re-add missing space in test failed message.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2866273002 .
2017-05-09 11:16:42 -07:00
Zachary Anderson 6225b1f4b1 [infra] Ignore wheezy sysroot for Linux ARM cross-builds
Fixes Linux SDK buildbot

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2870963002 .
2017-05-09 10:22:15 -07:00
Ryan Macnak d00f99cde9 [infra] Ensure args.gn is updated for the Linux cross builds during gclient runhooks.
Issue #29580

R=zra@google.com

Review-Url: https://codereview.chromium.org/2873693002 .
2017-05-09 09:47:53 -07:00
Zach Anderson ef139fbef3 [infra] Fix clang-format invocation from git cl format
Instead of maintaining two very similar python scripts, this change
copies the binaries they were forwarding to to the location expected
by git cl format and depot_tools.

R=aam@google.com

Review-Url: https://codereview.chromium.org/2871673003 .
2017-05-09 09:24:00 -07:00
Ryan Macnak 98d31056a7 Change build.py to be like ninja.py and only use a single GN/Ninja invocation to cross-build the SDK. This step alone would fix #29580. This breaks cross-building the SDK with GYP.
Remove hack in bin/snapshot_utils.cc that avoided building a true app-jit snapshot for ARM, ARM64 and MIPS because of the multiple invocations above.

Add GN flags to choose to build script snapshots instead of app-jit snapshots, avoiding a slow training run inside a simulator.

Fixes #29580.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2871713002 .
2017-05-08 13:06:09 -07:00
Zachary Anderson 0d0d97d7a0 [infra] Cleanup buildfile generation scripts a bit
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2871683002 .
2017-05-08 12:31:43 -07:00
Vyacheslav Egorov c162e0f011 GN: On Linux still fallback to GCC for ARM64 build.
We don't have clang arm64 toolchain.

BUG=
R=kustermann@google.com, sortie@google.com

Review-Url: https://codereview.chromium.org/2867733002 .
2017-05-08 11:30:32 +02:00
Zachary Anderson 7fb361907b [infra] Make gclient runhooks gn for Android on supported platforms
Make GN run for Android configurations on supported host platforms
on a gclient runhooks. This should fix the vm-precomp-android-* bots

Review-Url: https://codereview.chromium.org/2861363002 .
2017-05-06 23:52:26 -07:00
Zach Anderson 726732dd6b [infra] Roll clang to match the version used by Flutter
Flutter uses the same clang toolchain as Fuchsia. This CL puts Dart
on that toolchain, as well. This roll should entail no changes to
glibc version requirements on Linux.

The Fuchsia buildtools distribute clang-format with the toolchain
rather than separately, so this CL introduces forwarding scripts
that are copied to the right place under //buildtools.

This CL sets the default for the number of workers in //tools/gn.py
to 1, as the newer GN version fails occasionally when run
concurrently with other invocations.

As Flutter does, this CL uses the clang toolchain to build for
Android. Thus, it is now possible to build for Android on MacOS.

This change is a prerequisite for assembling the SDK in GN
rather than with a python script:

https://codereview.chromium.org/2848943003/

and will be nicer for making prebuilt SDKs for Fuchsia.

Resubmitting this with the following fixes:
1. Rolls further forward to get past a GN bug
2. Fixes the Android build.
3. Style cleanups in gn.py

Review-Url: https://codereview.chromium.org/2858873005 .
2017-05-06 21:45:00 -07:00
Alan Knight 95930806c9 Add dynamic declaration to CssRectangle width/height setters
BUG=
R=rnystrom@google.com

Review URL: https://codereview.chromium.org/2868483002 .
2017-05-05 13:34:23 -07:00
Nate Bosch bbc65073fa Clarify units for timeout
This is indicated in the linked MDN doc, but we should not make readers
go looking.

Also fix a typo.

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

Review-Url: https://codereview.chromium.org/2832353003 .
2017-05-05 10:11:03 -07:00
Alan Knight cedd8a6854 Format dart:html and related generated files on output
BUG=
R=jacobr@google.com, terry@google.com

Review URL: https://codereview.chromium.org/2858323003 .
2017-05-05 10:09:00 -07:00
Bob Nystrom 0635d4d559 Rename analysis options file for test.dart.
R=nbosch@google.com

Review-Url: https://codereview.chromium.org/2858323002 .
2017-05-04 14:05:34 -07:00
Bob Nystrom f5471fb948 Make test.dart strong mode clean!
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2855883008 .
2017-05-04 10:48:39 -07:00
Bob Nystrom 9cd2f83ef7 Small-scale clean ups in test.dart, mainly around test_progress.
Stuff like:

- Use core lib methods like padLeft() now that they exist.
- Use collection literals (!).
- Use getters where appropriate.
- Make Formatter enum-like since it has no interesting instance state.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2855073002 .
2017-05-03 16:50:45 -07:00
Zachary Anderson ab422ad194 Revert "[infra] Roll clang to match the version used by Flutter"
This reverts commit 6bf2c800fd.

There is still some strangeness with the new GN binary not wanting
to do an incremental build on top of a build that used an old GN
binary.

Review-Url: https://codereview.chromium.org/2861903002 .
2017-05-03 15:56:21 -07:00
Zachary Anderson 6bf2c800fd Reland: [infra] Roll clang to match the version used by Flutter
Flutter uses the same clang toolchain as Fuchsia. This CL puts Dart
on that toolchain, as well. This roll should entail no changes to
glibc version requirements on Linux.

The Fuchsia buildtools distribute clang-format with the toolchain
rather than separately, so this CL introduces forwarding scripts
that are copied to the right place under //buildtools.

This CL sets the default for the number of workers in //tools/gn.py
to 1, as the newer GN version fails occasionally when run
concurrently with other invocations.

As Flutter does, this CL uses the clang toolchain to build for
Android. Thus, it is now possible to build for Android on MacOS.

This change is a prerequisite for assembling the SDK in GN
rather than with a python script:

https://codereview.chromium.org/2848943003/

and will be nicer for making prebuilt SDKs for Fuchsia.

Review-Url: https://codereview.chromium.org/2855283002 .
2017-05-03 15:42:46 -07:00
Zachary Anderson c94667420a [infra] Prepare gn.py for update to GN binary
First part in attempt to reland https://codereview.chromium.org/2854583002/
in two parts. If the second part fails, this part does not need to be
reverted.

Review-Url: https://codereview.chromium.org/2859833003 .
2017-05-03 15:23:40 -07:00
Zachary Anderson 958c25c1db Revert "[infra] Roll clang to match the version used by Flutter"
This reverts commit cc968ca45b.

This CL will have to be relanded in two pieces so that the
update to tools/gn.py lands before the unmodified version
can invoke the updated GN binary.

Review-Url: https://codereview.chromium.org/2855973006 .
2017-05-03 15:16:21 -07:00
Zachary Anderson cc968ca45b [infra] Roll clang to match the version used by Flutter
Flutter uses the same clang toolchain as Fuchsia. This CL puts Dart
on that toolchain, as well. This roll should entail no changes to
glibc version requirements on Linux.

The Fuchsia buildtools distribute clang-format with the toolchain
rather than separately, so this CL introduces forwarding scripts
that are copied to the right place under //buildtools.

This CL sets the default for the number of workers in //tools/gn.py
to 1, as the newer GN version fails occasionally when run
concurrently with other invocations.

As Flutter does, this CL uses the clang toolchain to build for
Android. Thus, it is now possible to build for Android on MacOS.

This change is a prerequisite for assembling the SDK in GN
rather than with a python script:

https://codereview.chromium.org/2848943003/

and will be nicer for making prebuilt SDKs for Fuchsia.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2854583002 .
2017-05-03 14:50:59 -07:00
Stephen Adams ea2c9cba39 dart2js_html: Fix for issue 29538 - some returned lists may be null
Annotate querySelectorAll as not-null to recover code quality.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2857143003 .
2017-05-03 14:26:38 -07:00
Vyacheslav Egorov 7b2e162775 Gardening: update path to capture_screenshot.ps1 script
R=kustermann@google.com
BUG=

Review-Url: https://codereview.chromium.org/2857923002 .
2017-05-03 16:04:20 +02:00