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

Side by Side Diff: utils/tests/pub/test_pub.dart

Issue 11472016: Revert "Add logging system to pub and sprinkle some logging in." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « utils/tests/pub/pub_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * Test infrastructure for testing pub. Unlike typical unit tests, most pub 6 * Test infrastructure for testing pub. Unlike typical unit tests, most pub
7 * tests are integration tests that stage some stuff on the file system, run 7 * tests are integration tests that stage some stuff on the file system, run
8 * pub, and then validate the results. This library provides an API to build 8 * pub, and then validate the results. This library provides an API to build
9 * tests like that. 9 * tests like that.
10 */ 10 */
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 631
632 // If the executable looks like a path, get its full path. That way we 632 // If the executable looks like a path, get its full path. That way we
633 // can still find it when we spawn it with a different working directory. 633 // can still find it when we spawn it with a different working directory.
634 if (dartBin.contains(Platform.pathSeparator)) { 634 if (dartBin.contains(Platform.pathSeparator)) {
635 dartBin = new File(dartBin).fullPathSync(); 635 dartBin = new File(dartBin).fullPathSync();
636 } 636 }
637 637
638 // Find the main pub entrypoint. 638 // Find the main pub entrypoint.
639 var pubPath = fs.joinPaths(testDirectory, '../../pub/pub.dart'); 639 var pubPath = fs.joinPaths(testDirectory, '../../pub/pub.dart');
640 640
641 var dartArgs = ['--checked', pubPath, '--trace']; 641 var dartArgs =
642 ['--enable-type-checks', '--enable-asserts', pubPath, '--trace'];
642 dartArgs.addAll(args); 643 dartArgs.addAll(args);
643 644
644 var environment = { 645 var environment = {
645 'PUB_CACHE': pathInSandbox(cachePath), 646 'PUB_CACHE': pathInSandbox(cachePath),
646 'DART_SDK': pathInSandbox(sdkPath) 647 'DART_SDK': pathInSandbox(sdkPath)
647 }; 648 };
648
649 if (tokenEndpoint != null) { 649 if (tokenEndpoint != null) {
650 environment['_PUB_TEST_TOKEN_ENDPOINT'] = tokenEndpoint.toString(); 650 environment['_PUB_TEST_TOKEN_ENDPOINT'] = tokenEndpoint.toString();
651 } 651 }
652 652
653 return fn(dartBin, dartArgs, workingDir: pathInSandbox(appPath), 653 return fn(dartBin, dartArgs, workingDir: pathInSandbox(appPath),
654 environment: environment); 654 environment: environment);
655 }); 655 });
656 } 656 }
657 657
658 /** 658 /**
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 /// calling [completion] is unnecessary. 1630 /// calling [completion] is unnecessary.
1631 void expectLater(Future actual, matcher, {String reason, 1631 void expectLater(Future actual, matcher, {String reason,
1632 FailureHandler failureHandler, bool verbose: false}) { 1632 FailureHandler failureHandler, bool verbose: false}) {
1633 _schedule((_) { 1633 _schedule((_) {
1634 return actual.transform((value) { 1634 return actual.transform((value) {
1635 expect(value, matcher, reason: reason, failureHandler: failureHandler, 1635 expect(value, matcher, reason: reason, failureHandler: failureHandler,
1636 verbose: false); 1636 verbose: false);
1637 }); 1637 });
1638 }); 1638 });
1639 } 1639 }
OLDNEW
« no previous file with comments | « utils/tests/pub/pub_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698