Re: [PATCHv5 15/16] Add missing &&'s throughout the testsuite

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

 



Elijah Newren wrote:

> --- a/t/t1509-root-worktree.sh
> +++ b/t/t1509-root-worktree.sh
> @@ -232,8 +232,8 @@ say "auto bare gitdir"
>  
>  # DESTROYYYYY!!!!!
>  test_expect_success 'setup' '
> -	rm -rf /refs /objects /info /hooks
> -	rm /*
> +	rm -rf /refs /objects /info /hooks &&
> +	rm /* &&

I'm worried that this would fail:

	$ mkdir foo
	$ cd foo
	$ >bar
	$ mkdir baz
	$ rm *
	rm: cannot remove `baz': Is a directory
	$ echo $?
	1

[...]
> --- a/t/t5550-http-fetch.sh
> +++ b/t/t5550-http-fetch.sh
> @@ -93,8 +93,8 @@ test_expect_success 'fetch notices corrupt idx' '
>  '
>  
>  test_expect_success 'did not use upload-pack service' '
> -	grep '/git-upload-pack' <"$HTTPD_ROOT_PATH"/access.log >act
> -	: >exp
> +	! grep '/git-upload-pack' <"$HTTPD_ROOT_PATH"/access.log >act &&
> +	>exp &&
>  	test_cmp exp act

Or better:

	test_expect_success 'did not use upload-pack service' '
		! grep '/git-upload-pack' <"$HTTPD_ROOT_PATH"/access.log
	'

This way, (like before) one would get to see the git-upload-pack lines
when the test fails while running with -v.

> --- a/t/t7300-clean.sh
> +++ b/t/t7300-clean.sh
> @@ -183,7 +183,7 @@ test_expect_success 'git clean symbolic link' '
>  
>  	mkdir -p build docs &&
>  	touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
> -	ln -s docs/manual.txt src/part4.c
> +	ln -s docs/manual.txt src/part4.c &&
>  	git clean &&
>  	test -f Makefile &&
>  	test -f README &&

Missing SYMLINKS prereq?
--
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]