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

Side by Side Diff: tests/mbedtls_tests/ssl_tests.dart

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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 | « tests/mbedtls_tests/ssl_client.dart ('k') | tests/multiprogram_tests/unhandled_signal.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 Fletch project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dartino 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 import '../fletchc/run.dart' show 8 import '../dartino_compiler/run.dart' show
9 export; 9 export;
10 import 'dart:convert' show 10 import 'dart:convert' show
11 LineSplitter, 11 LineSplitter,
12 UTF8, 12 UTF8,
13 Utf8Decoder; 13 Utf8Decoder;
14 14
15 main() async { 15 main() async {
16 await testServerClient(); 16 await testServerClient();
17 } 17 }
18 18
19 typedef Future NoArgFuture(); 19 typedef Future NoArgFuture();
20 20
21 const String fletchVmExecutable = const String.fromEnvironment('fletch-vm'); 21 const String dartinoVmExecutable = const String.fromEnvironment('dartino-vm');
22 const String testsDir = const String.fromEnvironment('tests-dir'); 22 const String testsDir = const String.fromEnvironment('tests-dir');
23 const String buildDirectory = 23 const String buildDirectory =
24 const String.fromEnvironment('test.dart.build-dir'); 24 const String.fromEnvironment('test.dart.build-dir');
25 25
26 String localFile(path) => Platform.script.resolve(path).toFilePath(); 26 String localFile(path) => Platform.script.resolve(path).toFilePath();
27 27
28 const String certPath = 'third_party/dart/tests/standalone/io/certificates'; 28 const String certPath = 'third_party/dart/tests/standalone/io/certificates';
29 29
30 SecurityContext createContext() { 30 SecurityContext createContext() {
31 var testDirUri = new Uri.file(testsDir); 31 var testDirUri = new Uri.file(testsDir);
(...skipping 17 matching lines...) Expand all
49 var testDirUri = new Uri.file(testsDir); 49 var testDirUri = new Uri.file(testsDir);
50 var client = testDirUri.resolve('mbedtls_tests/ssl_client.dart'); 50 var client = testDirUri.resolve('mbedtls_tests/ssl_client.dart');
51 var tempTest = '$buildDirectory/tests'; 51 var tempTest = '$buildDirectory/tests';
52 await new Directory(tempTest).create(recursive: true); 52 await new Directory(tempTest).create(recursive: true);
53 var snapshot = '$tempTest/ssl_client.snapshot'; 53 var snapshot = '$tempTest/ssl_client.snapshot';
54 var environment = { 54 var environment = {
55 'SERVER_PORT': '${server.port}' 55 'SERVER_PORT': '${server.port}'
56 }; 56 };
57 await export(client.toFilePath(), snapshot, constants:environment); 57 await export(client.toFilePath(), snapshot, constants:environment);
58 58
59 var process = await Process.start(fletchVmExecutable, [snapshot]); 59 var process = await Process.start(dartinoVmExecutable, [snapshot]);
60 // We print this, in the normal case there is no output, but in case of error 60 // We print this, in the normal case there is no output, but in case of error
61 // we actually want it all. 61 // we actually want it all.
62 var stdoutFuture = process.stdout.transform(UTF8.decoder) 62 var stdoutFuture = process.stdout.transform(UTF8.decoder)
63 .transform(new LineSplitter()) 63 .transform(new LineSplitter())
64 .listen((s) => print('fletch-vm(stdout): $s')).asFuture(); 64 .listen((s) => print('dartino-vm(stdout): $s')).asFuture();
65 var stderrFuture = process.stderr.transform(UTF8.decoder) 65 var stderrFuture = process.stderr.transform(UTF8.decoder)
66 .transform(new LineSplitter()) 66 .transform(new LineSplitter())
67 .listen((s) => print('fletch-vm(stderr): $s')).asFuture(); 67 .listen((s) => print('dartino-vm(stderr): $s')).asFuture();
68 var result = await process.exitCode; 68 var result = await process.exitCode;
69 await server.close(); 69 await server.close();
70 await stdoutFuture; 70 await stdoutFuture;
71 await stderrFuture; 71 await stderrFuture;
72 Expect.equals(result, 0); 72 Expect.equals(result, 0);
73 73
74 } 74 }
OLDNEW
« no previous file with comments | « tests/mbedtls_tests/ssl_client.dart ('k') | tests/multiprogram_tests/unhandled_signal.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698