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

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

Issue 10824095: Get basic Windows stuff working. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 months 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
« utils/pub/io.dart ('K') | « utils/tests/pub/pub.status ('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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 String pathInSandbox(path) => join(getFullPath(sandboxDir), path); 247 String pathInSandbox(path) => join(getFullPath(sandboxDir), path);
248 248
249 return ensureDir(pathInSandbox(appPath)).chain((_) { 249 return ensureDir(pathInSandbox(appPath)).chain((_) {
250 // Find a dart executable we can use to run pub. Uses the one that the 250 // Find a dart executable we can use to run pub. Uses the one that the
251 // test infrastructure uses. We are not using new Options.executable here 251 // test infrastructure uses. We are not using new Options.executable here
252 // because that gets confused if you invoked Dart through a shell script. 252 // because that gets confused if you invoked Dart through a shell script.
253 var scriptDir = new File(new Options().script).directorySync().path; 253 var scriptDir = new File(new Options().script).directorySync().path;
254 var platform = Platform.operatingSystem; 254 var platform = Platform.operatingSystem;
255 var dartBin = join(scriptDir, '../../../tools/testing/bin/$platform/dart') ; 255 var dartBin = join(scriptDir, '../../../tools/testing/bin/$platform/dart') ;
256 256
257 if (platform == 'windows') dartBin = '$dartBin.exe';
nweiz 2012/07/30 23:03:39 Are you sure this will work on the buildbots?
Bob Nystrom 2012/07/30 23:42:33 This is just adding ".exe" to the end. It should w
258
257 // Find the main pub entrypoint. 259 // Find the main pub entrypoint.
258 var pubPath = fs.joinPaths(scriptDir, '../../pub/pub.dart'); 260 var pubPath = fs.joinPaths(scriptDir, '../../pub/pub.dart');
259 261
260 var dartArgs = 262 var dartArgs =
261 ['--enable-type-checks', '--enable-asserts', pubPath, '--trace']; 263 ['--enable-type-checks', '--enable-asserts', pubPath, '--trace'];
262 dartArgs.addAll(args); 264 dartArgs.addAll(args);
263 265
264 var environment = new Map.from(Platform.environment); 266 var environment = new Map.from(Platform.environment);
265 environment['PUB_CACHE'] = pathInSandbox(cachePath); 267 environment['PUB_CACHE'] = pathInSandbox(cachePath);
266 environment['DART_SDK'] = pathInSandbox(sdkPath); 268 environment['DART_SDK'] = pathInSandbox(sdkPath);
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 } 808 }
807 809
808 /** 810 /**
809 * Schedules a callback to be called after Pub is run with [runPub], even if it 811 * Schedules a callback to be called after Pub is run with [runPub], even if it
810 * fails. 812 * fails.
811 */ 813 */
812 void _scheduleCleanup(_ScheduledEvent event) { 814 void _scheduleCleanup(_ScheduledEvent event) {
813 if (_scheduledCleanup == null) _scheduledCleanup = []; 815 if (_scheduledCleanup == null) _scheduledCleanup = [];
814 _scheduledCleanup.add(event); 816 _scheduledCleanup.add(event);
815 } 817 }
OLDNEW
« utils/pub/io.dart ('K') | « utils/tests/pub/pub.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698