Use magic envs to pass commit and temp folder. (flutter/engine#46015)
The fuchsia scripts rely on paths and the commit version being passed as parameters. This changes pass those values using special environment variables. Bug: https://github.com/flutter/flutter/issues/126461 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
@@ -105,6 +105,25 @@ A configuration file defines a top-level builder that will show up as a column
|
||||
in the
|
||||
[Flutter Dashboard](https://flutter-dashboard.appspot.com/#/build?repo=engine&branch=master).
|
||||
|
||||
|
||||
### Magic variables
|
||||
|
||||
Magic variables are special environment variables that can be used as parameters
|
||||
for generators and test commands in the local and global contexts.
|
||||
|
||||
Magic environment variables have the following limitations:
|
||||
only `${FLUTTER_LOGS_DIR}` is currently supported and it needs to be used
|
||||
alone within the parameter string(e.g. `["${FLUTTER_LOGS_DIR}"]` is OK
|
||||
but `["path=${FLUTTER_LOGS_DIR}"]` is not).
|
||||
|
||||
The current list of supported magic variables is:
|
||||
|
||||
* `${FLUTTER_LOGS_DIR}` - translated to the path of the temporary
|
||||
folder where logs are being placed.
|
||||
* `${LUCI_WORKDIR}` - translated to the LUCI chroot working directory.
|
||||
* `${LUCI_CLEANUP}` - translated to the LUCI chroot temp directory.
|
||||
* `${REVISION}` - translated to the engine commit under test.
|
||||
|
||||
### Build
|
||||
|
||||
A build is a dictionary with a gn command, a ninja command, zero or more
|
||||
@@ -299,10 +318,7 @@ permissions to run in the target platform.
|
||||
* **name** - the name of the step running the script.
|
||||
* **parameters** - flags or parameters passed to the script. Parameters
|
||||
accept magic environment variables(placeholders replaced before executing
|
||||
the test). Magic environment variables have the following limitations:
|
||||
only `${FLUTTER_LOGS_DIR}` is currently supported and it needs to be used
|
||||
alone within the parameter string(e.g. `["${FLUTTER_LOGS_DIR}"]` is OK
|
||||
but `["path=${FLUTTER_LOGS_DIR}"]` is not).
|
||||
the test).
|
||||
* **Script** - the path to the script to execute relative to the checkout
|
||||
directory.
|
||||
* **contexts** - a list of available contexts to add to the text execution step.
|
||||
|
||||
@@ -152,8 +152,9 @@
|
||||
"name": "Upload fuchsia artifacts",
|
||||
"parameters": [
|
||||
"--engine-version",
|
||||
"HEAD",
|
||||
"--skip-build"
|
||||
"${REVISION}",
|
||||
"--skip-build",
|
||||
"--upload"
|
||||
],
|
||||
"script": "flutter/tools/fuchsia/build_fuchsia_artifacts.py",
|
||||
"language": "python3"
|
||||
@@ -166,7 +167,7 @@
|
||||
"--target-arch",
|
||||
"arm64",
|
||||
"--out-dir",
|
||||
"/b/s/w/ir/x/w/recipe_cleanup/tmppqs4ecj7",
|
||||
"${LUCI_CLEANUP}",
|
||||
"--symbol-dirs",
|
||||
"out/fuchsia_debug_arm64/.build-id",
|
||||
"out/fuchsia_profile_arm64/.build-id",
|
||||
@@ -183,7 +184,7 @@
|
||||
"--target-arch",
|
||||
"x64",
|
||||
"--out-dir",
|
||||
"/b/s/w/ir/x/w/recipe_cleanup/tmppqs4ecj7",
|
||||
"${LUCI_CLEANUP}",
|
||||
"--symbol-dirs",
|
||||
"out/fuchsia_debug_x64/.build-id",
|
||||
"out/fuchsia_profile_x64/.build-id",
|
||||
|
||||
Reference in New Issue
Block a user