allow either host_debug or host_debug_unopt for pre-push verification (flutter/engine#33000)
This commit is contained in:
@@ -37,7 +37,7 @@ class PrePushCommand extends Command<bool> {
|
|||||||
final Stopwatch sw = Stopwatch()..start();
|
final Stopwatch sw = Stopwatch()..start();
|
||||||
// First ensure that out/host_debug/compile_commands.json exists by running
|
// First ensure that out/host_debug/compile_commands.json exists by running
|
||||||
// //flutter/tools/gn.
|
// //flutter/tools/gn.
|
||||||
final io.File compileCommands = io.File(path.join(
|
io.File compileCommands = io.File(path.join(
|
||||||
flutterRoot,
|
flutterRoot,
|
||||||
'..',
|
'..',
|
||||||
'out',
|
'out',
|
||||||
@@ -45,14 +45,15 @@ class PrePushCommand extends Command<bool> {
|
|||||||
'compile_commands.json',
|
'compile_commands.json',
|
||||||
));
|
));
|
||||||
if (!compileCommands.existsSync()) {
|
if (!compileCommands.existsSync()) {
|
||||||
final bool gnResult = await _runCheck(
|
compileCommands = io.File(path.join(
|
||||||
flutterRoot,
|
flutterRoot,
|
||||||
path.join(flutterRoot, 'tools', 'gn'),
|
'..',
|
||||||
<String>[],
|
'out',
|
||||||
'GN for host_debug',
|
'host_debug_unopt',
|
||||||
verbose: verbose,
|
'compile_commands.json',
|
||||||
);
|
));
|
||||||
if (!gnResult) {
|
if (!compileCommands.existsSync()) {
|
||||||
|
io.stderr.writeln('clang-tidy requires a fully built host_debug or host_debug_unopt build directory');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user