Added ability to specify env through android_ACTS

Extra environment info can be specified through android_ACTS param
testtracker_extra_env. This will allow post processsing to use
the extra environment info.

TEST=Ran a test, looked at output.
BUG=b:36812250

Change-Id: I58fac0edf3ecce364edbdf19a0b527a881666c5f
Reviewed-on: https://chromium-review.googlesource.com/469288
Commit-Ready: Kris Rambish <krisr@chromium.org>
Tested-by: Kris Rambish <krisr@chromium.org>
Reviewed-by: Kris Rambish <krisr@chromium.org>
diff --git a/server/site_tests/android_ACTS/android_ACTS.py b/server/site_tests/android_ACTS/android_ACTS.py
index 024bf81..4ab35e5 100644
--- a/server/site_tests/android_ACTS/android_ACTS.py
+++ b/server/site_tests/android_ACTS/android_ACTS.py
@@ -46,7 +46,8 @@
                  acts_timeout=7200,
                  perma_path=None,
                  additional_cmd_line_params=None,
-                 testtracker_project_id=None):
+                 testtracker_project_id=None,
+                 testtracker_extra_env=None):
         """Runs an acts test case.
 
         @param testbed: The testbed to test on.
@@ -79,7 +80,9 @@
         @param acts_timeout: How long to wait for acts to finish.
         @param perma_path: If given a permantent path will be used rather than
                            a temp path.
-        @parm testtracker_project_id: ID to use for test tracker project.
+        @param testtracker_project_id: ID to use for test tracker project.
+        @param testtracker_extra_env: Extra environment info to publish
+                                      with the results.
         """
         host = next(v for v in testbed.get_adb_devices().values())
 
diff --git a/site_utils/sponge_lib/acts_job_info.py b/site_utils/sponge_lib/acts_job_info.py
index 22c4e12..a7f9e99 100644
--- a/site_utils/sponge_lib/acts_job_info.py
+++ b/site_utils/sponge_lib/acts_job_info.py
@@ -145,6 +145,19 @@
         return self.build_info.get('build_prop', {}).get('ro.product.board',
                                                          UNKNOWN_ENV_NAME)
 
+    @property
+    def extra_environment(self):
+        """Extra environment info about the task."""
+        if 'param-testtracker_extra_env' in self.keyvals:
+            extra = self.keyvals.get('param-testtracker_extra_env', [])
+        else:
+            extra = self.keyvals.get('param-testtracker_extra_env', [])
+
+        if not isinstance(extra, list):
+            extra = [extra]
+
+        return extra
+
 
 class ACTSRecord(object):
     """A single record of a test case in an ACTS test."""