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

Side by Side Diff: lib/src/runner/plugin/platform_helpers.dart

Issue 1732773003: Use identifiers in OperatingSystem.find. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 9 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 | « lib/src/backend/operating_system.dart ('k') | test/runner/test_on_test.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:stack_trace/stack_trace.dart'; 7 import 'package:stack_trace/stack_trace.dart';
8 import 'package:stream_channel/stream_channel.dart'; 8 import 'package:stream_channel/stream_channel.dart';
9 9
10 import '../../backend/group.dart'; 10 import '../../backend/group.dart';
(...skipping 23 matching lines...) Expand all
34 TestPlatform platform, Metadata metadata, Environment environment, 34 TestPlatform platform, Metadata metadata, Environment environment,
35 StreamChannel channel, {StackTrace mapTrace(StackTrace trace)}) async { 35 StreamChannel channel, {StackTrace mapTrace(StackTrace trace)}) async {
36 if (mapTrace == null) mapTrace = (trace) => trace; 36 if (mapTrace == null) mapTrace = (trace) => trace;
37 37
38 var disconnector = new Disconnector(); 38 var disconnector = new Disconnector();
39 var suiteChannel = new MultiChannel(channel.transform(disconnector)); 39 var suiteChannel = new MultiChannel(channel.transform(disconnector));
40 40
41 suiteChannel.sink.add({ 41 suiteChannel.sink.add({
42 'platform': platform.identifier, 42 'platform': platform.identifier,
43 'metadata': metadata.serialize(), 43 'metadata': metadata.serialize(),
44 'os': platform == TestPlatform.vm ? currentOS.name : null 44 'os': platform == TestPlatform.vm ? currentOS.identifier : null
45 }); 45 });
46 46
47 var completer = new Completer(); 47 var completer = new Completer();
48 48
49 handleError(error, stackTrace) { 49 handleError(error, stackTrace) {
50 disconnector.disconnect(); 50 disconnector.disconnect();
51 51
52 if (completer.isCompleted) { 52 if (completer.isCompleted) {
53 // If we've already provided a controller, send the error to the 53 // If we've already provided a controller, send the error to the
54 // LoadSuite. This will cause the virtual load test to fail, which will 54 // LoadSuite. This will cause the virtual load test to fail, which will
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 /// 126 ///
127 /// Returns `null` if [test] is `null`. 127 /// Returns `null` if [test] is `null`.
128 Test _deserializeTest(Map test) { 128 Test _deserializeTest(Map test) {
129 if (test == null) return null; 129 if (test == null) return null;
130 130
131 var metadata = new Metadata.deserialize(test['metadata']); 131 var metadata = new Metadata.deserialize(test['metadata']);
132 var testChannel = _channel.virtualChannel(test['channel']); 132 var testChannel = _channel.virtualChannel(test['channel']);
133 return new RunnerTest(test['name'], metadata, testChannel, _mapTrace); 133 return new RunnerTest(test['name'], metadata, testChannel, _mapTrace);
134 } 134 }
135 } 135 }
OLDNEW
« no previous file with comments | « lib/src/backend/operating_system.dart ('k') | test/runner/test_on_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698