platform2: add colorized output support when running tests

BUG=chromium:312931
TEST=Run tests, see colorized output for PASS/FAIL/filter warnings

Change-Id: I0d3bd7215fb4a941adef724f8c8e530bfd092eaf
Reviewed-on: https://chromium-review.googlesource.com/182890
Reviewed-by: Mike Frysinger <[email protected]>
Commit-Queue: Liam McLoughlin <[email protected]>
Tested-by: Liam McLoughlin <[email protected]>
diff --git a/platform2_test.py b/platform2_test.py
index e03a75e..83979e2 100755
--- a/platform2_test.py
+++ b/platform2_test.py
@@ -154,6 +154,9 @@
 
     env['LD_LIBRARY_PATH'] = ':'.join(ld_paths)
 
+    # Passthrough TERM so that we get colors in test output where supported.
+    env['TERM'] = os.environ.get("TERM")
+
     if self.run_as_root or self.framework == 'qemu':
       cmd.append('sudo')
       for var, val in env.items():