mac: Use bash from user env path
This patch series is to enable running the unit test framework on a
macintosh computer.
By default, mac comes with a /bin/bash version of 3.2. This version
does not have some of the required features needed by the
build-unit-test-docker.sh script (specifically the list of packages with
PKG_REV). The workaround is to install a newer version of bash in
/usr/local/bin/ and set that ahead in a users PATH.
Recent mac os updates prevent even root from being able to change files
in /bin/ so moving the bash from /usr/local/bin is not an option here.
On Linux, the -xe can not be passed in via /usr/bin/env so set these
within the script.
Tested:
Verified PKG_REV worked on a mac after this change
Change-Id: I18c14b1abfb373f939fd57e38953dfd7e3c5513c
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/build-unit-test-docker.sh b/build-unit-test-docker.sh
index 8dc5c59..43df2ea 100755
--- a/build-unit-test-docker.sh
+++ b/build-unit-test-docker.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -xe
+#!/usr/bin/env bash
#
# Build the required docker image to run package unit tests
#
@@ -12,7 +12,7 @@
# default is master, which will be used if input branch not
# provided or not found
-set -uo pipefail
+set -xeuo pipefail
DOCKER_IMG_NAME=${DOCKER_IMG_NAME:-"openbmc/ubuntu-unit-test"}
DISTRO=${DISTRO:-"ubuntu:eoan"}