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

Issue 2891753003: Refactor and clean up the status file parsing code. - Make the parser less error tolerant. The expr… (Closed)

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

Description

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 Committed: https://github.com/dart-lang/sdk/commit/92267afc6643ed1aa9e7958cb4e4262525353aaf

Patch Set 1 #

Patch Set 2 : Update dart.test tests. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+913 lines, -975 lines) Patch
M tests/co19/co19-dart2js.status View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/language.status View 1 chunk +1 line, -1 line 0 comments Download
M tests/standalone/io/skipping_dart2js_compilations_test.dart View 1 1 chunk +0 lines, -1 line 0 comments Download
M tests/standalone/io/status_file_parser_test.dart View 1 2 chunks +18 lines, -20 lines 0 comments Download
M tests/standalone/io/test_runner_test.dart View 1 2 chunks +7 lines, -6 lines 0 comments Download
M tests/standalone/status_expression_test.dart View 1 1 chunk +77 lines, -193 lines 0 comments Download
A tools/testing/dart/expectation.dart View 1 chunk +211 lines, -0 lines 1 comment Download
A tools/testing/dart/expectation_set.dart View 1 chunk +118 lines, -0 lines 0 comments Download
M tools/testing/dart/runtime_configuration.dart View 1 chunk +1 line, -1 line 0 comments Download
M tools/testing/dart/status_expression.dart View 1 chunk +172 lines, -247 lines 0 comments Download
A tools/testing/dart/status_file.dart View 1 chunk +164 lines, -0 lines 0 comments Download
D tools/testing/dart/status_file_parser.dart View 1 chunk +0 lines, -368 lines 0 comments Download
M tools/testing/dart/summary_report.dart View 2 chunks +9 lines, -10 lines 0 comments Download
M tools/testing/dart/test_progress.dart View 4 chunks +4 lines, -4 lines 0 comments Download
M tools/testing/dart/test_runner.dart View 27 chunks +98 lines, -96 lines 0 comments Download
M tools/testing/dart/test_suite.dart View 12 chunks +32 lines, -27 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
Bob Nystrom
I guess there are actually some tests for test.dart, hiding under standalone/io. Who knew? Get ...
3 years, 7 months ago (2017-05-17 21:04:09 UTC) #2
Bob Nystrom
Siggy, everything in the first patch was reviewed by Bill in a previous review. The ...
3 years, 7 months ago (2017-05-18 17:10:23 UTC) #4
Siggi Cherem (dart-lang)
lgtm
3 years, 7 months ago (2017-05-18 17:19:25 UTC) #5
Bob Nystrom
Committed patchset #2 (id:20001) manually as 92267afc6643ed1aa9e7958cb4e4262525353aaf (presubmit successful).
3 years, 7 months ago (2017-05-18 19:42:57 UTC) #7
ahe
https://codereview.chromium.org/2891753003/diff/20001/tools/testing/dart/expectation.dart File tools/testing/dart/expectation.dart (right): https://codereview.chromium.org/2891753003/diff/20001/tools/testing/dart/expectation.dart#newcode148 tools/testing/dart/expectation.dart:148: new Expectation._('VerificationError'); Why do you need to parse these ...
3 years, 7 months ago (2017-05-23 13:34:57 UTC) #9
Bob Nystrom
On 2017/05/23 13:34:57, ahe wrote: > https://codereview.chromium.org/2891753003/diff/20001/tools/testing/dart/expectation.dart > File tools/testing/dart/expectation.dart (right): > > https://codereview.chromium.org/2891753003/diff/20001/tools/testing/dart/expectation.dart#newcode148 > ...
3 years, 7 months ago (2017-05-24 01:17:39 UTC) #10
ahe
On 2017/05/24 01:17:39, Bob Nystrom wrote: > On 2017/05/23 13:34:57, ahe wrote: > > > ...
3 years, 7 months ago (2017-05-24 09:35:14 UTC) #11
Bob Nystrom
On 2017/05/24 09:35:14, ahe wrote: > That makes sense. Perhaps you want to look at ...
3 years, 7 months ago (2017-05-24 23:41:14 UTC) #12
ahe
3 years, 6 months ago (2017-06-01 14:04:01 UTC) #13
Message was sent while issue was closed.
On 2017/05/24 23:41:14, Bob Nystrom wrote:
> On 2017/05/24 09:35:14, ahe wrote:
> > That makes sense. Perhaps you want to look at how I've made status markers
> > configurable in package:testing.
> 
> I have looked the docs for package:testing. It looks nice!
> 
> > My hope with package:testing is that we can move in a direction where our
test
> > runner can be configured externally instead of relying on everyone adding
> > extensions to tools/testing/dart/, including status markers.
> 
> I don't have a strong preference either way. I do like that configuring them
in
> code gives all of the benefits of static analysis. But, of course, hacking on
> test.dart is currently not very easy since the codebase hasn't been kept up to
> date. I'm hoping to make that somewhat better, since it is currently a piece
of
> infrastructure that we heavily rely on. If it ends up being replaced entirely
by
> package:testing, I wouldn't mind. But, until then, I figure it's worth keeping
> it well-maintained.

I share your preference for static analysis, so one of the first features I
added to package:testing was that it automatically runs the analyzer on all
plugins and tests you have specified in testing.json.

Powered by Google App Engine
This is Rietveld 408576698