Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Issue 2549793002: Add 'self_check' runtime for running self-checking unit tests (Closed)

Created:
4 years ago by asgerf
Modified:
4 years ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add '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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -203 lines) Patch
A + pkg/kernel/test/class_hierarchy_self_check.dart View 1 2 3 chunks +11 lines, -2 lines 0 comments Download
M pkg/kernel/test/class_hierarchy_test_disabled.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
D pkg/kernel/test/class_hierarchy_tester.dart View 1 chunk +0 lines, -150 lines 0 comments Download
D pkg/kernel/test/parent_pointer_test_disabled.dart View 1 chunk +0 lines, -10 lines 0 comments Download
A + pkg/kernel/test/round_trip_self_check.dart View 1 2 1 chunk +4 lines, -10 lines 0 comments Download
D pkg/kernel/test/round_trip_test_disabled.dart View 1 chunk +0 lines, -19 lines 0 comments Download
A pkg/kernel/test/self_check_util.dart View 1 2 3 1 chunk +34 lines, -0 lines 0 comments Download
A + pkg/kernel/test/verify_self_check.dart View 1 2 1 chunk +7 lines, -3 lines 0 comments Download
M tools/testing/dart/runtime_configuration.dart View 1 2 3 4 4 chunks +48 lines, -1 line 0 comments Download
M tools/testing/dart/test_options.dart View 1 2 3 4 4 chunks +18 lines, -1 line 0 comments Download
M tools/testing/dart/test_runner.dart View 1 2 3 4 7 chunks +50 lines, -3 lines 0 comments Download
M tools/testing/dart/test_suite.dart View 5 chunks +8 lines, -3 lines 0 comments Download

Messages

Total messages: 16 (7 generated)
asgerf
4 years ago (2016-12-02 15:55:16 UTC) #6
Kevin Millikin (Google)
I like it, but I wish for a more suggestive name. I can't think of ...
4 years ago (2016-12-05 12:17:49 UTC) #7
asgerf
Renamed bulk to self_check. Runtime argument: -rbulk => -rself_check File pattern: *_bulk_tester.dart => *_self_check.dart
4 years ago (2016-12-05 14:04:32 UTC) #9
kustermann
The main concern is about the changes to the (very complex and convoluted) test_suite.dart file. ...
4 years ago (2016-12-06 10:39:05 UTC) #10
asgerf
I've spent over a week on getting our infrastructure to just run tests that are ...
4 years ago (2016-12-06 13:42:09 UTC) #11
Bill Hesse
LGTM. https://codereview.chromium.org/2549793002/diff/80001/tools/testing/dart/runtime_configuration.dart File tools/testing/dart/runtime_configuration.dart (right): https://codereview.chromium.org/2549793002/diff/80001/tools/testing/dart/runtime_configuration.dart#newcode20 tools/testing/dart/runtime_configuration.dart:20: // test_options.dart. We probably want to store an ...
4 years ago (2016-12-06 14:46:03 UTC) #12
asgerf
https://codereview.chromium.org/2549793002/diff/80001/tools/testing/dart/runtime_configuration.dart File tools/testing/dart/runtime_configuration.dart (right): https://codereview.chromium.org/2549793002/diff/80001/tools/testing/dart/runtime_configuration.dart#newcode20 tools/testing/dart/runtime_configuration.dart:20: // test_options.dart. We probably want to store an instance ...
4 years ago (2016-12-06 15:41:49 UTC) #13
kustermann
@asger: Are you waiting for another lgtm? I think you should just land it.
4 years ago (2016-12-09 12:22:52 UTC) #14
asgerf
4 years ago (2016-12-15 12:07:12 UTC) #16
Message was sent while issue was closed.
Committed patchset #5 (id:100001) manually as
2e718613aa61b781d78533049df993fefd307b9d (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698