Skip to content

Commit

Permalink
Revert "validate engine hash (flutter#55057)" (flutter#55220)
Browse files Browse the repository at this point in the history
This reverts commit 98651c0.
  • Loading branch information
dnfield authored Apr 20, 2020
1 parent e094344 commit 6a490ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 30 deletions.
2 changes: 1 addition & 1 deletion dev/bots/run_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Future<void> runCommand(String executable, List<String> arguments, {
);

final String commandDescription = '${path.relative(executable, from: workingDirectory)} ${arguments.join(' ')}';
final String relativeWorkingDir = path.relative(workingDirectory ?? Directory.current.path);
final String relativeWorkingDir = path.relative(workingDirectory);
if (skip) {
printProgress('SKIPPING', relativeWorkingDir, commandDescription);
return;
Expand Down
33 changes: 4 additions & 29 deletions dev/bots/test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,12 @@ typedef ShardRunner = Future<void> Function();
/// appropriate error message.
typedef OutputChecker = String Function(CapturedOutput);

final String exe = Platform.isWindows ? '.exe' : '';
final String bat = Platform.isWindows ? '.bat' : '';
final String flutterRoot = path.dirname(path.dirname(path.dirname(path.fromUri(Platform.script))));
final String flutter = path.join(flutterRoot, 'bin', 'flutter$bat');
final String dart = path.join(flutterRoot, 'bin', 'cache', 'dart-sdk', 'bin', 'dart$exe');
final String pub = path.join(flutterRoot, 'bin', 'cache', 'dart-sdk', 'bin', 'pub$bat');
final String flutter = path.join(flutterRoot, 'bin', Platform.isWindows ? 'flutter.bat' : 'flutter');
final String dart = path.join(flutterRoot, 'bin', 'cache', 'dart-sdk', 'bin', Platform.isWindows ? 'dart.exe' : 'dart');
final String pub = path.join(flutterRoot, 'bin', 'cache', 'dart-sdk', 'bin', Platform.isWindows ? 'pub.bat' : 'pub');
final String pubCache = path.join(flutterRoot, '.pub-cache');
final String toolRoot = path.join(flutterRoot, 'packages', 'flutter_tools');
final String engineVersionFile = path.join(flutterRoot, 'bin', 'internal', 'engine.version');

String get platformFolderName {
if (Platform.isWindows)
return 'windows-x64';
if (Platform.isMacOS)
return 'darwin-x64';
if (Platform.isLinux)
return 'linux-x64';
throw UnsupportedError('The platform ${Platform.operatingSystem} is not supported by this script.');
}
final String flutterTester = path.join(flutterRoot, 'bin', 'cache', 'artifacts', 'engine', platformFolderName, 'flutter_tester$exe');

/// The arguments to pass to `flutter test` (typically the local engine
/// configuration) -- prefilled with the arguments passed to test.dart.
Expand Down Expand Up @@ -132,18 +118,6 @@ Future<void> main(List<String> args) async {

Future<void> _runSmokeTests() async {
print('${green}Running smoketests...$reset');
// Verify the Flutter Engine is the revision we asked for.
final String expectedVersion = File(engineVersionFile).readAsStringSync().trim();
final CapturedOutput flutterTesterOutput = CapturedOutput();
await runCommand(flutterTester, <String>['--help'], output: flutterTesterOutput, outputMode: OutputMode.capture);
final String actualVersion = flutterTesterOutput.stderr.split('\n').firstWhere((final String line) {
return line.startsWith('Flutter Engine Version:');
});
if (!actualVersion.contains(expectedVersion)) {
print('${red}Expected "Flutter Engine Version: $expectedVersion", '
'but found "$actualVersion".');
exit(1);
}
// Verify that the tests actually return failure on failure and success on
// success.
final String automatedTests = path.join(flutterRoot, 'dev', 'automated_tests');
Expand Down Expand Up @@ -1178,6 +1152,7 @@ int get prNumber {
}

Future<String> _getAuthors() async {
final String exe = Platform.isWindows ? '.exe' : '';
final String author = await runAndGetStdout(
'git$exe', <String>['-c', 'log.showSignature=false', 'log', gitHash, '--pretty="%an <%ae>"'],
workingDirectory: flutterRoot,
Expand Down

0 comments on commit 6a490ed

Please sign in to comment.