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

Issue 9863057: Add DirectoryTestSuite. (Closed)

Created:
8 years, 9 months ago by Bob Nystrom
Modified:
8 years, 8 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add DirectoryTestSuite. Committed: https://code.google.com/p/dart/source/detail?r=6010

Patch Set 1 #

Patch Set 2 : Oops. Add changes. #

Total comments: 13

Patch Set 3 : Respond to review. #

Patch Set 4 : Fix path to unittest. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -21 lines) Patch
M tools/test.dart View 1 2 4 chunks +20 lines, -1 line 0 comments Download
M tools/testing/dart/test_options.dart View 1 2 3 7 chunks +18 lines, -18 lines 0 comments Download
M tools/testing/dart/test_suite.dart View 1 2 3 3 chunks +53 lines, -2 lines 0 comments Download
A utils/tests/pub/pub.status View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
A utils/tests/pub/pub_tests.dart View 1 2 3 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Bob Nystrom
This patch is a request for comments. I want to make it easier to add ...
8 years, 9 months ago (2012-03-28 23:00:35 UTC) #1
Emily Fortuna
lgtm with comments. I'm totally down for moving to this different format for specifying tests. ...
8 years, 9 months ago (2012-03-28 23:10:10 UTC) #2
Emily Fortuna
https://chromiumcodereview.appspot.com/9863057/diff/1001/utils/tests/pub/pub.status File utils/tests/pub/pub.status (right): https://chromiumcodereview.appspot.com/9863057/diff/1001/utils/tests/pub/pub.status#newcode5 utils/tests/pub/pub.status:5: [ $runtime == drt || $runtime == ie || ...
8 years, 9 months ago (2012-03-28 23:18:13 UTC) #3
Siggi Cherem (dart-lang)
On 2012/03/28 23:10:10, Emily Fortuna wrote: > lgtm with comments. I'm totally down for moving ...
8 years, 9 months ago (2012-03-28 23:20:34 UTC) #4
Bill Hesse
https://chromiumcodereview.appspot.com/9863057/diff/1001/tools/test.dart File tools/test.dart (right): https://chromiumcodereview.appspot.com/9863057/diff/1001/tools/test.dart#newcode161 tools/test.dart:161: queue.addTestSuite(new DirectoryTestSuite(conf, testSuiteDir)); I would rather call this StandardTestSuite, ...
8 years, 9 months ago (2012-03-28 23:37:30 UTC) #5
Bob Nystrom
8 years, 9 months ago (2012-03-29 00:10:16 UTC) #6
Thanks!

https://chromiumcodereview.appspot.com/9863057/diff/1001/tools/test.dart
File tools/test.dart (right):

https://chromiumcodereview.appspot.com/9863057/diff/1001/tools/test.dart#newc...
tools/test.dart:161: queue.addTestSuite(new DirectoryTestSuite(conf,
testSuiteDir));
On 2012/03/28 23:37:30, Bill Hesse wrote:
> I would rather call this StandardTestSuite, and either move StandardTestSuite
to
> TestSuiteBaseImpl, or just add a new constructor to StandardTestSuite (like
> new StandardTestSuite.fromDirectory(conf, testSuiteDir).

Great idea. Done.

https://chromiumcodereview.appspot.com/9863057/diff/1001/tools/testing/dart/t...
File tools/testing/dart/test_suite.dart (right):

https://chromiumcodereview.appspot.com/9863057/diff/1001/tools/testing/dart/t...
tools/testing/dart/test_suite.dart:956: class DirectoryTestSuite extends
StandardTestSuite {
On 2012/03/28 23:37:30, Bill Hesse wrote:
> I really think we can merge the classes:
> Make isTestFile call a closure passed to the constructor.
> Default closure for StandardTestSuite is (name)=>name.endsWith("Test.dart");
> 
> Then all of DirectoryTestSuite can just be a new constructor for
> StandardTestSuite.
> 
> This may also allow other subclasses, which only override isTestFile, to be
> removed, and to be replaced with instances of StandardTestSuite.

Excellent idea. Done!

https://chromiumcodereview.appspot.com/9863057/diff/1001/tools/testing/dart/t...
tools/testing/dart/test_suite.dart:959: print(name);
On 2012/03/28 23:37:30, Bill Hesse wrote:
> Remove the print statement.

Done.

https://chromiumcodereview.appspot.com/9863057/diff/1001/utils/tests/pub/pub....
File utils/tests/pub/pub.status (right):

https://chromiumcodereview.appspot.com/9863057/diff/1001/utils/tests/pub/pub....
utils/tests/pub/pub.status:5: [ $runtime == drt || $runtime == ie || $runtime ==
chrome || $runtime == safari || $runtime == ff || $runtime == opera ]
On 2012/03/28 23:18:13, Emily Fortuna wrote:
> On 2012/03/28 23:10:11, Emily Fortuna wrote:
> > also $runtime == d8 (we also want to skip)
> 
> Here's a more concise way of saying (effectively) the same thing:
> [$compiler == frog || $compiler == dart2js || $compiler == dartc || $compiler
==
> frogsh ]
> *: Skip

Done.

https://chromiumcodereview.appspot.com/9863057/diff/1001/utils/tests/pub/pub....
utils/tests/pub/pub.status:5: [ $runtime == drt || $runtime == ie || $runtime ==
chrome || $runtime == safari || $runtime == ff || $runtime == opera ]
On 2012/03/28 23:37:30, Bill Hesse wrote:
> Is this an indication that we really need to add negation to the status
> expression logic?  I left it out, because I thought that this case would not
> happen.
> 
> 
> On 2012/03/28 23:18:13, Emily Fortuna wrote:
> > On 2012/03/28 23:10:11, Emily Fortuna wrote:
> > > also $runtime == d8 (we also want to skip)
> > 
> > Here's a more concise way of saying (effectively) the same thing:
> > [$compiler == frog || $compiler == dart2js || $compiler == dartc ||
$compiler
> ==
> > frogsh ]
> > *: Skip
> 

I thought about just adding "!=" support to test.dart for this, but I figured I
was making enough changes in this patch as it is. I can do that in another patch
if you'd like.

https://chromiumcodereview.appspot.com/9863057/diff/1001/utils/tests/pub/pub_...
File utils/tests/pub/pub_tests.dart (right):

https://chromiumcodereview.appspot.com/9863057/diff/1001/utils/tests/pub/pub_...
utils/tests/pub/pub_tests.dart:7: //#import('../../../pub/pub.dart');
On 2012/03/28 23:10:11, Emily Fortuna wrote:
> why is this line here but commented out?

Pub doesn't exist yet! This is a work-in-progress. It's basically a shell so
that I can use it to validate that the test.dart changes work. Removed it.

Powered by Google App Engine
This is Rietveld 408576698