autotest: Don't retry canceled tasks.

BUG=chromium:828662
TEST=Ran "bin/run_suite_skylab --board=lumpy --suite_name=bvt-inline
--build=lumpy-release/R65-10323.58.0 --priority 10 --timeout_mins 5
--test_retry --max_retries 5"

Change-Id: Ic14f1de933ac04db76c56bb4be7ecf38383cbdb6
Reviewed-on: https://chromium-review.googlesource.com/1101716
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
Commit-Queue: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
diff --git a/venv/skylab_suite/cros_suite.py b/venv/skylab_suite/cros_suite.py
index 592525e..f982665 100644
--- a/venv/skylab_suite/cros_suite.py
+++ b/venv/skylab_suite/cros_suite.py
@@ -236,7 +236,7 @@
         is_failure = test_result['failure']
         return (self._test_retry and
                 ((state == swarming_lib.TASK_COMPLETED and is_failure)
-                 or (state in swarming_lib.TASK_FAILED_STATUS))
+                 or (state in swarming_lib.TASK_STATUS_TO_RETRY))
                 and (task_id in self._task_to_test_maps)
                 and (self._task_to_test_maps[task_id].remaining_retries > 0)
                 and (self._max_retries > 0))