mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Revert "Remove autoninja calls from the analyze script. (#26752)" (flutter/engine#26812)
This reverts commit 0f363535ba38fb4faed1a17bd9ab8636be258ef4.
This commit is contained in:
parent
0f363535ba
commit
f7ececee99
@ -59,6 +59,7 @@ function analyze() (
|
||||
)
|
||||
|
||||
echo "Analyzing dart:ui library..."
|
||||
autoninja -C "$SRC_DIR/out/host_debug_unopt" generate_dart_ui
|
||||
analyze \
|
||||
--options "$FLUTTER_DIR/analysis_options.yaml" \
|
||||
"$SRC_DIR/out/host_debug_unopt/gen/sky/bindings/dart_ui/ui.dart"
|
||||
@ -106,6 +107,8 @@ analyze \
|
||||
"$FLUTTER_DIR/testing/smoke_test_failure"
|
||||
|
||||
echo "Analyzing testing/dart..."
|
||||
"$FLUTTER_DIR/tools/gn" --unoptimized
|
||||
autoninja -C "$SRC_DIR/out/host_debug_unopt" sky_engine sky_services
|
||||
(cd "$FLUTTER_DIR/testing/dart" && "$PUB" get --offline)
|
||||
analyze \
|
||||
--packages="$FLUTTER_DIR/testing/dart/.dart_tool/package_config.json" \
|
||||
|
||||
@ -283,19 +283,89 @@ def RunDartTest(build_dir, test_packages, dart_file, verbose_dart_snapshot, mult
|
||||
|
||||
def EnsureDebugUnoptSkyPackagesAreBuilt():
|
||||
variant_out_dir = os.path.join(out_dir, 'host_debug_unopt')
|
||||
assert os.path.exists(variant_out_dir), "%s doesn't exist. Run GN to generate the directory first" % variant_out_dir
|
||||
|
||||
ninja_command = [
|
||||
'ninja',
|
||||
'-C',
|
||||
variant_out_dir,
|
||||
'flutter/sky/packages'
|
||||
]
|
||||
|
||||
# Attempt running Ninja if the out directory exists.
|
||||
# We don't want to blow away any custom GN args the caller may have already set.
|
||||
if os.path.exists(variant_out_dir):
|
||||
RunCmd(ninja_command, cwd=buildroot_dir)
|
||||
return
|
||||
|
||||
gn_command = [
|
||||
os.path.join(buildroot_dir, 'flutter', 'tools', 'gn'),
|
||||
'--runtime-mode',
|
||||
'debug',
|
||||
'--unopt',
|
||||
'--no-lto',
|
||||
]
|
||||
|
||||
RunCmd(gn_command, cwd=buildroot_dir)
|
||||
RunCmd(ninja_command, cwd=buildroot_dir)
|
||||
|
||||
|
||||
def EnsureJavaTestsAreBuilt(android_out_dir):
|
||||
"""Builds the engine variant and the test jar containing the JUnit tests"""
|
||||
tmp_out_dir = os.path.join(out_dir, android_out_dir)
|
||||
assert os.path.exists(tmp_out_dir), "%s doesn't exist. Run GN to generate the directory first" % android_out_dir
|
||||
ninja_command = [
|
||||
'autoninja',
|
||||
'-C',
|
||||
android_out_dir,
|
||||
'flutter/shell/platform/android:robolectric_tests'
|
||||
]
|
||||
|
||||
# Attempt running Ninja if the out directory exists.
|
||||
# We don't want to blow away any custom GN args the caller may have already set.
|
||||
if os.path.exists(android_out_dir):
|
||||
RunCmd(ninja_command, cwd=buildroot_dir)
|
||||
return
|
||||
|
||||
assert android_out_dir != "out/android_debug_unopt", "%s doesn't exist. Run GN to generate the directory first" % android_out_dir
|
||||
|
||||
# Otherwise prepare the directory first, then build the test.
|
||||
gn_command = [
|
||||
os.path.join(buildroot_dir, 'flutter', 'tools', 'gn'),
|
||||
'--android',
|
||||
'--unoptimized',
|
||||
'--runtime-mode=debug',
|
||||
'--no-lto',
|
||||
]
|
||||
RunCmd(gn_command, cwd=buildroot_dir)
|
||||
RunCmd(ninja_command, cwd=buildroot_dir)
|
||||
|
||||
|
||||
def EnsureIosTestsAreBuilt(ios_out_dir):
|
||||
"""Builds the engine variant and the test dylib containing the XCTests"""
|
||||
tmp_out_dir = os.path.join(out_dir, ios_out_dir)
|
||||
assert os.path.exists(tmp_out_dir), "%s doesn't exist. Run GN to generate the directory first" % ios_out_dir
|
||||
ninja_command = [
|
||||
'autoninja',
|
||||
'-C',
|
||||
ios_out_dir,
|
||||
'ios_test_flutter'
|
||||
]
|
||||
|
||||
# Attempt running Ninja if the out directory exists.
|
||||
# We don't want to blow away any custom GN args the caller may have already set.
|
||||
if os.path.exists(ios_out_dir):
|
||||
RunCmd(ninja_command, cwd=buildroot_dir)
|
||||
return
|
||||
|
||||
assert ios_out_dir != "out/ios_debug_sim_unopt", "%s doesn't exist. Run GN to generate the directory first" % ios_out_dir
|
||||
|
||||
# Otherwise prepare the directory first, then build the test.
|
||||
gn_command = [
|
||||
os.path.join(buildroot_dir, 'flutter', 'tools', 'gn'),
|
||||
'--ios',
|
||||
'--unoptimized',
|
||||
'--runtime-mode=debug',
|
||||
'--no-lto',
|
||||
'--simulator'
|
||||
]
|
||||
RunCmd(gn_command, cwd=buildroot_dir)
|
||||
RunCmd(ninja_command, cwd=buildroot_dir)
|
||||
|
||||
|
||||
def AssertExpectedJavaVersion():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user