DescriptionAdd 'self_check' runtime for running self-checking unit tests
Some of the kernel unit tests can now be run using:
tools/test.py -cdartk -rself_check language co19
This will search the pkg/ folder for files matching *_self_check.dart
and run each program with the compiled output as argument. If there is
no compiler, the test case itself is given as argument. These testers
are always run in batch-mode.
This type of test has no expected output, but is intended to check
itself by testing that certain invariants are not violated while
processing the given data set.
The 'self_check' runtime is not specifically tied to kernel,
although only kernel is using it at the moment.
There is also a new option --skip-compilation which skips the
compiler step. It doesn't interact nicely with the status files,
but can still be useful for a quick offline test.
Current limitations:
- All self-check tests are treated as the same test case. If one fails,
the remaining self-check testers don't run for that input.
- There is no way to run a subset of the self-check tests, or filter
them based on what compiler was used.
- Tests that are expected to fail in the compiler show up as
errors when skipping compilation.
BUG=
R=kustermann@google.com, whesse@google.com
Committed: https://github.com/dart-lang/sdk/commit/2e718613aa61b781d78533049df993fefd307b9d
Patch Set 1 #Patch Set 2 : Support testing in checked mode #Patch Set 3 : Rename bulk => self_check #
Total comments: 12
Patch Set 4 : Make runTest return a future, and fix == and hashCode #
Total comments: 8
Patch Set 5 : Address comments #Messages
Total messages: 16 (7 generated)
|