<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t0000-basic.sh, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-01-02T22:43:12Z</updated>
<entry>
<title>t0000: drop "known breakage" test</title>
<updated>2014-01-02T22:43:12Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-12-28T09:33:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=738a8beac42d5e2c6b882f997b7fc6577363c544'/>
<id>urn:sha1:738a8beac42d5e2c6b882f997b7fc6577363c544</id>
<content type='text'>
Having a simulated "known breakage" test means that the test
suite will always tell us there is a bug to be fixed, even
though it is only simulated.

The right way to test this is in a sub-test, that can also
check that we provide the correct exit status and output.
Fortunately, we already have such a test (added much later
by 5ebf89e).

We could arguably get rid of the simulated success test
immediately above, as well, as it is also redundant with the
tests added in 5ebf89e. However, it does not have the
annoying behavior of the "known breakage" test. It may also
be easier to debug if the test suite is truly broken, since
it is not a test-within-a-test, as the later tests are.

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>t0000: simplify HARNESS_ACTIVE hack</title>
<updated>2014-01-02T22:43:11Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-12-28T09:31:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a63c12c9be28bf455816b1ece4a52b463ecf6241'/>
<id>urn:sha1:a63c12c9be28bf455816b1ece4a52b463ecf6241</id>
<content type='text'>
Commit 517cd55 set HARNESS_ACTIVE unconditionally in
sub-tests, because that value affects the output of
"--verbose". t0000 needs stable output from its sub-tests,
and we may or may not be running under a TAP harness.

That commit made the decision to always set the variable,
since it has another useful side effect, which is
suppressing writes to t/test-results by the sub-tests (which
would just pollute the real results).

Since the last commit, though, the sub-tests have their own
test-results directories, so this is no longer an issue. We
can now update a few comments that are no longer accurate
nor necessary.

We can also revisit the choice of HARNESS_ACTIVE. Since we
must choose one value for stability, it's probably saner to
have it off. This means that future patches could test
things like the test-results writing, or the "--quiet"
option, which is currently ignored when run under a harness.

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>t0000: set TEST_OUTPUT_DIRECTORY for sub-tests</title>
<updated>2014-01-02T22:40:03Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-12-28T09:29:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=68830470712b370d5ea231f76babd60a8859c105'/>
<id>urn:sha1:68830470712b370d5ea231f76babd60a8859c105</id>
<content type='text'>
Running t0000 produces more trash directories than expected and does
not clean up after itself:

    $ ./t0000-basic.sh
    [...]
    $ ls -d trash\ directory.*
    trash directory.failing-cleanup
    trash directory.mixed-results1
    trash directory.mixed-results2
    trash directory.partial-pass
    trash directory.test-verbose
    trash directory.test-verbose-only-2

These scratch areas for sub-tests should be under the t0000 trash
directory, but because TEST_OUTPUT_DIRECTORY defaults to
TEST_DIRECTORY, which is exported to help sub-tests find
test-lib.sh, the sub-test trash directories are created under the
toplevel t/ directory instead.  Because some of the sub-tests
simulate failures, their trash directories are kept around.

Fix it by explicitly setting TEST_OUTPUT_DIRECTORY appropriately for
sub-tests.

An alternative fix would be to pass the --root parameter that only
specifies where to put the trash directories, which would also work.
However, using TEST_OUTPUT_DIRECTORY is more futureproof in case
tests want to write more output in addition to the test-results/
(which are already suppressed in sub-tests using the HARNESS_ACTIVE
setting) and trash directories.

This fixes a regression introduced by 38b074d (t/test-lib.sh: fix
TRASH_DIRECTORY handling, 2013-04-14).  Before that commit, the
TEST_OUTPUT_DIRECTORY setting was not respected consistently so most
tests did their work in a "trash" subdirectory of the current
directory instead of the output dir.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Clarified-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tr/test-v-and-v-subtest-only'</title>
<updated>2013-07-11T20:06:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-07-11T20:06:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f3930e4389937eccdcaa204b134010e3c34463a4'/>
<id>urn:sha1:f3930e4389937eccdcaa204b134010e3c34463a4</id>
<content type='text'>
Finishing touches to a topic that is already in master for the
upcoming release.

* tr/test-v-and-v-subtest-only:
  t0000: do not use export X=Y
</content>
</entry>
<entry>
<title>t0000: do not use export X=Y</title>
<updated>2013-07-08T15:22:12Z</updated>
<author>
<name>Torsten Bögershausen</name>
<email>tboegi@web.de</email>
</author>
<published>2013-07-08T09:21:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e66681eb94bf1476e5c7436d777129a56512947f'/>
<id>urn:sha1:e66681eb94bf1476e5c7436d777129a56512947f</id>
<content type='text'>
The shell syntax "export X=Y A=B" is not understood by all shells.

Signed-off-by: Torsten Bögershausen &lt;tboegi@web.de&gt;
Acked-by: Thomas Rast &lt;trast@inf.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tr/test-v-and-v-subtest-only'</title>
<updated>2013-07-05T08:15:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-07-05T08:15:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=04f2ddda8426d3ae46d52d9dcbfc00bd3c52e645'/>
<id>urn:sha1:04f2ddda8426d3ae46d52d9dcbfc00bd3c52e645</id>
<content type='text'>
Allows N instances of tests run in parallel, each running 1/N parts
of the test suite under Valgrind, to speed things up.

* tr/test-v-and-v-subtest-only:
  perf-lib: fix start/stop of perf tests
  test-lib: support running tests under valgrind in parallel
  test-lib: allow prefixing a custom string before "ok N" etc.
  test-lib: valgrind for only tests matching a pattern
  test-lib: verbose mode for only tests matching a pattern
  test-lib: self-test that --verbose works
  test-lib: rearrange start/end of test_expect_* and test_skip
  test-lib: refactor $GIT_SKIP_TESTS matching
  test-lib: enable MALLOC_* for the actual tests
</content>
</entry>
<entry>
<title>test-lib: verbose mode for only tests matching a pattern</title>
<updated>2013-06-23T19:24:06Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@inf.ethz.ch</email>
</author>
<published>2013-06-23T18:12:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ff09af3fb8f5bede0de523723bbd00d6ef2ab71e'/>
<id>urn:sha1:ff09af3fb8f5bede0de523723bbd00d6ef2ab71e</id>
<content type='text'>
With the new --verbose-only=&lt;pattern&gt; option, one can enable --verbose
at a per-test granularity.  The pattern is matched against the test
number, e.g.

  ./t0000-basic.sh --verbose-only='2[0-2]'

to see only the full output of test 20-22, while showing the rest in the
one-liner format.

As suggested by Jeff King, this takes care to wrap the entire
test_expect_* block, but nothing else, in the verbose toggling.  We
can use the test_start/end functions from the previous commit for the
purpose.

This is arguably not *too* useful on its own, but makes the next patch
easier to follow.

Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Thomas Rast &lt;trast@inf.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>test-lib: self-test that --verbose works</title>
<updated>2013-06-23T19:24:05Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@inf.ethz.ch</email>
</author>
<published>2013-06-23T18:12:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=517cd55fd51ebf4c6c20597055ff191fefe5dda0'/>
<id>urn:sha1:517cd55fd51ebf4c6c20597055ff191fefe5dda0</id>
<content type='text'>
t0000 contains some light self-tests of test-lib.sh, but --verbose was
not covered.  Add a test.

The only catch is that the presence of a test harness influences the
output (specifically, the presence of some empty lines).  So we need
to unset TEST_HARNESS or set it to a known value.  Leaving it unset
leads to spurious test failures in the final summary, which come from
the subtest.  So we always set it.

Signed-off-by: Thomas Rast &lt;trast@inf.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t0000: use test_ln_s_add to remove SYMLINKS prerequisite</title>
<updated>2013-06-07T22:01:48Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2013-06-07T20:53:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c723a76d4da632f8fbb8e687cea751f6d16b4cb0'/>
<id>urn:sha1:c723a76d4da632f8fbb8e687cea751f6d16b4cb0</id>
<content type='text'>
t0000-basic hard-codes many object IDs. To cater to file systems that do
not support symbolic links, different IDs are used depending on the
SYMLINKS prerequisite. But we can observe the symbolic links are only
needed to generate index entries. Use test_ln_s_add to generate the
index entries and get rid of explicit SYMLINKS checks.

This undoes the special casing introduced in this test by 704a3143
(Use prerequisite tags to skip tests that depend on symbolic links,
2009-03-04).

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'as/test-tweaks'</title>
<updated>2013-01-03T18:29:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-01-03T18:29:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6fedcd8188dc50276a8d77d14f200fe99c228ee0'/>
<id>urn:sha1:6fedcd8188dc50276a8d77d14f200fe99c228ee0</id>
<content type='text'>
Output from the tests is coloured using "green is okay, yellow is
questionable, red is bad and blue is informative" scheme.

* as/test-tweaks:
  tests: paint unexpectedly fixed known breakages in bold red
  tests: test the test framework more thoroughly
  tests: refactor mechanics of testing in a sub test-lib
  tests: change info messages from yellow/brown to cyan
  tests: paint skipped tests in blue
  tests: paint known breakages in yellow
  tests: test number comes first in 'not ok $count - $message'
</content>
</entry>
</feed>
