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

Issue 8715006: tools/test.dart: Add multitest support to Dart implementation of test runner. (Closed)

Created:
9 years ago by Bill Hesse
Modified:
9 years ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

tools/test.dart: Add multitest support to Dart implementation of test runner. BUG= TEST=tools/test.dart Committed: https://code.google.com/p/dart/source/detail?r=1919

Patch Set 1 #

Total comments: 30

Patch Set 2 : All comments addressed. Tests run with 0 failures. #

Total comments: 18

Patch Set 3 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+237 lines, -24 lines) Patch
A tools/testing/dart/multitest.dart View 1 2 1 chunk +180 lines, -0 lines 0 comments Download
M tools/testing/dart/test_suite.dart View 1 2 5 chunks +57 lines, -24 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Bill Hesse
I welcome suggestions about the FileThen interface, or about Async( fooAsync ).thenHandler( handlerSetter); http://codereview.chromium.org/8715006/diff/1/tools/testing/dart/test_suite.dart File ...
9 years ago (2011-11-28 15:29:46 UTC) #1
Mads Ager (google)
http://codereview.chromium.org/8715006/diff/1/tools/testing/dart/multitest.dart File tools/testing/dart/multitest.dart (right): http://codereview.chromium.org/8715006/diff/1/tools/testing/dart/multitest.dart#newcode7 tools/testing/dart/multitest.dart:7: //#import("status_file_parser.dart"); Code in comments. Remove? http://codereview.chromium.org/8715006/diff/1/tools/testing/dart/multitest.dart#newcode31 tools/testing/dart/multitest.dart:31: if (lines.last() ...
9 years ago (2011-11-29 08:12:04 UTC) #2
Søren Gjesse
http://codereview.chromium.org/8715006/diff/1/tools/testing/dart/multitest.dart File tools/testing/dart/multitest.dart (right): http://codereview.chromium.org/8715006/diff/1/tools/testing/dart/multitest.dart#newcode7 tools/testing/dart/multitest.dart:7: //#import("status_file_parser.dart"); Remove these. http://codereview.chromium.org/8715006/diff/1/tools/testing/dart/multitest.dart#newcode10 tools/testing/dart/multitest.dart:10: A short comment here ...
9 years ago (2011-11-29 08:35:29 UTC) #3
Bill Hesse
http://codereview.chromium.org/8715006/diff/1/tools/testing/dart/multitest.dart File tools/testing/dart/multitest.dart (right): http://codereview.chromium.org/8715006/diff/1/tools/testing/dart/multitest.dart#newcode7 tools/testing/dart/multitest.dart:7: //#import("status_file_parser.dart"); On 2011/11/29 08:35:30, Søren Gjesse wrote: > Remove ...
9 years ago (2011-11-29 16:38:55 UTC) #4
Mads Ager (google)
LGTM We can submit this in the current form. However, we should address these comments ...
9 years ago (2011-11-30 09:11:23 UTC) #5
Bill Hesse
9 years ago (2011-11-30 10:01:39 UTC) #6
http://codereview.chromium.org/8715006/diff/6002/tools/testing/dart/multitest...
File tools/testing/dart/multitest.dart (right):

http://codereview.chromium.org/8715006/diff/6002/tools/testing/dart/multitest...
tools/testing/dart/multitest.dart:46: Map<String, String> tests,
On 2011/11/30 09:11:23, Mads Ager wrote:
> Identation.

Done.

http://codereview.chromium.org/8715006/diff/6002/tools/testing/dart/multitest...
tools/testing/dart/multitest.dart:85: Expect.equals('continued', rest);
I was under the impression that Expect always checks the condition, in both
production and checked mode. assert only applies in checked mode.  I don't see
anything in Expect's implementation that disables it, and we use it in all the
tests.


On 2011/11/30 09:11:23, Mads Ager wrote:
> Should we always throw an exception here? Users will probably mostly run the
> test scripts without using checked mode.

http://codereview.chromium.org/8715006/diff/6002/tools/testing/dart/multitest...
tools/testing/dart/multitest.dart:95: // TODO(whesse): Rewrite relative paths to
reflect temporary directory.
Only one multitest has an #import, and so only that one fails, in the "none"
default test, if we don't do this.  We can leave it out, but then there is no
place to put the comment.

On 2011/11/30 09:11:23, Mads Ager wrote:
> Why does this work if we don't do this? Where are the tests generated? We
should
> make sure that they are generated in the output directory so we can clean
> everything generated from the repository by deleting the output dir. 
> 
> We can do that in the next change.

http://codereview.chromium.org/8715006/diff/6002/tools/testing/dart/multitest...
tools/testing/dart/multitest.dart:128: Directory dir = new Directory("");
OK,  I didn't think of using the build directory.  Can we reliably find it?  Do
we really want to do this, and if we do, do we also want to delete the files and
directory automatically, and do we want to try to ensure that we do it if the
test is cancelled?  What if someone wants to debug using a generated multitest?

On 2011/11/30 09:11:23, Mads Ager wrote:
> Could you add a TODO here. We should make sure to point this at the build
output
> directory for test generation.

http://codereview.chromium.org/8715006/diff/6002/tools/testing/dart/test_suit...
File tools/testing/dart/test_suite.dart (right):

http://codereview.chromium.org/8715006/diff/6002/tools/testing/dart/test_suit...
tools/testing/dart/test_suite.dart:189: Function doTestBound(filename,
isNegative, isNegativeIfChecked) {
On 2011/11/30 09:11:23, Mads Ager wrote:
> We could use a named optional argument for isNegativeIfChecked. Alternatively,
> we could pass down enough information to determine if the test is negative in
> the multitest generation and avoid the extra parameter and logic here.

Done.

http://codereview.chromium.org/8715006/diff/6002/tools/testing/dart/test_suit...
tools/testing/dart/test_suite.dart:198: int middle = filename.lastIndexOf('_');
This only applies to multitests, because all other tests are in a src/
subdirectory.  If this assumption is not true, then yes, we should do something
different.  But otherwise, I've just added a comment that only multitests get to
the else clause.

On 2011/11/30 09:11:23, Mads Ager wrote:
> This will end up biting us because it is specific to the multi test case that
> you have just added. This will break matching for other simple test files that
> contain underscores. We need to find another way of mapping the multi tests to
> the expectations. At least we need to make sure that this only happens for the
> multi tests. Maybe a named optional argument that is the name used for test
> expectation matching. If nothing is supplied we use the filename otherwise we
> use the thing supplied?

Powered by Google App Engine
This is Rietveld 408576698