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

Side by Side Diff: tools/full-coverage.dart

Issue 1529063006: - Implement Platform.packageRoot and Platform.packageConfig based (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "dart:async"; 5 import "dart:async";
6 import "dart:convert"; 6 import "dart:convert";
7 import "dart:io"; 7 import "dart:io";
8 import "dart:isolate"; 8 import "dart:isolate";
9 9
10 import "package:args/args.dart"; 10 import "package:args/args.dart";
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 } else { 455 } else {
456 env.sdkRoot = join(absolute(normalize(env.sdkRoot)), "lib"); 456 env.sdkRoot = join(absolute(normalize(env.sdkRoot)), "lib");
457 } 457 }
458 if ((env.sdkRoot != null) && !FileSystemEntity.isDirectorySync(env.sdkRoot)) { 458 if ((env.sdkRoot != null) && !FileSystemEntity.isDirectorySync(env.sdkRoot)) {
459 fail("Provided SDK root '${args["sdk-root"]}' is not a valid SDK " 459 fail("Provided SDK root '${args["sdk-root"]}' is not a valid SDK "
460 "top-level directory"); 460 "top-level directory");
461 } 461 }
462 462
463 env.pkgRoot = args["package-root"]; 463 env.pkgRoot = args["package-root"];
464 if (env.pkgRoot != null) { 464 if (env.pkgRoot != null) {
465 env.pkgRoot = absolute(normalize(args["package-root"])); 465 var pkgRootUri = Uri.parse(env.pkgRoot);
466 if (!FileSystemEntity.isDirectorySync(env.pkgRoot)) { 466 if (pkgRootUri.scheme == "file") {
467 fail("Provided package root '${args["package-root"]}' is not directory."); 467 if (!FileSystemEntity.isDirectorySync(pkgRootUri.toFilePath())) {
468 fail("Provided package root '${args["package-root"]}' is not directory." );
469 }
468 } 470 }
469 } else { 471 } else {
470 env.pkgRoot = Platform.packageRoot; 472 env.pkgRoot = Platform.packageRoot;
471 } 473 }
472 474
473 if (args["in"] == null) { 475 if (args["in"] == null) {
474 fail("No input files given."); 476 fail("No input files given.");
475 } else { 477 } else {
476 env.input = absolute(normalize(args["in"])); 478 env.input = absolute(normalize(args["in"]));
477 if (!FileSystemEntity.isDirectorySync(env.input) && 479 if (!FileSystemEntity.isDirectorySync(env.input) &&
(...skipping 18 matching lines...) Expand all
496 } 498 }
497 499
498 try { 500 try {
499 env.workers = int.parse("${args["workers"]}"); 501 env.workers = int.parse("${args["workers"]}");
500 } catch (e) { 502 } catch (e) {
501 fail("Invalid worker count: $e"); 503 fail("Invalid worker count: $e");
502 } 504 }
503 505
504 env.verbose = args["verbose"]; 506 env.verbose = args["verbose"];
505 } 507 }
OLDNEW
« runtime/bin/builtin.dart ('K') | « tests/standalone/io/platform_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698