Revert "Engine Android scenario test: Upload diff failures whenever they exist"
This reverts commit f7941d1ad3f605a586ed1742253065904b7e1617.
Reason for revert: was failing pre-submit with invalid cloud storage path
Original change's description:
> Engine Android scenario test: Upload diff failures whenever they exist
>
> Change-Id: I3bd0e55add17a50e2962d84a79923e174fd14279
> Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/9040
> Reviewed-by: Christopher Fujino <fujino@google.com>
> Commit-Queue: Emmanuel Garcia <egarciad@google.com>
TBR=godofredoc@google.com,flutter-scoped@luci-project-accounts.iam.gserviceaccount.com,fujino@google.com,egarciad@google.com
Change-Id: Ief45c56346143cf61ebffc4c32630d89ea98cd94
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/9060
Reviewed-by: Christopher Fujino <fujino@google.com>
Commit-Queue: Christopher Fujino <fujino@google.com>
diff --git a/recipes/engine/scenarios.expected/with_failure_upload_0.json b/recipes/engine/scenarios.expected/with_failure_upload_0.json
index 0749b4e..13b0ac7 100644
--- a/recipes/engine/scenarios.expected/with_failure_upload_0.json
+++ b/recipes/engine/scenarios.expected/with_failure_upload_0.json
@@ -1253,70 +1253,23 @@
},
{
"cmd": [],
- "name": "Killing Processes"
- },
- {
- "cmd": [
- "pkill",
- "chrome"
- ],
- "name": "Killing Processes.kill chrome",
+ "name": "RECIPE CRASH (Uncaught exception)",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
+ "@@@STEP_EXCEPTION@@@",
+ "The recipe has crashed at point 'Uncaught exception'!",
+ "",
+ "Traceback (most recent call last):",
+ " File \"RECIPE_REPO[flutter]/recipes/engine/scenarios.py\", line 151, in RunSteps",
+ " RunAndroidScenarioTests(api)",
+ " File \"RECIPE_REPO[flutter]/recipes/engine/scenarios.py\", line 118, in RunAndroidScenarioTests",
+ " raise AssertionError('Diff detected. Please verify the diff failures.')",
+ "AssertionError: Diff detected. Please verify the diff failures."
]
},
{
- "cmd": [
- "pkill",
- "dart"
- ],
- "name": "Killing Processes.kill dart",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "pkill",
- "flutter"
- ],
- "name": "Killing Processes.kill flutter",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "pkill",
- "java"
- ],
- "name": "Killing Processes.kill java",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "pkill",
- "adb"
- ],
- "name": "Killing Processes.kill adb",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "top",
- "-b",
- "-n",
- "3",
- "-o",
- "%MEM"
- ],
- "name": "OS info (2)"
- },
- {
+ "failure": {
+ "humanReason": "Uncaught Exception: AssertionError('Diff detected. Please verify the diff failures.',)"
+ },
"name": "$result"
}
]
\ No newline at end of file
diff --git a/recipes/engine/scenarios.expected/with_failure_upload_1.json b/recipes/engine/scenarios.expected/with_failure_upload_1.json
index af9334a..d26bc3e 100644
--- a/recipes/engine/scenarios.expected/with_failure_upload_1.json
+++ b/recipes/engine/scenarios.expected/with_failure_upload_1.json
@@ -1318,70 +1318,23 @@
},
{
"cmd": [],
- "name": "Killing Processes"
- },
- {
- "cmd": [
- "pkill",
- "chrome"
- ],
- "name": "Killing Processes.kill chrome",
+ "name": "RECIPE CRASH (Uncaught exception)",
"~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
+ "@@@STEP_EXCEPTION@@@",
+ "The recipe has crashed at point 'Uncaught exception'!",
+ "",
+ "Traceback (most recent call last):",
+ " File \"RECIPE_REPO[flutter]/recipes/engine/scenarios.py\", line 151, in RunSteps",
+ " RunAndroidScenarioTests(api)",
+ " File \"RECIPE_REPO[flutter]/recipes/engine/scenarios.py\", line 118, in RunAndroidScenarioTests",
+ " raise AssertionError('Diff detected. Please verify the diff failures.')",
+ "AssertionError: Diff detected. Please verify the diff failures."
]
},
{
- "cmd": [
- "pkill",
- "dart"
- ],
- "name": "Killing Processes.kill dart",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "pkill",
- "flutter"
- ],
- "name": "Killing Processes.kill flutter",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "pkill",
- "java"
- ],
- "name": "Killing Processes.kill java",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "pkill",
- "adb"
- ],
- "name": "Killing Processes.kill adb",
- "~followup_annotations": [
- "@@@STEP_NEST_LEVEL@1@@@"
- ]
- },
- {
- "cmd": [
- "top",
- "-b",
- "-n",
- "3",
- "-o",
- "%MEM"
- ],
- "name": "OS info (2)"
- },
- {
+ "failure": {
+ "humanReason": "Uncaught Exception: AssertionError('Diff detected. Please verify the diff failures.',)"
+ },
"name": "$result"
}
]
\ No newline at end of file
diff --git a/recipes/engine/scenarios.py b/recipes/engine/scenarios.py
index 9cc898c..5318974 100644
--- a/recipes/engine/scenarios.py
+++ b/recipes/engine/scenarios.py
@@ -107,14 +107,15 @@
ok_ret='all'
)
api.step('Kill emulator', ['kill', '-9', emulator_pid])
- build_failures_dir = scenario_app_tests.join('build', 'reports', 'diff_failures')
- if api.path.exists(build_failures_dir):
+ build_failures_dir = scenario_app_tests.join('build', 'reports', 'failures')
+ if result.exc_result.retcode != 0 and api.path.exists(build_failures_dir):
# Upload any diff failures.
# If there are any, upload them to the cloud bucket.
api.bucket_util.upload_folder(
'Upload diff failures', 'src/flutter/testing/scenario_app',
'build/reports/diff_failures', 'diff_failures.zip'
)
+ raise AssertionError('Diff detected. Please verify the diff failures.')
def RunSteps(api, properties, env_properties):
@@ -158,7 +159,7 @@
def GenTests(api):
scenario_failures = GetCheckoutPath(api).join(
- 'flutter', 'testing', 'scenario_app', 'build', 'reports', 'diff_failures'
+ 'flutter', 'testing', 'scenario_app', 'build', 'reports', 'failures'
)
for upload_packages in (True, False):
yield api.test(
@@ -174,7 +175,7 @@
goma_jobs='1024',
upload_packages=upload_packages,
),
- ),
+ ), api.path.exists(scenario_failures),
api.step_data(
'Start Android emulator (API level 28)',
stdout=api.raw_io.output_text(
@@ -200,6 +201,7 @@
# Makes the test fail.
api.step_data('Scenario App Integration Tests', retcode=1),
api.path.exists(scenario_failures),
+ api.expect_exception('AssertionError'),
api.step_data(
'Start Android emulator (API level 28)',
stdout=api.raw_io.output_text(