Add branch option to CtsBuildProvider

Add branch option to make the result reporting consistent
based on IBuildInfo fields.

Bug: 26118532
Change-Id: I462781aa79b82eb66594d96558d5391edfe67630
diff --git a/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java b/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java
index ca67746..c1ab1f1 100644
--- a/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java
+++ b/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java
@@ -31,6 +31,9 @@
     @Option(name="cts-install-path", description="the path to the cts installation to use")
     private String mCtsRootDirPath = System.getProperty("CTS_ROOT");
 
+    @Option(name="branch", description="build branch name to supply.")
+    private String mBranch = null;
+
     public static final String CTS_BUILD_VERSION = "5.0_r1.91";
     public static final String CTS_PACKAGE = "com.android.cts.tradefed.testtype";
 
@@ -46,6 +49,9 @@
             Package.getPackage(CTS_PACKAGE).getImplementationVersion(),
             "cts", "cts");
         ctsBuild.setRootDir(new File(mCtsRootDirPath));
+        if (mBranch  != null) {
+            ctsBuild.setBuildBranch(mBranch);
+        }
         return ctsBuild;
     }