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

Issue 10264005: Suppress get_drt/dartium download if an executable is provided via flag (Closed)

Created:
8 years, 7 months ago by vsm
Modified:
8 years, 7 months ago
CC:
reviews_dartlang.org, antonm
Visibility:
Public.

Description

Suppress get_drt/dartium download if an executable is provided via flag Note, the Dartium win bot was hanging (I believe timing out) at this point running the webdriver test even though it was providing its own binary. I had commented out the webdriver test - this CL should enable it to work again. Committed: https://code.google.com/p/dart/source/detail?r=7194

Patch Set 1 #

Total comments: 3

Patch Set 2 : Cleaned up code for clarity #

Patch Set 3 : Added comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -5 lines) Patch
M tools/testing/dart/drt_updater.dart View 1 2 1 chunk +6 lines, -3 lines 0 comments Download
M tools/testing/dart/test_options.dart View 1 chunk +1 line, -1 line 0 comments Download
M tools/testing/dart/test_suite.dart View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
vsm
8 years, 7 months ago (2012-04-30 04:16:22 UTC) #1
Bill Hesse
https://chromiumcodereview.appspot.com/10264005/diff/1/tools/testing/dart/drt_updater.dart File tools/testing/dart/drt_updater.dart (right): https://chromiumcodereview.appspot.com/10264005/diff/1/tools/testing/dart/drt_updater.dart#newcode58 tools/testing/dart/drt_updater.dart:58: if (!configuration.containsKey(runtime) || configuration[runtime] != '') { This seems ...
8 years, 7 months ago (2012-04-30 13:46:10 UTC) #2
vsm
https://chromiumcodereview.appspot.com/10264005/diff/1/tools/testing/dart/drt_updater.dart File tools/testing/dart/drt_updater.dart (right): https://chromiumcodereview.appspot.com/10264005/diff/1/tools/testing/dart/drt_updater.dart#newcode58 tools/testing/dart/drt_updater.dart:58: if (!configuration.containsKey(runtime) || configuration[runtime] != '') { I'm checking ...
8 years, 7 months ago (2012-04-30 14:00:33 UTC) #3
vsm
PTAL. Cleaned up the code to reduce confusion.
8 years, 7 months ago (2012-04-30 16:15:06 UTC) #4
Bill Hesse
8 years, 7 months ago (2012-05-01 08:03:33 UTC) #5
LGTM - I forgot to send you my earlier comment, but you read my mind and did
exactly what I suggested.

https://chromiumcodereview.appspot.com/10264005/diff/1/tools/testing/dart/drt...
File tools/testing/dart/drt_updater.dart (right):

https://chromiumcodereview.appspot.com/10264005/diff/1/tools/testing/dart/drt...
tools/testing/dart/drt_updater.dart:58: if (!configuration.containsKey(runtime)
|| configuration[runtime] != '') {
Oh, I see.  That is really tricky, and easy to overlook.

I would either put a comment in,  pointing out that it is not
configuration['runtime'], but configuration[runtime], or I would just add 
&& configuration['drt'] == ''
to the runtime == 'drt' clause, and similarly for the dartium case.  

Also, is the last 
else {
  return null;
}
in line 75 now dead code?


On 2012/04/30 14:00:33, vsm wrote:
> I'm checking what you suggest.  It's runtime the variable ('drt' or
'dartium'),
> not 'runtime' the string.
> 
> Isn't the default to configuration['drt'] the empty string and not null?
> 
> On 2012/04/30 13:46:10, Bill Hesse wrote:
> > This seems totally wrong.  I think configuration['runtime'] always exists,
and
> > it is never the empty string.  I don't see any place where it is changed. 
> > Shouldn't you be checking
> > configuration['drt'] instead?
> > 
> > I would think the condition would be just 
> > if (runtime == 'drt' && configuration['drt'] == null) {
> > (return updater) }
> > All valid keys should always be in the configuration, with their default
> values
> > - every key has a default.
>

Powered by Google App Engine
This is Rietveld 408576698