<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t0000-basic.sh, branch v2.30.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.30.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.30.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-11-25T23:24:54Z</updated>
<entry>
<title>Merge branch 'sg/tests-prereq'</title>
<updated>2020-11-25T23:24:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-25T23:24:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7bd645e21d1ec66ec265d83e7f68e21086cc0a98'/>
<id>urn:sha1:7bd645e21d1ec66ec265d83e7f68e21086cc0a98</id>
<content type='text'>
A lazily defined test prerequisite can now be defined in terms of
another lazily defined test prerequisite.

* sg/tests-prereq:
  tests: fix description of 'test_set_prereq'
  tests: make sure nested lazy prereqs work reliably
</content>
</entry>
<entry>
<title>tests: make sure nested lazy prereqs work reliably</title>
<updated>2020-11-18T20:38:18Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2020-11-18T19:04:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=53ff3b96a87f34c66ffe4a784841c31cf9feb262'/>
<id>urn:sha1:53ff3b96a87f34c66ffe4a784841c31cf9feb262</id>
<content type='text'>
Some test prereqs depend on other prereqs, so in a couple of cases we
have nested prereqs that look something like this:

  test_lazy_prereq FOO '
      test_have_prereq BAR &amp;&amp;
      check-foo
  '

This can be problematic, because lazy prereqs are evaluated in the
'$TRASH_DIRECTORY/prereq-test-dir' directory, which is the same for
every prereq, and which is automatically removed after the prereq has
been evaluated.  So if the inner prereq (BAR above) is a lazy prereq
that hasn't been evaluated yet, then after its evaluation the
'prereq-test-dir' shared with the outer prereq will be removed.
Consequently, 'check-foo' will find itself in a non-existing
directory, and won't be able to create/access any files in its cwd,
which could result in an unfulfilled outer prereq.

Luckily, this doesn't affect any of our current nested prereqs, either
because the inner prereq is not a lazy prereq (e.g. MINGW, CYGWIN or
PERL), or because the outer prereq happens to be checked without
touching any paths in its cwd (GPGSM and RFC1991 in 'lib-gpg.sh').

So to prevent nested prereqs from interfering with each other let's
evaluate each prereq in its own dedicated directory by appending the
prereq's name to the directory name, e.g. 'prereq-test-dir-SYMLINKS'.
In the test we check not only that the prereq test dir is still there,
but also that the inner prereq can't mess with the outer prereq's
files.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'en/test-selector'</title>
<updated>2020-11-02T21:17:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-02T21:17:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9879f3b3f6dc055099a045c67a1f086d60eb0200'/>
<id>urn:sha1:9879f3b3f6dc055099a045c67a1f086d60eb0200</id>
<content type='text'>
Our test scripts can be told to run only individual pieces while
skipping others with the "--run=..." option; they were taught to
take a substring of test title, in addition to numbers, to name the
test pieces to run.

* en/test-selector:
  test-lib: reduce verbosity of skipped tests
  t6006, t6012: adjust tests to use 'setup' instead of synonyms
  test-lib: allow selecting tests by substring/glob with --run
</content>
</entry>
<entry>
<title>test-lib: allow selecting tests by substring/glob with --run</title>
<updated>2020-10-18T20:18:36Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2020-10-18T00:23:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f21ac368f15b0a4df301c65a9a603c4e57277f57'/>
<id>urn:sha1:f21ac368f15b0a4df301c65a9a603c4e57277f57</id>
<content type='text'>
Many of our test scripts have several "setup" tests.  It's a lot easier
to say

   ./t0050-filesystem.sh --run=setup,9

in order to run all the setup tests as well as test #9, than it is to
track down what all the setup tests are and enter all their numbers in
the list.  Also, I often find myself wanting to run just one or a couple
tests from the test file, but I don't know the numbering of any of the
tests -- to get it I either have to first run the whole test file (or
start counting by hand or figure out some other clever but non-obvious
tricks).  It's really convenient to be able to just look at the test
description(s) and then run

   ./t6416-recursive-corner-cases.sh --run=symlink

or

   ./t6402-merge-rename.sh --run='setup,unnecessary update'

Add such an ability to test selection which relies on merely matching
against the test description.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t0000: use test_path_is_file instead of "test -f"</title>
<updated>2020-10-18T19:55:25Z</updated>
<author>
<name>Caleb Tillman</name>
<email>caleb.tillman@gmail.com</email>
</author>
<published>2020-10-17T02:43:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ac9b5475487c95c33ebd66a9c2207be63f07cc30'/>
<id>urn:sha1:ac9b5475487c95c33ebd66a9c2207be63f07cc30</id>
<content type='text'>
Signed-off-by: Caleb Tillman &lt;caleb.tillman@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/sha-256-part-3'</title>
<updated>2020-08-12T01:04:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-08-12T01:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e0ad9574ddf5bb14d9ed6808112485ce0da99fea'/>
<id>urn:sha1:e0ad9574ddf5bb14d9ed6808112485ce0da99fea</id>
<content type='text'>
The final leg of SHA-256 transition.

* bc/sha-256-part-3: (39 commits)
  t: remove test_oid_init in tests
  docs: add documentation for extensions.objectFormat
  ci: run tests with SHA-256
  t: make SHA1 prerequisite depend on default hash
  t: allow testing different hash algorithms via environment
  t: add test_oid option to select hash algorithm
  repository: enable SHA-256 support by default
  setup: add support for reading extensions.objectformat
  bundle: add new version for use with SHA-256
  builtin/verify-pack: implement an --object-format option
  http-fetch: set up git directory before parsing pack hashes
  t0410: mark test with SHA1 prerequisite
  t5308: make test work with SHA-256
  t9700: make hash size independent
  t9500: ensure that algorithm info is preserved in config
  t9350: make hash size independent
  t9301: make hash size independent
  t9300: use $ZERO_OID instead of hard-coded object ID
  t9300: abstract away SHA-1-specific constants
  t8011: make hash size independent
  ...
</content>
</entry>
<entry>
<title>t: remove test_oid_init in tests</title>
<updated>2020-07-30T16:16:49Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2020-07-29T23:14:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e023ff0691ca207d421a0e75ea23c132ada9142a'/>
<id>urn:sha1:e023ff0691ca207d421a0e75ea23c132ada9142a</id>
<content type='text'>
Now that we call test_oid_init in the setup for all test scripts,
there's no point in calling it individually.  Remove all of the places
where we've done so to help keep tests tidy.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Reviewed-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t: add test_oid option to select hash algorithm</title>
<updated>2020-07-30T16:16:49Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2020-07-29T23:14:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ceaa4b3ad7f1927fdfa8164e1bfecece4da48329'/>
<id>urn:sha1:ceaa4b3ad7f1927fdfa8164e1bfecece4da48329</id>
<content type='text'>
In some tests, we have data files which are written with a particular
hash algorithm. Instead of keeping two copies of the test files, we can
keep one, and translate the value on the fly.

In order to do so, we'll need to read both the source algorithm and the
current algorithm, so add an optional flag to the test_oid helper that
lets us look up a value for a specified hash algorithm. This should
not cause any conflicts with existing tests, since key arguments to
test_oid are allowed to contains only shell identifier characters.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Reviewed-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>test-lib-functions: restrict test_must_fail usage</title>
<updated>2020-07-07T22:47:16Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2020-07-07T06:04:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6a67c759489e1025665adf78326e9e0d0981bab5'/>
<id>urn:sha1:6a67c759489e1025665adf78326e9e0d0981bab5</id>
<content type='text'>
In previous commits, we removed the usage of test_must_fail() for most
commands except for a set of pre-approved commands. Since that's done,
only allow test_must_fail() to run those pre-approved commands.

Obviously, we should allow `git`.

We allow `__git*` as some completion functions return an error code that
comes from a git invocation. It's good to avoid using test_must_fail
unnecessarily but it wouldn't hurt to err on the side of caution when
we're potentially wrapping a git command (like in these cases).

We also allow `test-tool` and `test-svn-fe` because these are helper
commands that are written by us and we want to catch their failure.

Finally, we allow `test_terminal` because `test_terminal` just wraps
around git commands. Also, we cannot rewrite
`test_must_fail test_terminal` as `test_terminal test_must_fail` because
test_must_fail() is a shell function and as a result, it cannot be
invoked from the test-terminal Perl script.

We opted to explicitly list the above tools instead of using a catch-all
such as `test[-_]*` because we want to be as restrictive as possible so
that in the future, someone would not accidentally introduce an
unrelated usage of test_must_fail() on an "unapproved" command.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cb/t0000-use-the-configured-shell'</title>
<updated>2020-05-08T21:25:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-05-08T21:25:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41eae3eaa81c5f2b61b2610ed74de15c4291b318'/>
<id>urn:sha1:41eae3eaa81c5f2b61b2610ed74de15c4291b318</id>
<content type='text'>
The basic test did not honor $TEST_SHELL_PATH setting, which has
been corrected.

* cb/t0000-use-the-configured-shell:
  t/t0000-basic: make sure subtests also use TEST_SHELL_PATH
</content>
</entry>
</feed>
