Re: [PATCHv3 3/3] git-p4: tests: use test-chmtime in place of touch

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

 



Luke Diamand <luke@xxxxxxxxxxx> writes:

> diff --git a/t/t9813-git-p4-preserve-users.sh b/t/t9813-git-p4-preserve-users.sh
> index 166b840..fe65788 100755
> --- a/t/t9813-git-p4-preserve-users.sh
> +++ b/t/t9813-git-p4-preserve-users.sh
> @@ -53,7 +53,8 @@ test_expect_success 'preserve users' '
>  		git commit --author "Alice <alice@xxxxxxxxxxx>" -m "a change by alice" file1 &&
>  		git commit --author "Bob <bob@xxxxxxxxxxx>" -m "a change by bob" file2 &&
>  		git config git-p4.skipSubmitEditCheck true &&
> -		P4EDITOR=touch P4USER=alice P4PASSWD=secret git p4 commit --preserve-user &&
> +		P4EDITOR="test-chmtime +5" P4USER=alice P4PASSWD=secret &&
> +		git p4 commit --preserve-user &&

I think this hunk is wrong; we need to either change && to \ to make
it a single logical line that exports three environment variables
only to "git p4 commit --preserve-user", or insert "export P4EDITOR
P4USER P4PASSWD &&" between these two lines.

The latter seems to be what the remainder of the test is doing, so
I'd fix this up to mimick them.

Sorry for not catching it in the earlier review.

Thanks.

> @@ -69,7 +70,7 @@ test_expect_success 'refuse to preserve users without perms' '
>  		git config git-p4.skipSubmitEditCheck true &&
>  		echo "username-noperms: a change by alice" >>file1 &&
>  		git commit --author "Alice <alice@xxxxxxxxxxx>" -m "perms: a change by alice" file1 &&
> -		P4EDITOR=touch P4USER=bob P4PASSWD=secret &&
> +		P4EDITOR="test-chmtime +5" P4USER=bob P4PASSWD=secret &&
>  		export P4EDITOR P4USER P4PASSWD &&
>  		test_must_fail git p4 commit --preserve-user &&
>  		! git diff --exit-code HEAD..p4/master
--
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]