[autotest] Modify option no_wait for a suite job to fire and forget
no_wait is an option in run_suite for the script to exit without waiting for
the suite job to finish.
To prevent a suite job from holding on a process slot in drone for a long time.
The usage of no_wait option is expended so that the suite job can exit once all
test jobs are created, without waiting for all test jobs to finish.
related CL for test_suites:
https://chromium-review.googlesource.com/#/c/177309/
BUG=chromium:316990
TEST=trybot build: trybot-lumpy-paladin/R33-4997.0.0-b1385
then run_suite in local setup:
./run_suite.py --build=lumpy-release/R33-4933.0.0 --board=lumpy
--suite_name=dummy -p bvt --no_wait=True
Confirm the suite job is completed right after the test jobs are scheduled.
DEPLOY=apache
Change-Id: I039a50371f9c5ebe8c8e155a9aabfb37999be4e2
Reviewed-on: https://chromium-review.googlesource.com/176601
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
diff --git a/frontend/afe/site_rpc_interface.py b/frontend/afe/site_rpc_interface.py
index fc7de1f..f69da13 100644
--- a/frontend/afe/site_rpc_interface.py
+++ b/frontend/afe/site_rpc_interface.py
@@ -81,7 +81,7 @@
def create_suite_job(suite_name, board, build, pool, check_hosts=True,
num=None, file_bugs=False, timeout=24, timeout_mins=None,
priority=priorities.Priority.DEFAULT,
- suite_args=None):
+ suite_args=None, wait_for_results=True):
"""
Create a job to run a test suite on the given device with the given image.
@@ -104,6 +104,8 @@
@param suite_args: Optional arguments which will be parsed by the suite
control file. Used by control.test_that_wrapper to
determine which tests to run.
+ @param wait_for_results: Set to False to run the suite job without waiting
+ for test jobs to finish. Default is True.
@raises ControlFileNotFound: if a unique suite control file doesn't exist.
@raises NoControlFileList: if we can't list the control files at all.
@@ -152,7 +154,8 @@
'timeout_mins': timeout_mins,
'devserver_url': ds.url(),
'priority': priority,
- 'suite_args' : suite_args
+ 'suite_args' : suite_args,
+ 'wait_for_results': wait_for_results
}
control_file = tools.inject_vars(inject_dict, control_file_in)