Support branch option in unit-test script

Building on the support of the branch option within the
docker container, add it to unit-test for any dependent
repositories that do not get built into the docker
container

Testing:
- Verified with no branch input, worked as expected
- Verified with invalid branch, master was still used

Change-Id: I4f57d6165287ffe3b4e2f0377292128474199ca3
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
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"