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

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

Issue 2981223002: Remove Dartium support from test.dart. (Closed)
Patch Set: Remove "dartium" from status files. Created 3 years, 5 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
« no previous file with comments | « tools/testing/dart/runtime_configuration.dart ('k') | tools/testing/dart/status_reporter.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
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.
4
5 import 'dart:async';
6 import 'dart:io';
7
8 import 'utils.dart';
9
10 Future _contentShellFuture;
11
12 /// Runs "tools/get_archive.py" to download and install Content Shell.
13 Future updateContentShell(String drtPath) {
14 if (_contentShellFuture == null) {
15 _contentShellFuture =
16 new _RuntimeUpdater('Content Shell', 'tools/get_archive.py', 'drt')
17 .update();
18 }
19
20 return _contentShellFuture;
21 }
22
23 class _RuntimeUpdater {
24 String _name;
25 String _script;
26 String _option;
27
28 _RuntimeUpdater(this._name, this._script, [this._option]);
29
30 Future update() async {
31 try {
32 print('Updating $_name...');
33
34 var arguments = [TestUtils.dartDirUri.resolve(_script).toFilePath()];
35
36 if (_option != null) arguments.add(_option);
37
38 var result = await Process.run('python', arguments);
39 if (result.exitCode == 0) {
40 print('Updated $_name.');
41 } else {
42 print('Failed to update $_name (exit code ${result.exitCode}):');
43 print(result.stdout);
44 print(result.stderr);
45 exit(1);
46 }
47 } catch (error) {
48 print("Error starting $_script process: $error");
49 exit(1);
50 }
51 }
52 }
OLDNEW
« no previous file with comments | « tools/testing/dart/runtime_configuration.dart ('k') | tools/testing/dart/status_reporter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698