[autotest] Add a |file_bugs| flag to dynamic_suites.

A flag named |file_bugs| is now accepted as part of the create_suite_job
rpc call and |reimage_and_run| now takes an additional |file_bugs| flag
to indicate if bugs should be filed for test failures in the suite run.

TEST=local run_suite
BUG=chromium-os:29513

Change-Id: I7354ed463d22d6fe85abdfbf9fad1882e7bd9dc0
Reviewed-on: https://gerrit.chromium.org/gerrit/34476
Tested-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Ready: Alex Miller <milleral@chromium.org>
diff --git a/frontend/afe/site_rpc_interface.py b/frontend/afe/site_rpc_interface.py
index e5654ae..2cdeb73 100644
--- a/frontend/afe/site_rpc_interface.py
+++ b/frontend/afe/site_rpc_interface.py
@@ -70,7 +70,7 @@
 
 
 def create_suite_job(suite_name, board, build, pool, check_hosts=True,
-                     num=None):
+                     num=None, file_bugs=False):
     """
     Create a job to run a test suite on the given device with the given image.
 
@@ -84,6 +84,7 @@
             purposes.
     @param check_hosts: require appropriate live hosts to exist in the lab.
     @param num: Specify the number of machines to schedule across.
+    @param file_bugs: File a bug on each test failure in this suite.
 
     @raises ControlFileNotFound: if a unique suite control file doesn't exist.
     @raises NoControlFileList: if we can't list the control files at all.
@@ -128,7 +129,8 @@
                    'build': build,
                    'check_hosts': check_hosts,
                    'pool': pool,
-                   'num': numeric_num}
+                   'num': numeric_num,
+                   'file_bugs': file_bugs}
     control_file = tools.inject_vars(inject_dict, control_file_in)
 
     return _rpc_utils().create_job_common('%s-%s' % (build, suite_name),