Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Unified Diff: appengine/findit/waterfall/swarming_util.py

Issue 2312413002: [Findit] Record error if swarming task completes with exit_code as 2. (Closed)
Patch Set: . Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/findit/waterfall/swarming_util.py
diff --git a/appengine/findit/waterfall/swarming_util.py b/appengine/findit/waterfall/swarming_util.py
index 23f4d480a327d161cca64c6610838e2db48985e1..57766f3b0cd231620e7bf105e94bf6eecfbb2e95 100644
--- a/appengine/findit/waterfall/swarming_util.py
+++ b/appengine/findit/waterfall/swarming_util.py
@@ -22,6 +22,16 @@ STATE_COMPLETED = 'COMPLETED'
STATES_NOT_RUNNING = (
'EXPIRED', 'TIMED_OUT', 'BOT_DIED', 'CANCELED', 'COMPLETED')
+ALL_TESTS_PASSED = 0
+SOME_TESTS_FAILED = 1
+TASK_FAILED = 2
+
+EXIT_CODE_DESCRIPTIONS = {
+ ALL_TESTS_PASSED: 'all tests passed',
+ SOME_TESTS_FAILED: 'some tests failed',
+ TASK_FAILED: 'swarming task failed'
+}
+
def _SendRequestToServer(url, http_client, post_data=None):
"""Sends GET/POST request to arbitrary url and returns response content."""
@@ -213,6 +223,9 @@ def _FetchOutputJsonInfoFromIsolatedServer(isolated_data, http_client):
1. hash code for the output.json file,
2. the redirect url.
"""
+ if not isolated_data:
+ return None
+
post_data = {
'digest': isolated_data['digest'],
'namespace': {

Powered by Google App Engine
This is Rietveld 408576698