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

Issue 2901923003: Replace the configuration map with a typed object. (Closed)

Created:
3 years, 7 months ago by Bob Nystrom
Modified:
3 years, 6 months ago
Reviewers:
Bill Hesse
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Replace the configuration map with a typed object. This is a pretty massive change but my hope is it will make test.dart easier to maintain going forward. Instead of passing around a stringly-typed Map<String, dynamic> all throughout the program, we parse the options and then create a Configuration object that has typed getters for all of the various bits of configuration data. This is a little tedious because it means declaring a new option requires also declaring a corresponding field in the Configuration class and passing it through the constructor. I think it's worth it. Also, enum-like configuration properties like architecture and runtime now have their own classes as well. Moved a bunch of stuff from TestUtil into those classes now that there is an object to hang those methods off of. In the process, I found a few typos in string literals where the code wasn't correctly looking up a configuration property. Added more sanity checking and validation to status file parsing. You will get an error at parse time if you try to refer to a variable that isn't in the whitelist of known variables. Also, you'll get an error if you try to compare a variable to a value that it isn't expected to have. Many other small-scale cleanups. Aside from the status file validation, this should behave mostly the same as current test.dart except that tests may be enqueued in a slightly different order. The rewritten code for expanding configurations iterates through the architecture, runtime, etc. options in a slightly different order. R=whesse@google.com Committed: https://github.com/dart-lang/sdk/commit/06f75fe5cd99aa5f85d2afaacd6dddc95e1570d9

Patch Set 1 #

Total comments: 24

Patch Set 2 : Rebase against master. #

Patch Set 3 : Revise. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1930 lines, -1466 lines) Patch
M tests/lib/lib.status View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/standalone.status View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M tests/standalone/status_expression_test.dart View 1 2 4 chunks +18 lines, -10 lines 0 comments Download
M tools/testing/dart/browser_controller.dart View 1 2 16 chunks +62 lines, -70 lines 0 comments Download
M tools/testing/dart/co19_test.dart View 2 chunks +6 lines, -7 lines 0 comments Download
M tools/testing/dart/co19_test_config.dart View 1 chunk +2 lines, -3 lines 0 comments Download
M tools/testing/dart/compiler_configuration.dart View 1 2 13 chunks +99 lines, -119 lines 0 comments Download
A tools/testing/dart/configuration.dart View 1 2 1 chunk +741 lines, -0 lines 0 comments Download
M tools/testing/dart/drt_updater.dart View 2 chunks +8 lines, -9 lines 0 comments Download
A tools/testing/dart/environment.dart View 1 2 1 chunk +105 lines, -0 lines 0 comments Download
M tools/testing/dart/expectation_set.dart View 2 chunks +5 lines, -2 lines 0 comments Download
M tools/testing/dart/http_server.dart View 4 chunks +8 lines, -9 lines 0 comments Download
M tools/testing/dart/launch_browser.dart View 2 chunks +6 lines, -4 lines 0 comments Download
M tools/testing/dart/main.dart View 1 chunk +1 line, -1 line 0 comments Download
M tools/testing/dart/options.dart View 1 2 16 chunks +214 lines, -348 lines 0 comments Download
M tools/testing/dart/package_testing_support.dart View 1 chunk +2 lines, -3 lines 0 comments Download
M tools/testing/dart/runtime_configuration.dart View 1 2 4 chunks +69 lines, -67 lines 0 comments Download
M tools/testing/dart/status_expression.dart View 6 chunks +30 lines, -6 lines 0 comments Download
M tools/testing/dart/status_file.dart View 6 chunks +52 lines, -16 lines 0 comments Download
M tools/testing/dart/status_reporter.dart View 5 chunks +79 lines, -90 lines 0 comments Download
M tools/testing/dart/test_configurations.dart View 1 2 11 chunks +85 lines, -119 lines 0 comments Download
M tools/testing/dart/test_progress.dart View 7 chunks +40 lines, -49 lines 0 comments Download
M tools/testing/dart/test_runner.dart View 21 chunks +57 lines, -71 lines 0 comments Download
M tools/testing/dart/test_suite.dart View 1 53 chunks +235 lines, -400 lines 0 comments Download
M tools/testing/dart/utils.dart View 2 chunks +0 lines, -56 lines 0 comments Download
M tools/testing/dart/vm_test_config.dart View 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Bob Nystrom
I know this patch is a monster. I'm sorry. :( This is the last big ...
3 years, 7 months ago (2017-05-24 01:14:58 UTC) #2
Bill Hesse
LGTM. I think record_to_file and replay_from_file are now unused, but they can be removed in ...
3 years, 6 months ago (2017-05-29 13:08:28 UTC) #3
Bob Nystrom
Thanks for the review! It's a little late in the afternoon to land a CL ...
3 years, 6 months ago (2017-05-30 23:29:31 UTC) #4
Bob Nystrom
3 years, 6 months ago (2017-05-31 21:47:36 UTC) #6
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
06f75fe5cd99aa5f85d2afaacd6dddc95e1570d9 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698