diff options
author | Ryan S. Arnold <ryan.arnold@linaro.org> | 2013-12-11 13:07:15 -0600 |
---|---|---|
committer | Ryan S. Arnold <ryan.arnold@linaro.org> | 2013-12-11 13:07:15 -0600 |
commit | c9ec21200260bdb26d9fe9b26d7ce390579a0ca2 (patch) | |
tree | 9e6ff1cd6176a604393ee67ae0057fd070f6cb07 /test.sh | |
parent | 78563dff309b07be20af8f38dcfe971a946b0716 (diff) |
test.sh: Fixed to work with a temporary host.conf file.
Require change due to commit 3b5c576630a8ac08cd3b9ab9eab781308549a858
which requires a host.conf file for finding the cbuild topdir.
Change-Id: I991bb5f2a7949267bf69fba093d6becd202ad138
Diffstat (limited to 'test.sh')
-rwxr-xr-x | test.sh | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -4,6 +4,19 @@ testcbuild2="`basename $0`" # The directory where the script lives. topdir="`dirname $0`" +cbuild2="`realpath $0`" +topdir="`dirname ${cbuild2}`" +export cbuild_path=${topdir} + +# We need a host.conf file to squelch cbuild2 error messages. +created_host_conf= +if test ! -e "${PWD}/host.conf"; then + echo "Creating temporary host.conf file as ${PWD}/host.conf" + echo "cbuild_path=${cbuild_path}" > ${PWD}/host.conf + # source the host.conf file to get the values exported. + . ${PWD}/host.conf + created_host_conf="yes" +fi # Source common.sh for some common utilities. . ${topdir}/lib/common.sh || exit 1 @@ -339,6 +352,11 @@ elif test -d "${tmpdir}/snapshots" -a ${failures} -lt 1; then rm -rf ${tmpdir} fi +if test x"$created_host_conf" = x"yes"; then + echo "Removing temporary ${PWD}/host.conf file." + rm ${PWD}/host.conf +fi + # ---------------------------------------------------------------------------------- # print the total of test results totals |