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

Re: [PATCH] t9301-fast-export: move unset of config variable into its own test function

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Aug 22, 2008, 09:02 UTC
Message-ID
<48AE8093.4070609@viscovery.net>
In-Reply-To
<7v7ia9bgqc.fsf@gitster.siamese.dyndns.org>
Junio C Hamano schrieb:
Show 19 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> 
>> For this particular case, what we are interested in testing is not that
>> "config --unset" exits with 0 status.  We are however interested in making
>> sure that i18n.commitencoding is not set when the body of #12 runs.
>>
>> So I think a more appropriate change would be something like this for this
>> particular case.
> 
> Having said that, we may want to have an easier way to exclude certain
> classes of pieces, and also encourage test writers to group pieces that
> are related to these classes together.
> 
> For example, this introduces a new environment you can set,
> GIT_SKIP_TEST_CLASS, which is a space separated list of classes of
> features that you would want to exclude from the test.
> test_expect_success/failure can now take an optional "class token" as the
> first parameter (they traditionally took only two parameters, but with
> class token, they take three).

Nice idea. Another class would be the tests that depend on that the filesystem supports symbolic links.

> -test_expect_success 'iso-8859-1' '
> +test_expect_success I18N 'iso-8859-1' '
How do the tests look like if this token is the *last* argument?

To continue the idea, please look into t5302-pack-index.sh: We skip some tests if we don't have support for 64bit file offsets. Making these tests a "static" class would not be appropriate because the condition whether 64bit support is present is derived dynamically by the testsuite. What if we could write tests like this:

test_expect_success \
    'index v2: verify a pack with some 64-bit offsets' \
    'git verify-pack -v "test-3-${pack3}.pack"' \
    'test "$have_64bits"'

i.e. the 3rd argument is a condition that tells whether the test should be run. And in other cases the 3rd argument is the token that you propose:

test_expect_success 'iso-8859-1' '
     ...test goes here...
' I18N
Hm?
-- Hannes
Previous: Junio C HamanoNext: Junio C Hamano
Message 24 of 28 in “[FYI] How I compile on IRIX 6.5 with the MIPSpro compiler and ksh”
  1. Brandon CaseyAug 18, 2008
  2. Makefile: add section for SGI IRIXBrandon Casey, Aug 18, 2008
  3. git-compat-util.h: adjust for SGI IRIX 6.5Brandon Casey, Aug 18, 2008
  4. unpack-trees.c: work around run-time array initialization flaw on IRIX 6.5Brandon Casey, Aug 18, 2008
  5. templates/Makefile: work around SGI install which assumes / if ROOT not definedBrandon Casey, Aug 18, 2008
  6. Junio C HamanoAug 18, 2008
  7. Brandon CaseyAug 19, 2008
  8. templates/Makefile: install is unnecessary, just use mkdir -pBrandon Casey, Aug 22, 2008
  9. test-lib.sh: work around ksh's trap shortcomingsBrandon Casey, Aug 18, 2008
  10. Junio C HamanoAug 18, 2008
  11. Brandon CaseyAug 19, 2008
  12. Junio C HamanoAug 19, 2008
  13. Brandon CaseyAug 19, 2008
  14. Brandon CaseyAug 19, 2008
  15. Brandon CaseyAug 20, 2008
  16. Mike RalphsonAug 20, 2008
  17. t1002-read-tree-m-u-2way.sh: use 'git diff -U0' rather than 'diff -U0'Brandon Casey, Aug 18, 2008
  18. t9301-fast-export.sh: don't unset config variable while we're skipping test 4Brandon Casey, Aug 18, 2008
  19. Junio C HamanoAug 19, 2008
  20. Brandon CaseyAug 19, 2008
  21. t9301-fast-export: move unset of config variable into its own test functionBrandon Casey, Aug 22, 2008
  22. Junio C HamanoAug 22, 2008
  23. Junio C HamanoAug 22, 2008
  24. Johannes SixtAug 22, 2008
  25. Junio C HamanoAug 22, 2008
  26. Brandon CaseyAug 18, 2008
  27. Boyd Lynn GerberAug 19, 2008
  28. Brandon CaseyAug 19, 2008

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.