mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Pass FLUTTER_TOOL_ARGS to snapshot command. (#29938)
This commit is contained in:
parent
76b9962fdd
commit
0a2175f133
@ -121,7 +121,7 @@ function upgrade_flutter () {
|
||||
|
||||
retry_upgrade
|
||||
|
||||
"$DART" --snapshot="$SNAPSHOT_PATH" --snapshot-kind=app-jit --packages="$FLUTTER_TOOLS_DIR/.packages" "$SCRIPT_PATH" training
|
||||
"$DART" $FLUTTER_TOOL_ARGS --snapshot="$SNAPSHOT_PATH" --snapshot-kind=app-jit --packages="$FLUTTER_TOOLS_DIR/.packages" "$SCRIPT_PATH" training
|
||||
echo "$revision" > "$STAMP_PATH"
|
||||
fi
|
||||
# The exit here is duplicitous since the function is run in a subshell,
|
||||
|
||||
@ -152,7 +152,11 @@ GOTO :after_subroutine
|
||||
|
||||
POPD
|
||||
|
||||
"%dart%" --snapshot="%snapshot_path%" --snapshot-kind=app-jit --packages="%flutter_tools_dir%\.packages" "%script_path%"
|
||||
IF "%FLUTTER_TOOL_ARGS%" == "" (
|
||||
"%dart%" --snapshot="%snapshot_path%" --snapshot-kind=app-jit --packages="%flutter_tools_dir%\.packages" "%script_path%"
|
||||
) else (
|
||||
"%dart%" "%FLUTTER_TOOL_ARGS%" --snapshot="%snapshot_path%" --snapshot-kind=app-jit --packages="%flutter_tools_dir%\.packages" "%script_path%"
|
||||
)
|
||||
IF "%ERRORLEVEL%" NEQ "0" (
|
||||
ECHO Error: Unable to create dart snapshot for flutter tool.
|
||||
SET exit_code=%ERRORLEVEL%
|
||||
|
||||
@ -180,16 +180,24 @@ Future<void> _runToolTests() async {
|
||||
final bq.BigqueryApi bigqueryApi = await _getBigqueryApi();
|
||||
await _runSmokeTests();
|
||||
|
||||
// The flutter_tool will currently be snapshotted without asserts. We need
|
||||
// to force it to be regenerated with them enabled.
|
||||
if (!Platform.isWindows) {
|
||||
File(path.join(flutterRoot, 'bin', 'cache', 'flutter_tools.snapshot')).deleteSync();
|
||||
File(path.join(flutterRoot, 'bin', 'cache', 'flutter_tools.stamp')).deleteSync();
|
||||
}
|
||||
if (noUseBuildRunner) {
|
||||
await _pubRunTest(
|
||||
path.join(flutterRoot, 'packages', 'flutter_tools'),
|
||||
tableData: bigqueryApi?.tabledata,
|
||||
enableFlutterToolAsserts: !Platform.isWindows,
|
||||
);
|
||||
} else {
|
||||
await _buildRunnerTest(
|
||||
path.join(flutterRoot, 'packages', 'flutter_tools'),
|
||||
flutterRoot,
|
||||
tableData: bigqueryApi?.tabledata,
|
||||
enableFlutterToolAsserts: !Platform.isWindows,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user