commit | 8a6b48f5968bd982b941105f400c47cd8ab30607 | [log] [tgz] |
---|---|---|
author | Jens Johansen <jensj@google.com> | Wed Feb 21 12:40:01 2024 +0000 |
committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Feb 21 12:40:01 2024 +0000 |
tree | 90774837c641849a13ebe2cd5bf648c1c2faafa0 | |
parent | 123e680534912a7af6bffdbd158aead4b8d11ca7 [diff] |
[CFE] First pass at coverage tool * Added tests for compiling the platform with coverage information * Patched all CFE suites to be able to capture coverage information (e.g. via `out/ReleaseX64/dart pkg/front_end/test/fasta/strong_suite.dart \ --coverage=coverage/` and then merging and showing via `out/ReleaseX64/dart pkg/front_end/tool/coverage_merger.dart \ --coverage=coverage/`) * Added "meta test" that runs all of the cfe et al tests and captures coverage information at the end. * Patched the bulk compiler to be able to capture coverage information (likely only works in non-Windows as it has to hook into signaling to be able to capture data as the process is being killed by the test.py script). * Tool for combining the dumped coverage information. * Meta test that executes everything and combines the result (run via e.g. `out/ReleaseX64/dart-sdk/bin/dart \ pkg/front_end/test/run_all_coverage.dart`) Initially I wanted to (for language tests) have per-test coverage, changed the test.py scripts to run the tests through a special tool that then captured coverage information for the kernel_service isolate which worked well for tests that compiles without error, but doesn't work when there are compile time errors (because dart terminates before coverage can be captured). So the solution - at least for now - was to hook into the batch compilation. The "visualization" of the result currently isn't very good -- mostly just a list of not covered positions -- but the hope is that everything that should be covered (eventually) will be covered, so maybe it's not a big deal. Also still to do is being able to - probably via comments in the covered code - say "this isn't expected to be covered", so we can work towards expecting all (or certain) files to be 100% covered (modulo those comments), e.g. when running the thing on the weekly bot. Change-Id: I6f885f4a9c04fb52a65797a9de790e1e5eacecf1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353103 Commit-Queue: Jens Johansen <jensj@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
Dart is:
Approachable: Develop with a strongly typed programming language that is consistent, concise, and offers modern language features like null safety and patterns.
Portable: Compile to ARM, x64, or RISC-V machine code for mobile, desktop, and backend. Compile to JavaScript or WebAssembly for the web.
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app. Diagnose app issues using DevTools.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.