Re: [PATCH v3 5/7] remote-bzr: add simple tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Felipe Contreras <felipe.contreras@xxxxxxxxx> writes:

> Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
> ---
>  contrib/remote-helpers/test-bzr.sh | 111 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 111 insertions(+)
>  create mode 100755 contrib/remote-helpers/test-bzr.sh
>
> diff --git a/contrib/remote-helpers/test-bzr.sh b/contrib/remote-helpers/test-bzr.sh
> new file mode 100755
> index 0000000..8594ffc
> --- /dev/null
> +++ b/contrib/remote-helpers/test-bzr.sh
> @@ -0,0 +1,111 @@
> +#!/bin/sh
> +#
> +# Copyright (c) 2012 Felipe Contreras
> +#
> +
> +test_description='Test remote-bzr'
> +
> +. ./test-lib.sh
> +
> +if ! test_have_prereq PYTHON; then
> +	skip_all='skipping remote-bzr tests; python not available'
> +	test_done
> +fi
> +
> +if ! "$PYTHON_PATH" -c 'import bzrlib'; then
> +	skip_all='skipping remote-bzr tests; bzr not available'
> +	test_done
> +fi

> +cmd=<<EOF
> +import bzrlib
> +bzrlib.initialize()
> +import bzrlib.plugin
> +bzrlib.plugin.load_plugins()
> +import bzrlib.plugins.fastimport
> +EOF
> +if ! "$PYTHON_PATH" -c "$cmd"; then

I cannot see how this could have ever worked.  It could be that you
wrote it for zsh and tested only with the version of zsh you have;
zsh I have here does not grok it (and of course dash and bash won't).

In any case, I do not think this is a POSIX shell.  Just replace
"=<<EOF" and "EOF" with single quote and everybody's shell should be
able to read it.

> +	echo "consider setting BZR_PLUGIN_PATH=$HOME/.bazaar/plugins" 1>&2
> +	skip_all='skipping remote-bzr tests; bzr-fastimport not available'
> +	test_done
> +fi
> +
> +check () {
> +	(cd $1 &&
> +	git log --format='%s' -1 &&
> +	git symbolic-ref HEAD) > actual &&
> +	(echo $2 &&
> +	echo "refs/heads/$3") > expected &&

Style: s/> expected/>expected/;
I won't repeat this but there are many others in this file.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]