[PATCH] Fix up quoting around passing args to anaconda in the gui test.
David Shea
dshea at redhat.com
Thu May 29 18:01:08 UTC 2014
On 05/29/2014 01:30 PM, Chris Lumens wrote:
> diff --git a/tests/gui/runtest.sh b/tests/gui/runtest.sh
> index 87f2ee7..86f8e52 100755
> --- a/tests/gui/runtest.sh
> +++ b/tests/gui/runtest.sh
> @@ -19,12 +19,17 @@
> # Red Hat Author(s): Chris Lumens<clumens at redhat.com>
>
> function doit() {
> - nosetests -s \
> - -v \
> - --nologcapture \
> - --tc=resultsdir:$(mktemp -d --tmpdir=/var/tmp autogui-results-XXXXXX) \
> - --tc=liveImage:"$1" $2 \
> - outside
> + ARGS="-s \
> + -v \
> + --nologcapture \
> + --tc=resultsdir:$(mktemp -d --tmpdir=/var/tmp autogui-results-XXXXXX) \
> + --tc=liveImage:"$1""
> +
> + if [ -z "$2" ]; then
> + nosetests ${ARGS} outside
> + else
> + nosetests ${ARGS} "${2}" outside
> + fi
> }
>
I'm not sure the part with the quotes around $1 does what you want it to
do. If the problem you're having here is just with $2 needing to quoted
or omitted, I think the cleaner (if maybe not easier to read) way would
be to use set and $@. Something like
liveimage="$1"
otherthing="$2"
set -- -s -v --nologcapture --tc=resultsdir:$(mktemp -d
--tmpdir=/var/tmp autogui-results-XXXXXX) --tc=liveImage:"${liveimage}"
if [ ! -z "${otherthing}" ]; then
set -- "$@" "${otherthing}"
fi
nosetests "$@" outside
More information about the anaconda-patches
mailing list