<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/README, branch v2.3.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.3.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.3.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-12-22T20:26:38Z</updated>
<entry>
<title>Merge branch 'jc/refer-to-t-readme-from-submitting-patches'</title>
<updated>2014-12-22T20:26:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-12-22T20:26:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=63296d583ca107b3f590c3a09be9b3670a2c1afb'/>
<id>urn:sha1:63296d583ca107b3f590c3a09be9b3670a2c1afb</id>
<content type='text'>
* jc/refer-to-t-readme-from-submitting-patches:
  t/README: justify why "! grep foo" is sufficient
  SubmittingPatches: refer to t/README for tests
</content>
</entry>
<entry>
<title>t/README: justify why "! grep foo" is sufficient</title>
<updated>2014-11-24T17:47:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-11-24T17:47:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=53de742470bdf160a8412d7a2e9c30545db63fac'/>
<id>urn:sha1:53de742470bdf160a8412d7a2e9c30545db63fac</id>
<content type='text'>
We require use of test_must_fail to check expected non-zero exit by
Git itself, but discourage test_must_fail to be used for checking
exit status of non Git commands that are supplied by the system.
The current text explains the reason for the former but not the
latter.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>test-lib.sh: support -x option for shell-tracing</title>
<updated>2014-10-13T22:39:57Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-10-10T06:47:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a136f6d8ff290ab486c85cd12d1a9a47d53b432d'/>
<id>urn:sha1:a136f6d8ff290ab486c85cd12d1a9a47d53b432d</id>
<content type='text'>
Usually running a test under "-v" makes it clear which
command is failing. However, sometimes it can be useful to
also see a complete trace of the shell commands being run in
the test. You can do so without any support from the test
suite by running "sh -x tXXXX-foo.sh". However, this
produces quite a large bit of output, as we see a trace of
the entire test suite.

This patch instead introduces a "-x" option to the test
scripts (i.e., "./tXXXX-foo.sh -x"). When enabled, this
turns on "set -x" only for the tests themselves. This can
still be a bit verbose, but should keep things to a more
manageable level. You can even use "--verbose-only" to see
the trace only for a specific test.

The implementation is a little invasive. We turn on the "set
-x" inside the "eval" of the test code. This lets the eval
itself avoid being reported in the trace (which would be
long, and redundant with the verbose listing we already
showed). And then after the eval runs, we do some trickery
with stderr to avoid showing the "set +x" to the user.

We also show traces for test_cleanup functions (since they
can impact the test outcome, too). However, we do avoid
running the noop ":" cleanup (the default if the test does
not use test_cleanup at all), as it creates unnecessary
noise in the "set -x" output.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ib/test-selectively-run'</title>
<updated>2014-06-16T19:18:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-16T19:18:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7e1a5381b0048572e72971af41e13a85804d48d9'/>
<id>urn:sha1:7e1a5381b0048572e72971af41e13a85804d48d9</id>
<content type='text'>
Allow specifying only certain individual test pieces to be run
using a range notation (e.g. "t1234-test.sh --run='1-4 6 8 9-'").

* ib/test-selectively-run:
  t0000-*.sh: fix the GIT_SKIP_TESTS sub-tests
  test-lib: '--run' to run only specific tests
  test-lib: tests skipped by GIT_SKIP_TESTS say so
  test-lib: document short options in t/README
</content>
</entry>
<entry>
<title>test doc: test_write_lines does not split its arguments</title>
<updated>2014-06-10T20:09:05Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2014-05-05T23:51:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bb98b01ee8c5c6f66a6d70aa453b70184dd3d96f'/>
<id>urn:sha1:bb98b01ee8c5c6f66a6d70aa453b70184dd3d96f</id>
<content type='text'>
test_write_lines carefully quotes its arguments as "$@", so

	test_write_lines "a b" c

writes two lines as requested, not three.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>test: add test_write_lines helper</title>
<updated>2014-06-10T20:09:00Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2014-04-27T18:15:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ac9afcc31cd1f7c00c2747132e5f512173613fd9'/>
<id>urn:sha1:ac9afcc31cd1f7c00c2747132e5f512173613fd9</id>
<content type='text'>
API and implementation as suggested by Junio.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>test-lib: '--run' to run only specific tests</title>
<updated>2014-06-06T20:48:00Z</updated>
<author>
<name>Ilya Bobyr</name>
<email>ilya.bobyr@gmail.com</email>
</author>
<published>2014-04-30T09:50:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0445e6f0a1223b5d40542627607207a87a416b5b'/>
<id>urn:sha1:0445e6f0a1223b5d40542627607207a87a416b5b</id>
<content type='text'>
Allow better control of the set of tests that will be executed for a
single test suite.  Mostly useful while debugging or developing as it
allows to focus on a specific test.

Signed-off-by: Ilya Bobyr &lt;ilya.bobyr@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>test-lib: document short options in t/README</title>
<updated>2014-06-06T20:47:54Z</updated>
<author>
<name>Ilya Bobyr</name>
<email>ilya.bobyr@gmail.com</email>
</author>
<published>2014-04-30T09:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5e3b4fce4293d89ea79433527e6d55f4bcd42bbd'/>
<id>urn:sha1:5e3b4fce4293d89ea79433527e6d55f4bcd42bbd</id>
<content type='text'>
Most arguments that could be provided to a test have short forms.
Unless documented, the only way to learn them is to read the code.

Signed-off-by: Ilya Bobyr &lt;ilya.bobyr@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/wrap-perl-used-in-tests'</title>
<updated>2013-11-04T22:58:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-11-04T22:58:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a3a9cff0371f5dd3dd199ef227911cd812e1708d'/>
<id>urn:sha1:a3a9cff0371f5dd3dd199ef227911cd812e1708d</id>
<content type='text'>
* jk/wrap-perl-used-in-tests:
  t: use perl instead of "$PERL_PATH" where applicable
  t: provide a perl() function which uses $PERL_PATH
</content>
</entry>
<entry>
<title>t: provide a perl() function which uses $PERL_PATH</title>
<updated>2013-10-29T19:44:39Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-10-29T01:22:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a0e0ec9f7dd2ad46459cf98b7465b007fb15258b'/>
<id>urn:sha1:a0e0ec9f7dd2ad46459cf98b7465b007fb15258b</id>
<content type='text'>
Once upon a time, we assumed that calling a bare "perl" in
the test scripts was OK, because we would find the perl from
the user's PATH, and we were only asking that perl to do
basic operations that work even on old versions of perl.

Later, we found that some systems really prefer to use
$PERL_PATH even for these basic cases, because the system
perl misbehaves in some way (e.g., by handling line endings
differently). We then switched "perl" invocations to
"$PERL_PATH" to respect the user's choice.

Having to use "$PERL_PATH" is ugly and cumbersome, though.
Instead, let's provide a perl() shell function that tests
can use, which will transparently do the right thing.

Unfortunately, test writers still have to use $PERL_PATH in
certain situations, so we still need to keep the advice in
the README.

Note that this may fix test failures in t5004, t5503, t6002,
t6003, t6300, t8001, and t8002, depending on your system's
perl setup. All of these can be detected by running:

  ln -s /bin/false bin-wrappers/perl
  make test

which fails before this patch, and passes after.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
