aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules/sktest
diff options
context:
space:
mode:
authorGravatar Kevin Lubick <kjlubick@google.com>2017-02-13 10:35:39 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-13 16:20:06 +0000
commite4fd9d0463b219170d5d6507955906825fbf8fc6 (patch)
treee457df47464463ed8a7456bf83470ccd360fd8f7 /infra/bots/recipe_modules/sktest
parent267be7fbc38174652c750ec69d8dc1feaa72db0c (diff)
Clean up hack of run api
Also fix such that the Nexus Players get kicked three times not one and a half times. BUG=skia:6045 Change-Id: Ie9142f809a979a46b17a8ad9a205279d6fcb9bd5 Reviewed-on: https://skia-review.googlesource.com/8266 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
Diffstat (limited to 'infra/bots/recipe_modules/sktest')
-rw-r--r--infra/bots/recipe_modules/sktest/api.py3
-rw-r--r--infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android.json7
-rw-r--r--infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan.json7
-rw-r--r--infra/bots/recipe_modules/sktest/example.expected/failed_dm.json2
-rw-r--r--infra/bots/recipe_modules/sktest/example.expected/failed_push.json7
5 files changed, 13 insertions, 13 deletions
diff --git a/infra/bots/recipe_modules/sktest/api.py b/infra/bots/recipe_modules/sktest/api.py
index 35852792bb..df97a159d0 100644
--- a/infra/bots/recipe_modules/sktest/api.py
+++ b/infra/bots/recipe_modules/sktest/api.py
@@ -584,9 +584,6 @@ class TestApi(recipe_api.RecipeApi):
try:
self.m.flavor.install_everything()
test_steps(self.m)
- except recipe_api.InfraFailure as e:
- self.m.run.add_failed_step(e)
- raise
finally:
self.m.flavor.cleanup_steps()
self.m.run.check_failure()
diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android.json
index a10f03b672..79b63ed377 100644
--- a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android.json
+++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android.json
@@ -11,7 +11,7 @@
"cmd": [
"python",
"-u",
- "\nimport subprocess\nimport sys\nimport time\n\nkicks = 0\nwhile kicks < 2:\n\n times = 0\n\n while times < 30:\n print 'Waiting for the device to be connected and ready.'\n try:\n times += 1\n output = subprocess.check_output(['adb', 'shell',\n 'getprop', 'sys.boot_completed'])\n if '1' in output:\n print 'Connected'\n sys.exit(0)\n except subprocess.CalledProcessError:\n # no device connected/authorized yet\n pass\n time.sleep(5)\n print 'Giving the device a \"kick\" by trying to reboot it.'\n kicks += 1\n print subprocess.check_output(['adb', 'reboot'])\n\nprint 'Timed out waiting for device'\nsys.exit(1)\n"
+ "\nimport subprocess\nimport sys\nimport time\n\nkicks = 0\nwhile True:\n\n times = 0\n while times < 30:\n print 'Waiting for the device to be connected and ready.'\n try:\n times += 1\n output = subprocess.check_output(['adb', 'shell',\n 'getprop', 'sys.boot_completed'])\n if '1' in output:\n print 'Connected'\n sys.exit(0)\n except subprocess.CalledProcessError:\n # no device connected/authorized yet\n pass\n time.sleep(5)\n if kicks >= 3:\n break\n print 'Giving the device a \"kick\" by trying to reboot it.'\n kicks += 1\n print subprocess.check_output(['adb', 'reboot'])\n\nprint 'Timed out waiting for device'\nsys.exit(1)\n"
],
"name": "wait for device",
"~followup_annotations": [
@@ -21,10 +21,9 @@
"@@@STEP_LOG_LINE@python.inline@import time@@@",
"@@@STEP_LOG_LINE@python.inline@@@@",
"@@@STEP_LOG_LINE@python.inline@kicks = 0@@@",
- "@@@STEP_LOG_LINE@python.inline@while kicks < 2:@@@",
+ "@@@STEP_LOG_LINE@python.inline@while True:@@@",
"@@@STEP_LOG_LINE@python.inline@@@@",
"@@@STEP_LOG_LINE@python.inline@ times = 0@@@",
- "@@@STEP_LOG_LINE@python.inline@@@@",
"@@@STEP_LOG_LINE@python.inline@ while times < 30:@@@",
"@@@STEP_LOG_LINE@python.inline@ print 'Waiting for the device to be connected and ready.'@@@",
"@@@STEP_LOG_LINE@python.inline@ try:@@@",
@@ -38,6 +37,8 @@
"@@@STEP_LOG_LINE@python.inline@ # no device connected/authorized yet@@@",
"@@@STEP_LOG_LINE@python.inline@ pass@@@",
"@@@STEP_LOG_LINE@python.inline@ time.sleep(5)@@@",
+ "@@@STEP_LOG_LINE@python.inline@ if kicks >= 3:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ break@@@",
"@@@STEP_LOG_LINE@python.inline@ print 'Giving the device a \"kick\" by trying to reboot it.'@@@",
"@@@STEP_LOG_LINE@python.inline@ kicks += 1@@@",
"@@@STEP_LOG_LINE@python.inline@ print subprocess.check_output(['adb', 'reboot'])@@@",
diff --git a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan.json b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan.json
index 0bb554425a..492b336994 100644
--- a/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan.json
+++ b/infra/bots/recipe_modules/sktest/example.expected/Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android_Vulkan.json
@@ -11,7 +11,7 @@
"cmd": [
"python",
"-u",
- "\nimport subprocess\nimport sys\nimport time\n\nkicks = 0\nwhile kicks < 2:\n\n times = 0\n\n while times < 30:\n print 'Waiting for the device to be connected and ready.'\n try:\n times += 1\n output = subprocess.check_output(['adb', 'shell',\n 'getprop', 'sys.boot_completed'])\n if '1' in output:\n print 'Connected'\n sys.exit(0)\n except subprocess.CalledProcessError:\n # no device connected/authorized yet\n pass\n time.sleep(5)\n print 'Giving the device a \"kick\" by trying to reboot it.'\n kicks += 1\n print subprocess.check_output(['adb', 'reboot'])\n\nprint 'Timed out waiting for device'\nsys.exit(1)\n"
+ "\nimport subprocess\nimport sys\nimport time\n\nkicks = 0\nwhile True:\n\n times = 0\n while times < 30:\n print 'Waiting for the device to be connected and ready.'\n try:\n times += 1\n output = subprocess.check_output(['adb', 'shell',\n 'getprop', 'sys.boot_completed'])\n if '1' in output:\n print 'Connected'\n sys.exit(0)\n except subprocess.CalledProcessError:\n # no device connected/authorized yet\n pass\n time.sleep(5)\n if kicks >= 3:\n break\n print 'Giving the device a \"kick\" by trying to reboot it.'\n kicks += 1\n print subprocess.check_output(['adb', 'reboot'])\n\nprint 'Timed out waiting for device'\nsys.exit(1)\n"
],
"name": "wait for device",
"~followup_annotations": [
@@ -21,10 +21,9 @@
"@@@STEP_LOG_LINE@python.inline@import time@@@",
"@@@STEP_LOG_LINE@python.inline@@@@",
"@@@STEP_LOG_LINE@python.inline@kicks = 0@@@",
- "@@@STEP_LOG_LINE@python.inline@while kicks < 2:@@@",
+ "@@@STEP_LOG_LINE@python.inline@while True:@@@",
"@@@STEP_LOG_LINE@python.inline@@@@",
"@@@STEP_LOG_LINE@python.inline@ times = 0@@@",
- "@@@STEP_LOG_LINE@python.inline@@@@",
"@@@STEP_LOG_LINE@python.inline@ while times < 30:@@@",
"@@@STEP_LOG_LINE@python.inline@ print 'Waiting for the device to be connected and ready.'@@@",
"@@@STEP_LOG_LINE@python.inline@ try:@@@",
@@ -38,6 +37,8 @@
"@@@STEP_LOG_LINE@python.inline@ # no device connected/authorized yet@@@",
"@@@STEP_LOG_LINE@python.inline@ pass@@@",
"@@@STEP_LOG_LINE@python.inline@ time.sleep(5)@@@",
+ "@@@STEP_LOG_LINE@python.inline@ if kicks >= 3:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ break@@@",
"@@@STEP_LOG_LINE@python.inline@ print 'Giving the device a \"kick\" by trying to reboot it.'@@@",
"@@@STEP_LOG_LINE@python.inline@ kicks += 1@@@",
"@@@STEP_LOG_LINE@python.inline@ print subprocess.check_output(['adb', 'reboot'])@@@",
diff --git a/infra/bots/recipe_modules/sktest/example.expected/failed_dm.json b/infra/bots/recipe_modules/sktest/example.expected/failed_dm.json
index 50340337e9..80e237ce81 100644
--- a/infra/bots/recipe_modules/sktest/example.expected/failed_dm.json
+++ b/infra/bots/recipe_modules/sktest/example.expected/failed_dm.json
@@ -528,7 +528,7 @@
},
{
"name": "$result",
- "reason": "Failed build steps: dm",
+ "reason": "Failed build steps: dm, dm",
"recipe_result": null,
"status_code": 1
}
diff --git a/infra/bots/recipe_modules/sktest/example.expected/failed_push.json b/infra/bots/recipe_modules/sktest/example.expected/failed_push.json
index d14609563a..02962fb94a 100644
--- a/infra/bots/recipe_modules/sktest/example.expected/failed_push.json
+++ b/infra/bots/recipe_modules/sktest/example.expected/failed_push.json
@@ -11,7 +11,7 @@
"cmd": [
"python",
"-u",
- "\nimport subprocess\nimport sys\nimport time\n\nkicks = 0\nwhile kicks < 2:\n\n times = 0\n\n while times < 30:\n print 'Waiting for the device to be connected and ready.'\n try:\n times += 1\n output = subprocess.check_output(['adb', 'shell',\n 'getprop', 'sys.boot_completed'])\n if '1' in output:\n print 'Connected'\n sys.exit(0)\n except subprocess.CalledProcessError:\n # no device connected/authorized yet\n pass\n time.sleep(5)\n print 'Giving the device a \"kick\" by trying to reboot it.'\n kicks += 1\n print subprocess.check_output(['adb', 'reboot'])\n\nprint 'Timed out waiting for device'\nsys.exit(1)\n"
+ "\nimport subprocess\nimport sys\nimport time\n\nkicks = 0\nwhile True:\n\n times = 0\n while times < 30:\n print 'Waiting for the device to be connected and ready.'\n try:\n times += 1\n output = subprocess.check_output(['adb', 'shell',\n 'getprop', 'sys.boot_completed'])\n if '1' in output:\n print 'Connected'\n sys.exit(0)\n except subprocess.CalledProcessError:\n # no device connected/authorized yet\n pass\n time.sleep(5)\n if kicks >= 3:\n break\n print 'Giving the device a \"kick\" by trying to reboot it.'\n kicks += 1\n print subprocess.check_output(['adb', 'reboot'])\n\nprint 'Timed out waiting for device'\nsys.exit(1)\n"
],
"name": "wait for device",
"~followup_annotations": [
@@ -21,10 +21,9 @@
"@@@STEP_LOG_LINE@python.inline@import time@@@",
"@@@STEP_LOG_LINE@python.inline@@@@",
"@@@STEP_LOG_LINE@python.inline@kicks = 0@@@",
- "@@@STEP_LOG_LINE@python.inline@while kicks < 2:@@@",
+ "@@@STEP_LOG_LINE@python.inline@while True:@@@",
"@@@STEP_LOG_LINE@python.inline@@@@",
"@@@STEP_LOG_LINE@python.inline@ times = 0@@@",
- "@@@STEP_LOG_LINE@python.inline@@@@",
"@@@STEP_LOG_LINE@python.inline@ while times < 30:@@@",
"@@@STEP_LOG_LINE@python.inline@ print 'Waiting for the device to be connected and ready.'@@@",
"@@@STEP_LOG_LINE@python.inline@ try:@@@",
@@ -38,6 +37,8 @@
"@@@STEP_LOG_LINE@python.inline@ # no device connected/authorized yet@@@",
"@@@STEP_LOG_LINE@python.inline@ pass@@@",
"@@@STEP_LOG_LINE@python.inline@ time.sleep(5)@@@",
+ "@@@STEP_LOG_LINE@python.inline@ if kicks >= 3:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ break@@@",
"@@@STEP_LOG_LINE@python.inline@ print 'Giving the device a \"kick\" by trying to reboot it.'@@@",
"@@@STEP_LOG_LINE@python.inline@ kicks += 1@@@",
"@@@STEP_LOG_LINE@python.inline@ print subprocess.check_output(['adb', 'reboot'])@@@",