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: utils/testrunner/client_server_task.dart

Issue 10966020: Added support for running an HTTP server during the test and being able to serve up static files. L… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « no previous file | utils/testrunner/configuration.dart » ('j') | utils/testrunner/dart2js_task.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1
Siggi Cherem (dart-lang) 2012/09/20 23:55:41 +copyright, + docs, + #library
gram 2012/09/21 00:25:46 Done the first two; this is #sourced into testrunn
Siggi Cherem (dart-lang) 2012/09/21 00:37:53 that will change soon, now that the new import syn
2 class RunClientServerTask extends RunProcessTask {
3 RunProcessTask serverTask;
4 Process serverProcess;
5
6 RunClientServerTask(String commandTemplate, List argumentTemplates,
7 int timeout) : super(commandTemplate, argumentTemplates, timeout) {
8 serverTask = new RunProcessTask(
9 config.dartPath,
10 ['$runnerDirectory${Platform.pathSeparator}'
11 'http_server_test_runner.dart',
12 '--port=${config.port}',
13 '--root=${config.staticRoot}'],
14 1000*timeout);
Siggi Cherem (dart-lang) 2012/09/20 23:55:41 spaces around *
gram 2012/09/21 00:25:46 Done.
15 }
16
17 execute(Path testfile, List stdout, List stderr,
18 bool logging, Function exitHandler) {
19 serverProcess = serverTask.execute(testfile, stdout, stderr, logging,
20 (e) { serverProcess = null; });
21 super.execute(testfile, stdout, stderr, logging, exitHandler);
22 }
23
24 void cleanup(Path testfile, List stdout, List stderr,
25 bool verboseLogging, bool keepTestFiles) {
26 if (serverProcess != null) {
27 serverProcess.kill();
28 }
29 }
30 }
OLDNEW
« no previous file with comments | « no previous file | utils/testrunner/configuration.dart » ('j') | utils/testrunner/dart2js_task.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698