Re: [PATCH 02/11] git-p4: test debug macro
On 17/12/11 18:52, Pete Wyckoff wrote:
Show 5 quoted lines
> Call this from a test to have it pause and wait for you to
> investigate. It prints out its current directory and the
> P4 environment variables. It waits for ctrl-c before continuing
> the test.
>
Show 11 quoted lines
> +# Go investigate when it pauses, then hit ctrl-c to continue the
> +# test. The other tests will run, and p4d will be cleaned up nicely.
> +#
> +# Note that the directory is deleted and created for every test run,
> +# so you have to do the "cd" again.
> +#
> +debug() {
> + echo "*** Debug me, hit ctrl-c when done. Useful shell commands:"
> + echo cd \"$(pwd)\"
> + echo export P4PORT=$P4PORT P4CLIENT=$P4CLIENT
> + trap echo SIGINTDoes that work with non-bash shells like ash? It didn't for me.
> + sleep $((3600 * 24 * 30))
> + trap - SIGINT
> +}
> +