Prepare for sharding clang-tidy
This CL adds options to the engine_lint.py recipe for running the
lint script in different ways. It also adds options to help shard
the recipe since it is now >50 minutes on macOS.
led runs:
https://ci.chromium.org/raw/build/logs.chromium.org/flutter/led/zra_google.com/8e7f2aafde86ac075ec4ea1d9e28589918d2c509dedb444488f1d5bcf70b6bfa/+/build.proto?server=chromium-swarm.appspot.com
https://ci.chromium.org/raw/build/logs.chromium.org/flutter/led/zra_google.com/f93e945d21b5d7fa3f5fb21fa4ce3c71ea316c81509be1c935c545b075063a4e/+/build.proto?server=chromium-swarm.appspot.com
Change-Id: I0be207600929aabff57f46ddd5d1ff58819046ee
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/34420
Reviewed-by: Godofredo Contreras <godofredoc@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
diff --git a/recipes/engine/engine_lint.expected/linux.json b/recipes/engine/engine_lint.expected/linux android all.json
similarity index 99%
rename from recipes/engine/engine_lint.expected/linux.json
rename to recipes/engine/engine_lint.expected/linux android all.json
index 2c80aae..38d42f9 100644
--- a/recipes/engine/engine_lint.expected/linux.json
+++ b/recipes/engine/engine_lint.expected/linux android all.json
@@ -537,9 +537,9 @@
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--runtime-mode",
- "debug",
- "--prebuilt-dart-sdk",
+ "--android",
+ "--android-cpu",
+ "arm64",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -575,7 +575,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
+ "name": "gn --android --android-cpu arm64 --no-lto"
},
{
"cmd": [],
@@ -855,7 +855,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/host_debug"
+ "[CACHE]/builder/src/out/android_debug_arm64"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -894,7 +894,7 @@
"hostname": "rdbhost"
}
},
- "name": "build host_debug"
+ "name": "build android_debug_arm64"
},
{
"cmd": [],
@@ -1428,9 +1428,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "host_debug"
+ "android_debug_arm64",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1465,16 +1465,16 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint host_debug"
+ "name": "test: lint android_debug_arm64"
},
{
"cmd": [
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--android",
- "--android-cpu",
- "arm64",
+ "--runtime-mode",
+ "debug",
+ "--prebuilt-dart-sdk",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -1510,7 +1510,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --android --android-cpu arm64 --no-lto"
+ "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
},
{
"cmd": [],
@@ -1577,7 +1577,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/android_debug_arm64"
+ "[CACHE]/builder/src/out/host_debug"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1616,7 +1616,7 @@
"hostname": "rdbhost"
}
},
- "name": "build android_debug_arm64"
+ "name": "build host_debug"
},
{
"cmd": [],
@@ -1961,9 +1961,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "android_debug_arm64"
+ "host_debug",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1998,7 +1998,7 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint android_debug_arm64"
+ "name": "test: lint host_debug"
},
{
"cmd": [],
diff --git a/recipes/engine/engine_lint.expected/linux.json b/recipes/engine/engine_lint.expected/linux android branch.json
similarity index 99%
copy from recipes/engine/engine_lint.expected/linux.json
copy to recipes/engine/engine_lint.expected/linux android branch.json
index 2c80aae..38d42f9 100644
--- a/recipes/engine/engine_lint.expected/linux.json
+++ b/recipes/engine/engine_lint.expected/linux android branch.json
@@ -537,9 +537,9 @@
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--runtime-mode",
- "debug",
- "--prebuilt-dart-sdk",
+ "--android",
+ "--android-cpu",
+ "arm64",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -575,7 +575,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
+ "name": "gn --android --android-cpu arm64 --no-lto"
},
{
"cmd": [],
@@ -855,7 +855,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/host_debug"
+ "[CACHE]/builder/src/out/android_debug_arm64"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -894,7 +894,7 @@
"hostname": "rdbhost"
}
},
- "name": "build host_debug"
+ "name": "build android_debug_arm64"
},
{
"cmd": [],
@@ -1428,9 +1428,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "host_debug"
+ "android_debug_arm64",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1465,16 +1465,16 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint host_debug"
+ "name": "test: lint android_debug_arm64"
},
{
"cmd": [
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--android",
- "--android-cpu",
- "arm64",
+ "--runtime-mode",
+ "debug",
+ "--prebuilt-dart-sdk",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -1510,7 +1510,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --android --android-cpu arm64 --no-lto"
+ "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
},
{
"cmd": [],
@@ -1577,7 +1577,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/android_debug_arm64"
+ "[CACHE]/builder/src/out/host_debug"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1616,7 +1616,7 @@
"hostname": "rdbhost"
}
},
- "name": "build android_debug_arm64"
+ "name": "build host_debug"
},
{
"cmd": [],
@@ -1961,9 +1961,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "android_debug_arm64"
+ "host_debug",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1998,7 +1998,7 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint android_debug_arm64"
+ "name": "test: lint host_debug"
},
{
"cmd": [],
diff --git a/recipes/engine/engine_lint.expected/linux.json b/recipes/engine/engine_lint.expected/linux android head.json
similarity index 99%
copy from recipes/engine/engine_lint.expected/linux.json
copy to recipes/engine/engine_lint.expected/linux android head.json
index 2c80aae..585b060 100644
--- a/recipes/engine/engine_lint.expected/linux.json
+++ b/recipes/engine/engine_lint.expected/linux android head.json
@@ -537,9 +537,9 @@
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--runtime-mode",
- "debug",
- "--prebuilt-dart-sdk",
+ "--android",
+ "--android-cpu",
+ "arm64",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -575,7 +575,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
+ "name": "gn --android --android-cpu arm64 --no-lto"
},
{
"cmd": [],
@@ -855,7 +855,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/host_debug"
+ "[CACHE]/builder/src/out/android_debug_arm64"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -894,7 +894,7 @@
"hostname": "rdbhost"
}
},
- "name": "build host_debug"
+ "name": "build android_debug_arm64"
},
{
"cmd": [],
@@ -1428,9 +1428,10 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "host_debug"
+ "android_debug_arm64",
+ "--lint-all",
+ "--lint-head"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1465,16 +1466,16 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint host_debug"
+ "name": "test: lint android_debug_arm64"
},
{
"cmd": [
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--android",
- "--android-cpu",
- "arm64",
+ "--runtime-mode",
+ "debug",
+ "--prebuilt-dart-sdk",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -1510,7 +1511,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --android --android-cpu arm64 --no-lto"
+ "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
},
{
"cmd": [],
@@ -1577,7 +1578,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/android_debug_arm64"
+ "[CACHE]/builder/src/out/host_debug"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1616,7 +1617,7 @@
"hostname": "rdbhost"
}
},
- "name": "build android_debug_arm64"
+ "name": "build host_debug"
},
{
"cmd": [],
@@ -1961,9 +1962,10 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "android_debug_arm64"
+ "host_debug",
+ "--lint-all",
+ "--lint-head"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1998,7 +2000,7 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint android_debug_arm64"
+ "name": "test: lint host_debug"
},
{
"cmd": [],
diff --git a/recipes/engine/engine_lint.expected/linux.json b/recipes/engine/engine_lint.expected/linux host all.json
similarity index 99%
copy from recipes/engine/engine_lint.expected/linux.json
copy to recipes/engine/engine_lint.expected/linux host all.json
index 2c80aae..38d42f9 100644
--- a/recipes/engine/engine_lint.expected/linux.json
+++ b/recipes/engine/engine_lint.expected/linux host all.json
@@ -537,9 +537,9 @@
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--runtime-mode",
- "debug",
- "--prebuilt-dart-sdk",
+ "--android",
+ "--android-cpu",
+ "arm64",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -575,7 +575,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
+ "name": "gn --android --android-cpu arm64 --no-lto"
},
{
"cmd": [],
@@ -855,7 +855,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/host_debug"
+ "[CACHE]/builder/src/out/android_debug_arm64"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -894,7 +894,7 @@
"hostname": "rdbhost"
}
},
- "name": "build host_debug"
+ "name": "build android_debug_arm64"
},
{
"cmd": [],
@@ -1428,9 +1428,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "host_debug"
+ "android_debug_arm64",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1465,16 +1465,16 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint host_debug"
+ "name": "test: lint android_debug_arm64"
},
{
"cmd": [
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--android",
- "--android-cpu",
- "arm64",
+ "--runtime-mode",
+ "debug",
+ "--prebuilt-dart-sdk",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -1510,7 +1510,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --android --android-cpu arm64 --no-lto"
+ "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
},
{
"cmd": [],
@@ -1577,7 +1577,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/android_debug_arm64"
+ "[CACHE]/builder/src/out/host_debug"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1616,7 +1616,7 @@
"hostname": "rdbhost"
}
},
- "name": "build android_debug_arm64"
+ "name": "build host_debug"
},
{
"cmd": [],
@@ -1961,9 +1961,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "android_debug_arm64"
+ "host_debug",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1998,7 +1998,7 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint android_debug_arm64"
+ "name": "test: lint host_debug"
},
{
"cmd": [],
diff --git a/recipes/engine/engine_lint.expected/linux.json b/recipes/engine/engine_lint.expected/linux host branch.json
similarity index 99%
copy from recipes/engine/engine_lint.expected/linux.json
copy to recipes/engine/engine_lint.expected/linux host branch.json
index 2c80aae..38d42f9 100644
--- a/recipes/engine/engine_lint.expected/linux.json
+++ b/recipes/engine/engine_lint.expected/linux host branch.json
@@ -537,9 +537,9 @@
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--runtime-mode",
- "debug",
- "--prebuilt-dart-sdk",
+ "--android",
+ "--android-cpu",
+ "arm64",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -575,7 +575,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
+ "name": "gn --android --android-cpu arm64 --no-lto"
},
{
"cmd": [],
@@ -855,7 +855,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/host_debug"
+ "[CACHE]/builder/src/out/android_debug_arm64"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -894,7 +894,7 @@
"hostname": "rdbhost"
}
},
- "name": "build host_debug"
+ "name": "build android_debug_arm64"
},
{
"cmd": [],
@@ -1428,9 +1428,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "host_debug"
+ "android_debug_arm64",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1465,16 +1465,16 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint host_debug"
+ "name": "test: lint android_debug_arm64"
},
{
"cmd": [
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--android",
- "--android-cpu",
- "arm64",
+ "--runtime-mode",
+ "debug",
+ "--prebuilt-dart-sdk",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -1510,7 +1510,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --android --android-cpu arm64 --no-lto"
+ "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
},
{
"cmd": [],
@@ -1577,7 +1577,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/android_debug_arm64"
+ "[CACHE]/builder/src/out/host_debug"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1616,7 +1616,7 @@
"hostname": "rdbhost"
}
},
- "name": "build android_debug_arm64"
+ "name": "build host_debug"
},
{
"cmd": [],
@@ -1961,9 +1961,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "android_debug_arm64"
+ "host_debug",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1998,7 +1998,7 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint android_debug_arm64"
+ "name": "test: lint host_debug"
},
{
"cmd": [],
diff --git a/recipes/engine/engine_lint.expected/linux.json b/recipes/engine/engine_lint.expected/linux host head.json
similarity index 99%
copy from recipes/engine/engine_lint.expected/linux.json
copy to recipes/engine/engine_lint.expected/linux host head.json
index 2c80aae..585b060 100644
--- a/recipes/engine/engine_lint.expected/linux.json
+++ b/recipes/engine/engine_lint.expected/linux host head.json
@@ -537,9 +537,9 @@
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--runtime-mode",
- "debug",
- "--prebuilt-dart-sdk",
+ "--android",
+ "--android-cpu",
+ "arm64",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -575,7 +575,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
+ "name": "gn --android --android-cpu arm64 --no-lto"
},
{
"cmd": [],
@@ -855,7 +855,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/host_debug"
+ "[CACHE]/builder/src/out/android_debug_arm64"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -894,7 +894,7 @@
"hostname": "rdbhost"
}
},
- "name": "build host_debug"
+ "name": "build android_debug_arm64"
},
{
"cmd": [],
@@ -1428,9 +1428,10 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "host_debug"
+ "android_debug_arm64",
+ "--lint-all",
+ "--lint-head"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1465,16 +1466,16 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint host_debug"
+ "name": "test: lint android_debug_arm64"
},
{
"cmd": [
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--android",
- "--android-cpu",
- "arm64",
+ "--runtime-mode",
+ "debug",
+ "--prebuilt-dart-sdk",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -1510,7 +1511,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --android --android-cpu arm64 --no-lto"
+ "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
},
{
"cmd": [],
@@ -1577,7 +1578,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/android_debug_arm64"
+ "[CACHE]/builder/src/out/host_debug"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1616,7 +1617,7 @@
"hostname": "rdbhost"
}
},
- "name": "build android_debug_arm64"
+ "name": "build host_debug"
},
{
"cmd": [],
@@ -1961,9 +1962,10 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "android_debug_arm64"
+ "host_debug",
+ "--lint-all",
+ "--lint-head"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1998,7 +2000,7 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint android_debug_arm64"
+ "name": "test: lint host_debug"
},
{
"cmd": [],
diff --git a/recipes/engine/engine_lint.expected/mac.json b/recipes/engine/engine_lint.expected/mac host all.json
similarity index 99%
rename from recipes/engine/engine_lint.expected/mac.json
rename to recipes/engine/engine_lint.expected/mac host all.json
index 46a15a5..a772c96 100644
--- a/recipes/engine/engine_lint.expected/mac.json
+++ b/recipes/engine/engine_lint.expected/mac host all.json
@@ -836,9 +836,10 @@
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
+ "--ios",
"--runtime-mode",
"debug",
- "--prebuilt-dart-sdk",
+ "--simulator",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -874,7 +875,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
+ "name": "gn --ios --runtime-mode debug --simulator --no-lto"
},
{
"cmd": [],
@@ -1154,7 +1155,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/host_debug"
+ "[CACHE]/builder/src/out/ios_debug_sim"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1193,7 +1194,7 @@
"hostname": "rdbhost"
}
},
- "name": "build host_debug"
+ "name": "build ios_debug_sim"
},
{
"cmd": [],
@@ -1727,9 +1728,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "host_debug"
+ "ios_debug_sim",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1764,17 +1765,16 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint host_debug"
+ "name": "test: lint ios_debug_sim"
},
{
"cmd": [
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--ios",
"--runtime-mode",
"debug",
- "--simulator",
+ "--prebuilt-dart-sdk",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -1810,7 +1810,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --ios --runtime-mode debug --simulator --no-lto"
+ "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
},
{
"cmd": [],
@@ -1877,7 +1877,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/ios_debug_sim"
+ "[CACHE]/builder/src/out/host_debug"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1916,7 +1916,7 @@
"hostname": "rdbhost"
}
},
- "name": "build ios_debug_sim"
+ "name": "build host_debug"
},
{
"cmd": [],
@@ -2261,9 +2261,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "ios_debug_sim"
+ "host_debug",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -2298,7 +2298,7 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint ios_debug_sim"
+ "name": "test: lint host_debug"
},
{
"cmd": [
diff --git a/recipes/engine/engine_lint.expected/mac.json b/recipes/engine/engine_lint.expected/mac host branch.json
similarity index 99%
copy from recipes/engine/engine_lint.expected/mac.json
copy to recipes/engine/engine_lint.expected/mac host branch.json
index 46a15a5..a772c96 100644
--- a/recipes/engine/engine_lint.expected/mac.json
+++ b/recipes/engine/engine_lint.expected/mac host branch.json
@@ -836,9 +836,10 @@
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
+ "--ios",
"--runtime-mode",
"debug",
- "--prebuilt-dart-sdk",
+ "--simulator",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -874,7 +875,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
+ "name": "gn --ios --runtime-mode debug --simulator --no-lto"
},
{
"cmd": [],
@@ -1154,7 +1155,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/host_debug"
+ "[CACHE]/builder/src/out/ios_debug_sim"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1193,7 +1194,7 @@
"hostname": "rdbhost"
}
},
- "name": "build host_debug"
+ "name": "build ios_debug_sim"
},
{
"cmd": [],
@@ -1727,9 +1728,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "host_debug"
+ "ios_debug_sim",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1764,17 +1765,16 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint host_debug"
+ "name": "test: lint ios_debug_sim"
},
{
"cmd": [
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--ios",
"--runtime-mode",
"debug",
- "--simulator",
+ "--prebuilt-dart-sdk",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -1810,7 +1810,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --ios --runtime-mode debug --simulator --no-lto"
+ "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
},
{
"cmd": [],
@@ -1877,7 +1877,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/ios_debug_sim"
+ "[CACHE]/builder/src/out/host_debug"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1916,7 +1916,7 @@
"hostname": "rdbhost"
}
},
- "name": "build ios_debug_sim"
+ "name": "build host_debug"
},
{
"cmd": [],
@@ -2261,9 +2261,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "ios_debug_sim"
+ "host_debug",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -2298,7 +2298,7 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint ios_debug_sim"
+ "name": "test: lint host_debug"
},
{
"cmd": [
diff --git a/recipes/engine/engine_lint.expected/mac.json b/recipes/engine/engine_lint.expected/mac host head.json
similarity index 99%
copy from recipes/engine/engine_lint.expected/mac.json
copy to recipes/engine/engine_lint.expected/mac host head.json
index 46a15a5..f178e46 100644
--- a/recipes/engine/engine_lint.expected/mac.json
+++ b/recipes/engine/engine_lint.expected/mac host head.json
@@ -836,9 +836,10 @@
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
+ "--ios",
"--runtime-mode",
"debug",
- "--prebuilt-dart-sdk",
+ "--simulator",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -874,7 +875,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
+ "name": "gn --ios --runtime-mode debug --simulator --no-lto"
},
{
"cmd": [],
@@ -1154,7 +1155,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/host_debug"
+ "[CACHE]/builder/src/out/ios_debug_sim"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1193,7 +1194,7 @@
"hostname": "rdbhost"
}
},
- "name": "build host_debug"
+ "name": "build ios_debug_sim"
},
{
"cmd": [],
@@ -1727,9 +1728,10 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "host_debug"
+ "ios_debug_sim",
+ "--lint-all",
+ "--lint-head"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1764,17 +1766,16 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint host_debug"
+ "name": "test: lint ios_debug_sim"
},
{
"cmd": [
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--ios",
"--runtime-mode",
"debug",
- "--simulator",
+ "--prebuilt-dart-sdk",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -1810,7 +1811,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --ios --runtime-mode debug --simulator --no-lto"
+ "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
},
{
"cmd": [],
@@ -1877,7 +1878,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/ios_debug_sim"
+ "[CACHE]/builder/src/out/host_debug"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1916,7 +1917,7 @@
"hostname": "rdbhost"
}
},
- "name": "build ios_debug_sim"
+ "name": "build host_debug"
},
{
"cmd": [],
@@ -2261,9 +2262,10 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "ios_debug_sim"
+ "host_debug",
+ "--lint-all",
+ "--lint-head"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -2298,7 +2300,7 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint ios_debug_sim"
+ "name": "test: lint host_debug"
},
{
"cmd": [
diff --git a/recipes/engine/engine_lint.expected/mac.json b/recipes/engine/engine_lint.expected/mac ios all.json
similarity index 99%
copy from recipes/engine/engine_lint.expected/mac.json
copy to recipes/engine/engine_lint.expected/mac ios all.json
index 46a15a5..a772c96 100644
--- a/recipes/engine/engine_lint.expected/mac.json
+++ b/recipes/engine/engine_lint.expected/mac ios all.json
@@ -836,9 +836,10 @@
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
+ "--ios",
"--runtime-mode",
"debug",
- "--prebuilt-dart-sdk",
+ "--simulator",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -874,7 +875,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
+ "name": "gn --ios --runtime-mode debug --simulator --no-lto"
},
{
"cmd": [],
@@ -1154,7 +1155,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/host_debug"
+ "[CACHE]/builder/src/out/ios_debug_sim"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1193,7 +1194,7 @@
"hostname": "rdbhost"
}
},
- "name": "build host_debug"
+ "name": "build ios_debug_sim"
},
{
"cmd": [],
@@ -1727,9 +1728,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "host_debug"
+ "ios_debug_sim",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1764,17 +1765,16 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint host_debug"
+ "name": "test: lint ios_debug_sim"
},
{
"cmd": [
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--ios",
"--runtime-mode",
"debug",
- "--simulator",
+ "--prebuilt-dart-sdk",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -1810,7 +1810,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --ios --runtime-mode debug --simulator --no-lto"
+ "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
},
{
"cmd": [],
@@ -1877,7 +1877,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/ios_debug_sim"
+ "[CACHE]/builder/src/out/host_debug"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1916,7 +1916,7 @@
"hostname": "rdbhost"
}
},
- "name": "build ios_debug_sim"
+ "name": "build host_debug"
},
{
"cmd": [],
@@ -2261,9 +2261,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "ios_debug_sim"
+ "host_debug",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -2298,7 +2298,7 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint ios_debug_sim"
+ "name": "test: lint host_debug"
},
{
"cmd": [
diff --git a/recipes/engine/engine_lint.expected/mac.json b/recipes/engine/engine_lint.expected/mac ios branch.json
similarity index 99%
copy from recipes/engine/engine_lint.expected/mac.json
copy to recipes/engine/engine_lint.expected/mac ios branch.json
index 46a15a5..a772c96 100644
--- a/recipes/engine/engine_lint.expected/mac.json
+++ b/recipes/engine/engine_lint.expected/mac ios branch.json
@@ -836,9 +836,10 @@
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
+ "--ios",
"--runtime-mode",
"debug",
- "--prebuilt-dart-sdk",
+ "--simulator",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -874,7 +875,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
+ "name": "gn --ios --runtime-mode debug --simulator --no-lto"
},
{
"cmd": [],
@@ -1154,7 +1155,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/host_debug"
+ "[CACHE]/builder/src/out/ios_debug_sim"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1193,7 +1194,7 @@
"hostname": "rdbhost"
}
},
- "name": "build host_debug"
+ "name": "build ios_debug_sim"
},
{
"cmd": [],
@@ -1727,9 +1728,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "host_debug"
+ "ios_debug_sim",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1764,17 +1765,16 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint host_debug"
+ "name": "test: lint ios_debug_sim"
},
{
"cmd": [
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--ios",
"--runtime-mode",
"debug",
- "--simulator",
+ "--prebuilt-dart-sdk",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -1810,7 +1810,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --ios --runtime-mode debug --simulator --no-lto"
+ "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
},
{
"cmd": [],
@@ -1877,7 +1877,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/ios_debug_sim"
+ "[CACHE]/builder/src/out/host_debug"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1916,7 +1916,7 @@
"hostname": "rdbhost"
}
},
- "name": "build ios_debug_sim"
+ "name": "build host_debug"
},
{
"cmd": [],
@@ -2261,9 +2261,9 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "ios_debug_sim"
+ "host_debug",
+ "--lint-all"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -2298,7 +2298,7 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint ios_debug_sim"
+ "name": "test: lint host_debug"
},
{
"cmd": [
diff --git a/recipes/engine/engine_lint.expected/mac.json b/recipes/engine/engine_lint.expected/mac ios head.json
similarity index 99%
copy from recipes/engine/engine_lint.expected/mac.json
copy to recipes/engine/engine_lint.expected/mac ios head.json
index 46a15a5..f178e46 100644
--- a/recipes/engine/engine_lint.expected/mac.json
+++ b/recipes/engine/engine_lint.expected/mac ios head.json
@@ -836,9 +836,10 @@
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
+ "--ios",
"--runtime-mode",
"debug",
- "--prebuilt-dart-sdk",
+ "--simulator",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -874,7 +875,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
+ "name": "gn --ios --runtime-mode debug --simulator --no-lto"
},
{
"cmd": [],
@@ -1154,7 +1155,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/host_debug"
+ "[CACHE]/builder/src/out/ios_debug_sim"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1193,7 +1194,7 @@
"hostname": "rdbhost"
}
},
- "name": "build host_debug"
+ "name": "build ios_debug_sim"
},
{
"cmd": [],
@@ -1727,9 +1728,10 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "host_debug"
+ "ios_debug_sim",
+ "--lint-all",
+ "--lint-head"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -1764,17 +1766,16 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint host_debug"
+ "name": "test: lint ios_debug_sim"
},
{
"cmd": [
"python",
"[CACHE]/builder/src/flutter/tools/gn",
"--goma",
- "--ios",
"--runtime-mode",
"debug",
- "--simulator",
+ "--prebuilt-dart-sdk",
"--no-lto"
],
"cwd": "[CACHE]/builder",
@@ -1810,7 +1811,7 @@
"hostname": "rdbhost"
}
},
- "name": "gn --ios --runtime-mode debug --simulator --no-lto"
+ "name": "gn --runtime-mode debug --prebuilt-dart-sdk --no-lto"
},
{
"cmd": [],
@@ -1877,7 +1878,7 @@
"-j",
"1024",
"-C",
- "[CACHE]/builder/src/out/ios_debug_sim"
+ "[CACHE]/builder/src/out/host_debug"
],
"cwd": "[CACHE]/builder",
"env": {
@@ -1916,7 +1917,7 @@
"hostname": "rdbhost"
}
},
- "name": "build ios_debug_sim"
+ "name": "build host_debug"
},
{
"cmd": [],
@@ -2261,9 +2262,10 @@
{
"cmd": [
"[CACHE]/builder/src/flutter/ci/lint.sh",
- "--lint-all",
"--variant",
- "ios_debug_sim"
+ "host_debug",
+ "--lint-all",
+ "--lint-head"
],
"cwd": "[CACHE]/builder/src",
"env": {
@@ -2298,7 +2300,7 @@
"hostname": "rdbhost"
}
},
- "name": "test: lint ios_debug_sim"
+ "name": "test: lint host_debug"
},
{
"cmd": [
diff --git a/recipes/engine/engine_lint.proto b/recipes/engine/engine_lint.proto
index 1423e2f..ae3ca68 100644
--- a/recipes/engine/engine_lint.proto
+++ b/recipes/engine/engine_lint.proto
@@ -8,6 +8,21 @@
message InputProperties {
string goma_jobs = 1;
string jazzy_version = 2;
+
+ // Lint all source files unconditionally.
+ bool lint_all = 3;
+ // Lint only files changed in the tip-of-tree commit.
+ bool lint_head = 4;
+ // If those are both false, then the commit should be on a branch, and the
+ // files that are changed on the branch w.r.t. the upstream parent will be
+ // linted.
+
+ // Lint the files used for the host build.
+ bool lint_host = 5;
+ // Lint the files used for the Android embedder.
+ bool lint_android = 6;
+ // Lint the files used for the iOS embedder.
+ bool lint_ios = 7;
}
message EnvProperties {
diff --git a/recipes/engine/engine_lint.py b/recipes/engine/engine_lint.py
index 425d75c..166544d 100644
--- a/recipes/engine/engine_lint.py
+++ b/recipes/engine/engine_lint.py
@@ -53,36 +53,43 @@
checkout = GetCheckoutPath(api)
with api.context(cwd=checkout):
lint_cmd = checkout.join('flutter', 'ci', 'lint.sh')
- api.step(
- api.test_utils.test_step_name('lint %s' % config),
- [lint_cmd, '--lint-all', '--variant', config],
- )
+ cmd = [lint_cmd, '--variant', config]
+ if api.properties.get('lint_all', True):
+ cmd += ['--lint-all']
+ if api.properties.get('lint_head', False):
+ cmd += ['--lint-head']
+ api.step(api.test_utils.test_step_name('lint %s' % config), cmd)
def DoLints(api):
if api.platform.is_linux:
- RunGN(api, '--runtime-mode', 'debug', '--prebuilt-dart-sdk', '--no-lto')
- # We have to build before linting because source files #include header
- # files that are generated during the build.
- Build(api, 'host_debug')
- Lint(api, 'host_debug')
+ if api.properties.get('lint_android', True):
+ RunGN(api, '--android', '--android-cpu', 'arm64', '--no-lto')
+ Build(api, 'android_debug_arm64')
+ Lint(api, 'android_debug_arm64')
- RunGN(api, '--android', '--android-cpu', 'arm64', '--no-lto')
- Build(api, 'android_debug_arm64')
- Lint(api, 'android_debug_arm64')
-
- if api.platform.is_mac:
- with api.osx_sdk('ios'):
+ if api.properties.get('lint_host', True):
RunGN(api, '--runtime-mode', 'debug', '--prebuilt-dart-sdk', '--no-lto')
# We have to build before linting because source files #include header
# files that are generated during the build.
Build(api, 'host_debug')
Lint(api, 'host_debug')
- RunGN(
- api, '--ios', '--runtime-mode', 'debug', '--simulator', '--no-lto',
- )
- Build(api, 'ios_debug_sim')
- Lint(api, 'ios_debug_sim')
+
+ elif api.platform.is_mac:
+ with api.osx_sdk('ios'):
+ if api.properties.get('lint_ios', True):
+ RunGN(
+ api, '--ios', '--runtime-mode', 'debug', '--simulator', '--no-lto',
+ )
+ Build(api, 'ios_debug_sim')
+ Lint(api, 'ios_debug_sim')
+
+ if api.properties.get('lint_host', True):
+ RunGN(api, '--runtime-mode', 'debug', '--prebuilt-dart-sdk', '--no-lto')
+ # We have to build before linting because source files #include header
+ # files that are generated during the build.
+ Build(api, 'host_debug')
+ Lint(api, 'host_debug')
def RunSteps(api, properties, env_properties):
@@ -144,24 +151,35 @@
# pylint: enable=line-too-long
def GenTests(api):
for platform in ('mac', 'linux'):
- test = api.test(
- '%s' % (
- platform,
- ),
- api.platform(platform, 64),
- api.buildbucket.ci_build(
- builder='%s Engine Lint' % platform.capitalize(),
- git_repo=GIT_REPO,
- project='flutter',
- ),
- api.runtime(is_experimental=False),
- api.properties(
- InputProperties(
- goma_jobs='1024',
+ for lint_set in ('all', 'head', 'branch'):
+ for lint_target in ('host', 'ios', 'android'):
+ if lint_target == 'ios' and platform == 'linux':
+ continue
+ if lint_target == 'android' and platform == 'mac':
+ continue
+ test = api.test(
+ '%s %s %s' % (
+ platform, lint_target, lint_set,
),
- ),
- api.properties.environ(
- EnvProperties(SWARMING_TASK_ID='deadbeef')
- ),
- )
- yield test
+ api.platform(platform, 64),
+ api.buildbucket.ci_build(
+ builder='%s Engine Lint' % platform.capitalize(),
+ git_repo=GIT_REPO,
+ project='flutter',
+ ),
+ api.runtime(is_experimental=False),
+ api.properties(
+ InputProperties(
+ goma_jobs='1024',
+ lint_all=lint_set == 'all',
+ lint_head=lint_set == 'head',
+ lint_host=lint_target == 'host',
+ lint_android=lint_target == 'android',
+ lint_ios=lint_target == 'ios',
+ ),
+ ),
+ api.properties.environ(
+ EnvProperties(SWARMING_TASK_ID='deadbeef')
+ ),
+ )
+ yield test