Re: [PATCH] t9400: Add some tests for checkout

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

 



Hi,

On Thu, 4 Oct 2007, Frank Lichtenheld wrote:

> +# clean up
> +rm -fr cvswork2
> +rm -fr "$SERVERDIR"
> +cd "$WORKDIR" &&
> +git clone -q --local --bare "$WORKDIR/.git" "$SERVERDIR" >/dev/null 2>&1 &&
> +GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true &&
> +GIT_DIR="$SERVERDIR" git config gitcvs.logfile "$SERVERDIR/gitcvs.log" ||
> +exit 1

Should this not be in a test_expect_success, too?

> -#------------
> -# CVS UPDATE
> -#------------
> +#--------------
> +# CVS CHECKOUT
> +#--------------
> +test_expect_success 'cvs checkout failure (HEAD)' \
> +  'if GIT_CONFIG="$git_config" cvs -Q co -d cvswork2 HEAD >cvs.log 2>&1
> +   then
> +     echo unexpected cvs success
> +     false
> +   else
> +     true
> +   fi &&

How about "! GIT_CONFIG..." instead of the "if..then..else..fi" ?

> +   cat cvs.log | grep -q "not a branch" &&
> +   test ! -d cvswork2'
> +rm -fr cvswork2

Again, for consistency, I'd include this in the test case.

Ciao,
Dscho

-
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]

  Powered by Linux