Shows the image when clone a suite job or its child job.

BUG=chromium:485813
TEST=unit test and manual test.

Change-Id: I044991928513cea2c06eb6db8b31eeba6ea29289
Reviewed-on: https://chromium-review.googlesource.com/348482
Commit-Ready: Michael Tang <ntang@chromium.org>
Tested-by: Michael Tang <ntang@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Reviewed-by: Michael Tang <ntang@chromium.org>
diff --git a/frontend/afe/site_rpc_interface.py b/frontend/afe/site_rpc_interface.py
index a629f58..6077326 100644
--- a/frontend/afe/site_rpc_interface.py
+++ b/frontend/afe/site_rpc_interface.py
@@ -153,7 +153,7 @@
                      max_retries=None, max_runtime_mins=None, suite_min_duts=0,
                      offload_failures_only=False, builds={},
                      test_source_build=None, run_prod_code=False,
-                     delay_minutes=0, **kwargs):
+                     delay_minutes=0, is_cloning=False, **kwargs):
     """
     Create a job to run a test suite on the given device with the given image.
 
@@ -201,6 +201,7 @@
                           build artifacts.
     @param delay_minutes: Delay the creation of test jobs for a given number of
                           minutes.
+    @param is_cloning: True if creating a cloning job.
     @param kwargs: extra keyword args. NOT USED.
 
     @raises ControlFileNotFound: if a unique suite control file doesn't exist.
@@ -292,6 +293,8 @@
                    'delay_minutes': delay_minutes,
                    }
 
+    if is_cloning:
+        control_file = tools.remove_injection(control_file)
     control_file = tools.inject_vars(inject_dict, control_file)
 
     return rpc_utils.create_job_common(name,
@@ -1029,7 +1032,7 @@
         try:
             control_obj = control_data.parse_control_string(control_file)
         except:
-            logging.info('Failed to parse congtrol file: %s', control_file_path)
+            logging.info('Failed to parse control file: %s', control_file_path)
             if not ignore_invalid_tests:
                 raise