allow either host_debug or host_debug_unopt for pre-push verification (flutter/engine#33000)

This commit is contained in:
Jim Graham 2022-04-29 13:34:03 -07:00 committed by GitHub
parent 86baf448e2
commit 8ca73cd2d0

View File

@ -37,7 +37,7 @@ class PrePushCommand extends Command<bool> {
final Stopwatch sw = Stopwatch()..start();
// First ensure that out/host_debug/compile_commands.json exists by running
// //flutter/tools/gn.
final io.File compileCommands = io.File(path.join(
io.File compileCommands = io.File(path.join(
flutterRoot,
'..',
'out',
@ -45,14 +45,15 @@ class PrePushCommand extends Command<bool> {
'compile_commands.json',
));
if (!compileCommands.existsSync()) {
final bool gnResult = await _runCheck(
compileCommands = io.File(path.join(
flutterRoot,
path.join(flutterRoot, 'tools', 'gn'),
<String>[],
'GN for host_debug',
verbose: verbose,
);
if (!gnResult) {
'..',
'out',
'host_debug_unopt',
'compile_commands.json',
));
if (!compileCommands.existsSync()) {
io.stderr.writeln('clang-tidy requires a fully built host_debug or host_debug_unopt build directory');
return false;
}
}