Re: [PATCH] Avoid problem with xpg4 grep in Solaris that broke t9400

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

 



Excerpts from Ben Walton's message of Mon Apr 09 16:13:29 -0400 2012:

Bump?

Thanks
-Ben

> The grep in Solaris' /usr/xpg4/bin as found by the default
> SANE_TOOL_PATH was not properly handling the 'cvs co -c (shows module
> database)' test.  The [\t ] character set selection does not properly
> trigger so the first grep in the test fails.
> 
> Instead of working around this issue, switch to using the standard
> test_cmp() shell function to perform the comparison instead.
> 
> Signed-off-by: Ben Walton <bwalton@xxxxxxxxxxxxxxxxxx>
> ---
> 
> It's possible that the specific pair of grep statements is required.
> It's looking for tab or space, so maybe we get either character in
> some cases, depending on cvs version?  This passed the test suite
> using cvs 1.12.13 for OpenCSW.
> 
> If there is a reason for the original construction, I'll find a more
> creative work around for this problem.
> 
>  t/t9400-git-cvsserver-server.sh |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
> index 9199550..df1405f 100755
> --- a/t/t9400-git-cvsserver-server.sh
> +++ b/t/t9400-git-cvsserver-server.sh
> @@ -500,8 +500,8 @@ test_expect_success 'cvs status (no subdirs in header)' '
>  cd "$WORKDIR"
>  test_expect_success 'cvs co -c (shows module database)' '
>      GIT_CONFIG="$git_config" cvs co -c > out &&
> -    grep "^master[     ]\+master$" < out &&
> -    ! grep -v "^master[     ]\+master$" < out
> +    echo "master    master" > out.expected &&
> +    test_cmp out out.expected
>  '
>  
>  #------------
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

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