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

Side by Side Diff: tools/testing/dart/http_server.dart

Issue 11884029: Upload new Dart binaries and re-enable unit tests for test scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Change Futures.wait to Future.wait in two test script files. Created 7 years, 11 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
« no previous file with comments | « tools/testing/dart/drt_updater.dart ('k') | tools/testing/dart/multitest.dart » ('j') | 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 library http_server; 5 library http_server;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:isolate'; 8 import 'dart:isolate';
9 import 'test_suite.dart'; // For TestUtils. 9 import 'test_suite.dart'; // For TestUtils.
10 import '../../../pkg/args/lib/args.dart'; 10 import '../../../pkg/args/lib/args.dart';
(...skipping 13 matching lines...) Expand all
24 defaultsTo: 'ia32'); 24 defaultsTo: 'ia32');
25 parser.addFlag('help', abbr: 'h', negatable: false, 25 parser.addFlag('help', abbr: 'h', negatable: false,
26 help: 'Print this usage information.'); 26 help: 'Print this usage information.');
27 var args = parser.parse(new Options().arguments); 27 var args = parser.parse(new Options().arguments);
28 if (args['help']) { 28 if (args['help']) {
29 print(parser.getUsage()); 29 print(parser.getUsage());
30 } else { 30 } else {
31 // Pretend we're running test.dart so that TestUtils doesn't get confused 31 // Pretend we're running test.dart so that TestUtils doesn't get confused
32 // about the "current directory." This is only used if we're trying to run 32 // about the "current directory." This is only used if we're trying to run
33 // this file independently for local testing. 33 // this file independently for local testing.
34 TestUtils.testScriptPath = new Path.fromNative( 34 TestUtils.testScriptPath = new Path(new Options().script)
35 new Options().script).directoryPath.join( 35 .directoryPath
36 new Path('../../test.dart')).canonicalize().toNativePath(); 36 .join(new Path('../../test.dart'))
37 .canonicalize()
38 .toNativePath();
37 TestingServerRunner.setPackageRootDir({'mode': args['mode'], 39 TestingServerRunner.setPackageRootDir({'mode': args['mode'],
38 'arch': args['arch'], 'system': Platform.operatingSystem, 40 'arch': args['arch'], 'system': Platform.operatingSystem,
39 'build_directory': ''}); 41 'build_directory': ''});
40 42
41 TestingServerRunner.startHttpServer('127.0.0.1', 43 TestingServerRunner.startHttpServer('127.0.0.1',
42 port: int.parse(args['port'])); 44 port: int.parse(args['port']));
43 print('Server listening on port ' 45 print('Server listening on port '
44 '${TestingServerRunner.serverList[0].port}.'); 46 '${TestingServerRunner.serverList[0].port}.');
45 TestingServerRunner.startHttpServer('127.0.0.1', 47 TestingServerRunner.startHttpServer('127.0.0.1',
46 allowedPort: TestingServerRunner.serverList[0].port, port: 48 allowedPort: TestingServerRunner.serverList[0].port, port:
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 }); 136 });
135 137
136 httpServer.listen(host, port); 138 httpServer.listen(host, port);
137 serverList.add(httpServer); 139 serverList.add(httpServer);
138 } 140 }
139 141
140 static terminateHttpServers() { 142 static terminateHttpServers() {
141 for (var server in serverList) server.close(); 143 for (var server in serverList) server.close();
142 } 144 }
143 } 145 }
OLDNEW
« no previous file with comments | « tools/testing/dart/drt_updater.dart ('k') | tools/testing/dart/multitest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698