git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Tests in Cygwin

From
DSDon Slutz <don.slutz@sierraatlantic.com>
Date
May 7, 2009, 18:29 UTC
Message-ID
<4A03288E.7010405@SierraAtlantic.com>
In-Reply-To
<4A030277.2000708@SierraAtlantic.com>
Before these patches, I get:

make aggregate-results make[3]: Entering directory `/home/adslutz/BinMode/git/t' '/bin/sh' ./aggregate-results.sh test-results/t*-* fixed 3 success 4201 failed 15 broken 5 total 4272 make[3]: Leaving directory `/home/adslutz/BinMode/git/t'

After:

make aggregate-results make[2]: Entering directory `/home/adslutz/BinMode/git/t' '/bin/sh' ./aggregate-results.sh test-results/t*-* fixed 3 success 4181 failed 6 broken 5 total 4274 make[2]: Leaving directory `/home/adslutz/BinMode/git/t'

   -Don
-------- Original Message --------
Subject: Re: Tests in Cygwin
From: Don Slutz <Don.Slutz@sierraatlantic.com>
To: Johannes Sixt <j.sixt@viscovery.net>
CC: Junio C Hamano <gitster@pobox.com>, Hannu Koivisto <azure@iki.fi>, 
git@vger.kernel.org
Date: 5/7/2009 11:47 AM
Show 92 quoted lines
> Here is a change back to using spaces.  It also includes a change
> to test for the code working.  Squash on top.
>
> Signed-off-by: Don Slutz <Don.Slutz@SierraAtlantic.com>
> ---
> t/README                    |    4 ++--
> t/t0000-basic.sh            |   13 ++++++++++++-
> t/t1004-read-tree-m-u-wf.sh |    2 +-
> t/test-lib.sh               |    7 +------
> 4 files changed, 16 insertions(+), 10 deletions(-)
>
> diff --git a/t/README b/t/README
> index 49c3a51..c61e1d4 100644
> --- a/t/README
> +++ b/t/README
> @@ -200,9 +200,9 @@ library for your script to use.
>    <script>.  If it yields success, test is considered
>    successful.  <message> should state what it is testing.
>
> -   An optional parameter <prereq> is a '+' separated list of 
> prerequisite
> +   An optional parameter <prereq> is a space separated list of 
> prerequisite
>    tokens.  The test will be skipped if the test environment lacks any of
> -   the prerequiste feature listed (see below for commonly used
> +   the prerequisite feature listed (see below for commonly used
>    prerequisites).
>
>    Example:
> diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
> index f4ca4fc..58bac69 100755
> --- a/t/t0000-basic.sh
> +++ b/t/t0000-basic.sh
> @@ -67,7 +67,18 @@ donthaveit=yes
> test_expect_success DONTHAVEIT 'unmet prerequisite causes test to be 
> skipped' '
>     donthaveit=no
> '
> -if test $haveit$donthaveit != yesyes
> +test_set_prereq HAVEBOTH
> +haveboth1=no
> +test_expect_success 'HAVEBOTH HAVEIT' 'test runs if both 
> prerequisites are satisfied' '
> +    test_have_prereq "HAVEIT HAVEBOTH" &&
> +    haveboth1=yes
> +'
> +haveboth2=no
> +test_expect_success 'HAVEIT HAVEBOTH' 'test passes if both 
> prerequisites are satisfied' '
> +    test_have_prereq "HAVEBOTH HAVEIT" &&
> +    haveboth2=yes
> +'
> +if test $haveit$donthaveit$haveboth1$haveboth2 != yesyesyesyes
> then
>        say "bug in test framework: prerequisite tags do not work 
> reliably"
>        exit 1
> diff --git a/t/t1004-read-tree-m-u-wf.sh b/t/t1004-read-tree-m-u-wf.sh
> index 8683189..eb60f80 100755
> --- a/t/t1004-read-tree-m-u-wf.sh
> +++ b/t/t1004-read-tree-m-u-wf.sh
> @@ -177,7 +177,7 @@ test_expect_success SYMLINKS 'funny symlink in 
> work tree' '
>
> '
>
> -test_expect_success SYMLINKS+SANITY 'funny symlink in work tree, 
> un-unlink-able' '
> +test_expect_success 'SYMLINKS SANITY' 'funny symlink in work tree, 
> un-unlink-able' '
>
>        rm -fr a b &&
>        git reset --hard &&
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index 2d12799..dd3b8d7 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -263,13 +263,8 @@ test_set_prereq () {
> }
> satisfied=" "
>
> -# prerequisites can be concatenated with '+'
> test_have_prereq () {
> -       save_IFS=$IFS
> -       IFS=+
> -       set -- $*
> -       IFS=$save_IFS
> -       for prerequisite
> +       for prerequisite in $(echo $*)
>        do
>                case $satisfied in
>                *" $prerequisite "*)

__________________________________________________________________________________________________________________ DISCLAIMER:"The information contained in this message and the attachments (if any) may be privileged and confidential and protected from disclosure. You are hereby notified that any unauthorized use, dissemination, distribution or copying of this communication, review, retransmission, or taking of any action based upon this information, by persons or entities other than the intended recipient, is strictly prohibited. If you are not the intended recipient or an employee or agent responsible for delivering this message, and have received this communication in error, please notify us immediately by replying to the message and kindly delete the original message, attachments, if any, and all its copies from your computer system. Thank you for your cooperation." ________________________________________________________________________________________________________________

Previous: Don SlutzNext: Junio C Hamano
Message 6 of 16 in “Tests in Cygwin”
  1. Hannu KoivistoApr 17, 2009
  2. Don SlutzMay 6, 2009
  3. Junio C HamanoMay 6, 2009
  4. Johannes SixtMay 7, 2009
  5. Don SlutzMay 7, 2009
  6. Don SlutzMay 7, 2009
  7. Junio C HamanoMay 8, 2009
  8. Johannes SixtMay 8, 2009
  9. Jeff KingMay 8, 2009
  10. Johannes SixtMay 8, 2009
  11. Junio C HamanoMay 8, 2009
  12. Alex RiesenMay 8, 2009
  13. Don SlutzMay 8, 2009
  14. Johannes SixtMay 8, 2009
  15. Alex RiesenMay 8, 2009
  16. Junio C HamanoMay 8, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.