Revert "Run mac test under xcode for tester_engine"
This reverts commit 5bc9d9dd89872ebe8632b456d4d56a10cf504c64.
Reason for revert: This caused engine tree closure.
Original change's description:
> Run mac test under xcode for tester_engine
>
> This CL:
> 1) put xcode installation under context
> 2) put contexts arguments to api.flutter_deps.contexts, instead of appending arguments at each context iteration. This makes the module to handle more general cases not limited to (env, env_prefix).
>
> LED run based on https://github.com/flutter/engine/pull/43115:
> https://luci-milo.appspot.com/raw/build/logs.chromium.org/flutter/led/keyonghan_google.com/57dfaf1802c4b6aeae753e5a70c4993301edf90d88fa6dc06e5296b890434974/+/build.proto
>
> Change-Id: Iad47e624c2ae3625b424e5610199d332d1709c6a
> Bug: https://github.com/flutter/flutter/issues/129366
> Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/46380
> Reviewed-by: Godofredo Contreras <godofredoc@google.com>
> Commit-Queue: Keyong Han <keyonghan@google.com>
TBR=godofredoc@google.com,keyonghan@google.com,flutter-scoped@luci-project-accounts.iam.gserviceaccount.com,ricardoamador@google.com
Change-Id: I2e39b25f894b13c13e9b7d25bb1a54eeb6e4ee10
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/flutter/flutter/issues/129366
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/46521
Reviewed-by: Keyong Han <keyonghan@google.com>
Commit-Queue: Keyong Han <keyonghan@google.com>
diff --git a/recipe_modules/flutter_deps/__init__.py b/recipe_modules/flutter_deps/__init__.py
index d927778..93c7c84 100644
--- a/recipe_modules/flutter_deps/__init__.py
+++ b/recipe_modules/flutter_deps/__init__.py
@@ -1,6 +1,5 @@
DEPS = [
'flutter/android_virtual_device',
- 'flutter/osx_sdk',
'flutter/repo_util',
'flutter/test_utils',
'flutter/token_util',
diff --git a/recipe_modules/flutter_deps/api.py b/recipe_modules/flutter_deps/api.py
index c0326ce..a7a6310 100644
--- a/recipe_modules/flutter_deps/api.py
+++ b/recipe_modules/flutter_deps/api.py
@@ -684,12 +684,8 @@
temp_paths.append(jazzy_path.join('ruby', ruby_version, 'bin'))
env_prefixes['PATH'] = temp_paths
- def contexts(self, env, env_prefixes):
+ def contexts(self):
return {
- 'metric_center_token':
- self.m.token_util.metric_center_token(env, env_prefixes),
- 'android_virtual_device':
- self.m.android_virtual_device(env, env_prefixes),
- 'osx_sdk':
- self.m.osx_sdk('ios'),
+ 'metric_center_token': self.m.token_util.metric_center_token,
+ 'android_virtual_device': self.m.android_virtual_device
}
diff --git a/recipe_modules/flutter_deps/examples/full.py b/recipe_modules/flutter_deps/examples/full.py
index 2c613a1..7545867 100644
--- a/recipe_modules/flutter_deps/examples/full.py
+++ b/recipe_modules/flutter_deps/examples/full.py
@@ -69,7 +69,7 @@
api.flutter_deps.certs(env, env_prefixes, '')
api.flutter_deps.vs_build(env, env_prefixes, '')
api.flutter_deps.jazzy(env, env_prefixes, '')
- api.flutter_deps.contexts(env, env_prefixes)
+ api.flutter_deps.contexts()
if api.platform.is_linux:
api.flutter_deps.gh_cli(env, env_prefixes, 'latest')
diff --git a/recipes/engine_v2/builder.py b/recipes/engine_v2/builder.py
index e55945d..84d5ec4 100644
--- a/recipes/engine_v2/builder.py
+++ b/recipes/engine_v2/builder.py
@@ -112,13 +112,13 @@
def run_tests(api, tests, checkout, env, env_prefixes):
"""Runs sub-build tests."""
- available_contexts = api.flutter_deps.contexts(env, env_prefixes)
+ available_contexts = api.flutter_deps.contexts()
# Run local tests in the builder to optimize resource usage.
for test in tests:
# Run tests within a exitStack context
with contextlib.ExitStack() as exit_stack:
for context in test.get('contexts', []):
- exit_stack.enter_context(available_contexts[context])
+ exit_stack.enter_context(available_contexts[context](env, env_prefixes))
command = [test.get('language')] if test.get('language') else []
# Ideally local tests should be completely hermetic and in theory we can run
# them in parallel using futures. I haven't found a flutter engine
diff --git a/recipes/engine_v2/tester_engine.expected/basic.json b/recipes/engine_v2/tester_engine.expected/basic.json
index e4ce260..b225468 100644
--- a/recipes/engine_v2/tester_engine.expected/basic.json
+++ b/recipes/engine_v2/tester_engine.expected/basic.json
@@ -689,9 +689,13 @@
"ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
"ANDROID_SDK_HOME": "[CLEANUP]/tmp_tmp_1",
"ANDROID_USER_HOME": "[CLEANUP]/tmp_tmp_1/.android",
+ "CHROME_EXECUTABLE": "[CACHE]/chrome/chrome/chrome",
+ "CHROME_NO_SANDBOX": "true",
"DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
"ENGINE_CHECKOUT_PATH": "[CACHE]/builder",
"ENGINE_PATH": "[CACHE]/builder",
+ "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+ "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
"GIT_BRANCH": "",
"LUCI_BRANCH": "",
"LUCI_CI": "True",
@@ -702,6 +706,9 @@
},
"env_prefixes": {
"PATH": [
+ "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin",
+ "[CACHE]/chrome/chrome",
+ "[CACHE]/chrome/drivers",
"[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
]
},
diff --git a/recipes/engine_v2/tester_engine.py b/recipes/engine_v2/tester_engine.py
index a274620..e4356d6 100644
--- a/recipes/engine_v2/tester_engine.py
+++ b/recipes/engine_v2/tester_engine.py
@@ -45,7 +45,6 @@
This recipe will be called from the engine_v2/engine_v2 recipe using the shard_util_v2 module. The
test configuration is defined in the engine build configurations files as global tests.
"""
-import contextlib
import copy
from contextlib import contextmanager
@@ -59,7 +58,6 @@
'depot_tools/depot_tools',
'flutter/flutter_deps',
'flutter/logs_util',
- 'flutter/osx_sdk',
'flutter/repo_util',
'flutter/retry',
'flutter/test_utils',
@@ -67,7 +65,6 @@
'recipe_engine/context',
'recipe_engine/file',
'recipe_engine/path',
- 'recipe_engine/platform',
'recipe_engine/properties',
'recipe_engine/step',
]
@@ -105,10 +102,7 @@
try:
# Run within another context to make the logs env variable available to
# test scripts.
- available_contexts = api.flutter_deps.contexts(env, env_prefixes)
- with contextlib.ExitStack() as exit_stack:
- for context in test.get('contexts', []):
- exit_stack.enter_context(available_contexts[context])
+ with api.context(env=env, env_prefixes=env_prefixes):
api.retry.wrap(
run_test,
step_name=task.get('name'),
@@ -156,7 +150,7 @@
'language': 'dart', 'name': 'felt test: chrome-unit-linux',
'parameters': ['test', '--browser=chrome', '--require-skia-gold'],
'script': 'flutter/lib/web_ui/dev/felt'
- }], "contexts": ["osx_sdk"]
+ }]
}
yield api.test(
'basic',