Add first replay test (#8628)

This commit is contained in:
Todd Volkert
2017-03-09 12:58:31 -08:00
committed by GitHub
parent 5571cb1140
commit 1ada132ee8
51 changed files with 11998 additions and 26 deletions

View File

@@ -6,6 +6,7 @@ import 'package:path/path.dart' as p;
String flutterRoot = p.dirname(p.dirname(p.dirname(p.fromUri(Platform.script))));
String flutter = p.join(flutterRoot, 'bin', Platform.isWindows ? 'flutter.bat' : 'flutter');
String dart = p.join(flutterRoot, 'bin', 'cache', 'dart-sdk', 'bin', Platform.isWindows ? 'dart.exe' : 'dart');
String pub = p.join(flutterRoot, 'bin', 'cache', 'dart-sdk', 'bin', Platform.isWindows ? 'pub.bat' : 'pub');
String flutterTestArgs = Platform.environment['FLUTTER_TEST_ARGS'];
/// When you call this, you can set FLUTTER_TEST_ARGS to pass custom
@@ -81,6 +82,9 @@ Future<Null> main() async {
await _runAllDartTests(p.join(flutterRoot, 'packages', 'flutter_tools'),
environment: <String, String>{ 'FLUTTER_ROOT': flutterRoot },
);
await _pubRunTest(p.join(flutterRoot, 'packages', 'flutter_tools'),
testPath: 'test/replay',
);
await _runAllDartTests(p.join(flutterRoot, 'dev', 'devicelab'));
await _runFlutterTest(p.join(flutterRoot, 'dev', 'manual_tests'));
@@ -93,6 +97,16 @@ Future<Null> main() async {
}
}
Future<Null> _pubRunTest(
String workingDirectory, {
String testPath,
}) {
final List<String> args = <String>['run', 'test'];
if (testPath != null)
args.add(testPath);
return _runCmd(pub, args, workingDirectory: workingDirectory);
}
Future<Null> _runCmd(String executable, List<String> arguments, {
String workingDirectory,
Map<String, String> environment,