diff --git a/run-unit-test-docker.sh b/run-unit-test-docker.sh
index d2a86f1..2ebc224 100755
--- a/run-unit-test-docker.sh
+++ b/run-unit-test-docker.sh
@@ -29,7 +29,8 @@
 set -uo pipefail
 
 # Default variables
-DOCKER_IMG_NAME=${DOCKER_IMG_NAME:-"openbmc/ubuntu-unit-test-${BRANCH:-master}"}
+BRANCH=${BRANCH:-"master"}
+DOCKER_IMG_NAME=${DOCKER_IMG_NAME:-"openbmc/ubuntu-unit-test-${BRANCH}"}
 DISTRO=${DISTRO:-ubuntu:bionic}
 OBMC_BUILD_SCRIPTS="openbmc-build-scripts"
 UNIT_TEST_PY_DIR="scripts"
@@ -87,7 +88,8 @@
 ./build-unit-test-docker.sh
 
 # Unit test and parameters
-UNIT_TEST="${DOCKER_WORKDIR}/${UNIT_TEST_PY},-w,${DOCKER_WORKDIR},-p,${UNIT_TEST_PKG},-v"
+UNIT_TEST="${DOCKER_WORKDIR}/${UNIT_TEST_PY},-w,${DOCKER_WORKDIR},\
+-p,${UNIT_TEST_PKG},-b,$BRANCH,-v"
 
 # Run the docker unit test container with the unit test execution script
 echo "Executing docker image"
diff --git a/scripts/unit-test.py b/scripts/unit-test.py
index 587488d..1a330ca 100755
--- a/scripts/unit-test.py
+++ b/scripts/unit-test.py
@@ -229,21 +229,30 @@
     check_call(cmd)
 
 
-def clone_pkg(pkg):
+def clone_pkg(pkg, branch):
     """
     Clone the given openbmc package's git repository from gerrit into
     the WORKSPACE location
 
     Parameter descriptions:
     pkg                 Name of the package to clone
+    branch              Branch to clone from pkg
     """
     pkg_dir = os.path.join(WORKSPACE, pkg)
     if os.path.exists(os.path.join(pkg_dir, '.git')):
         return pkg_dir
     pkg_repo = urljoin('https://gerrit.openbmc-project.xyz/openbmc/', pkg)
     os.mkdir(pkg_dir)
-    printline(pkg_dir, "> git clone", pkg_repo, "./")
-    return Repo.clone_from(pkg_repo, pkg_dir).working_dir
+    printline(pkg_dir, "> git clone", pkg_repo, branch, "./")
+    try:
+        # first try the branch
+        repo_inst = Repo.clone_from(pkg_repo, pkg_dir,
+                branch=branch).working_dir
+    except:
+        printline("Input branch not found, default to master")
+        repo_inst = Repo.clone_from(pkg_repo, pkg_dir,
+                branch="master").working_dir
+    return repo_inst
 
 
 def get_autoconf_deps(pkgdir):
@@ -413,7 +422,7 @@
         check_call_cmd(pkgdir, *make_parallel)
         check_call_cmd(pkgdir, 'sudo', '-n', '--', *(make_parallel + [ 'install' ]))
 
-def build_dep_tree(pkg, pkgdir, dep_added, head, dep_tree=None):
+def build_dep_tree(pkg, pkgdir, dep_added, head, branch, dep_tree=None):
     """
     For each package(pkg), starting with the package to be unit tested,
     parse its 'configure.ac' file from within the package's directory(pkgdir)
@@ -425,6 +434,7 @@
     pkgdir              Directory where package source is located
     dep_added           Current dict of dependencies and added status
     head                Head node of the dependency tree
+    branch              Branch to clone from pkg
     dep_tree            Current dependency tree node
     """
     if not dep_tree:
@@ -446,7 +456,7 @@
             # Dependency package not added
             new_child = dep_tree.AddChild(dep)
             dep_added[dep] = False
-            dep_pkgdir = clone_pkg(dep)
+            dep_pkgdir = clone_pkg(dep,branch)
             # Determine this dependency package's
             # dependencies and add them before
             # returning to add this package
@@ -454,6 +464,7 @@
                                        dep_pkgdir,
                                        dep_added,
                                        head,
+                                       branch,
                                        new_child)
         else:
             # Dependency package known and added
@@ -626,9 +637,13 @@
                         help="Print additional package status messages")
     parser.add_argument("-r", "--repeat", help="Repeat tests N times",
                         type=int, default=1)
+    parser.add_argument("-b", "--branch", dest="BRANCH", required=False,
+                        help="Branch to target for dependent repositories",
+                        default="master")
     args = parser.parse_args(sys.argv[1:])
     WORKSPACE = args.WORKSPACE
     UNIT_TEST_PKG = args.PACKAGE
+    BRANCH = args.BRANCH
     if args.verbose:
         def printline(*line):
             for arg in line:
@@ -654,7 +669,8 @@
         build_dep_tree(UNIT_TEST_PKG,
                        os.path.join(WORKSPACE, UNIT_TEST_PKG),
                        dep_added,
-                       dep_tree)
+                       dep_tree,
+                       BRANCH)
 
         # Reorder Dependency Tree
         for pkg_name, regex_str in DEPENDENCIES_REGEX.iteritems():
