Add first replay test (#8628)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user