<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t0000-basic.sh, branch v2.26.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.26.1</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.26.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-02-05T22:34:57Z</updated>
<entry>
<title>Merge branch 'dl/test-must-fail-fixes'</title>
<updated>2020-02-05T22:34:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-02-05T22:34:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=381e8e9de142b636e4a25b6df113d70168e21a34'/>
<id>urn:sha1:381e8e9de142b636e4a25b6df113d70168e21a34</id>
<content type='text'>
Test clean-up.

* dl/test-must-fail-fixes:
  t1507: inline full_name()
  t1507: run commands within test_expect_success
  t1507: stop losing return codes of git commands
  t1501: remove use of `test_might_fail cp`
  t1409: use test_path_is_missing()
  t1409: let sed open its own input file
  t1307: reorder `nongit test_must_fail`
  t1306: convert `test_might_fail rm` to `rm -f`
  t0020: use ! check_packed_refs_marked
  t0020: don't use `test_must_fail has_cr`
  t0003: don't use `test_must_fail attr_check`
  t0003: use test_must_be_empty()
  t0003: use named parameters in attr_check()
  t0000: replace test_must_fail with run_sub_test_lib_test_err()
  t/lib-git-p4: use test_path_is_missing()
</content>
</entry>
<entry>
<title>t0000: replace test_must_fail with run_sub_test_lib_test_err()</title>
<updated>2019-12-20T19:30:44Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-12-20T18:15:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7717242014dc59f58db7e56c2b8f9fc79e04fa0b'/>
<id>urn:sha1:7717242014dc59f58db7e56c2b8f9fc79e04fa0b</id>
<content type='text'>
The test_must_fail function should only be used for git commands since
we should assume that external commands work sanely. We use
test_must_fail to test run_sub_test_lib_test() but that function does
not invoke any git commands internally. Even better, we have a function
that's exactly meant to be used when we expect to have a failing test
suite: run_sub_test_lib_test_err()!

Replace `test_must_fail run_sub_test_lib_test` with
`run_sub_test_lib_test_err`.

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 'sg/test-bool-env'</title>
<updated>2019-12-05T20:52:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-05T20:52:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e0f9ec90278ec989ac7840a69f42a414f0db23f5'/>
<id>urn:sha1:e0f9ec90278ec989ac7840a69f42a414f0db23f5</id>
<content type='text'>
Recently we have declared that GIT_TEST_* variables take the
usual boolean values (it used to be that some used "non-empty
means true" and taking GIT_TEST_VAR=YesPlease as true); make
sure we notice and fail when non-bool strings are given to
these variables.

* sg/test-bool-env:
  t5608-clone-2gb.sh: turn GIT_TEST_CLONE_2GB into a bool
  tests: add 'test_bool_env' to catch non-bool GIT_TEST_* values
</content>
</entry>
<entry>
<title>Merge branch 'dl/t5520-cleanup'</title>
<updated>2019-12-05T20:52:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-05T20:52:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8feb47e8824e16c0913028a59cfaa6d76fc9f209'/>
<id>urn:sha1:8feb47e8824e16c0913028a59cfaa6d76fc9f209</id>
<content type='text'>
Test cleanup.

* dl/t5520-cleanup:
  t5520: replace `! git` with `test_must_fail git`
  t5520: remove redundant lines in test cases
  t5520: replace $(cat ...) comparison with test_cmp
  t5520: don't put git in upstream of pipe
  t5520: test single-line files by git with test_cmp
  t5520: use test_cmp_rev where possible
  t5520: replace test -{n,z} with test-lib functions
  t5520: use test_line_count where possible
  t5520: remove spaces after redirect operator
  t5520: replace test -f with test-lib functions
  t5520: let sed open its own input
  t5520: use sq for test case names
  t5520: improve test style
  t: teach test_cmp_rev to accept ! for not-equals
  t0000: test multiple local assignment
</content>
</entry>
<entry>
<title>tests: add 'test_bool_env' to catch non-bool GIT_TEST_* values</title>
<updated>2019-11-23T02:16:08Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2019-11-22T13:14:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=43a2afee82acd0c51609a7840ca71ac5291020b4'/>
<id>urn:sha1:43a2afee82acd0c51609a7840ca71ac5291020b4</id>
<content type='text'>
Since 3b072c577b (tests: replace test_tristate with "git env--helper",
2019-06-21) we get the normalized bool values of various GIT_TEST_*
environment variables via 'git env--helper'.  Now, while the 'git
env--helper' command itself does catch invalid values in the
environment variable or in the given --default and exits with error
(exit code 128 or 129, respectively), it's invoked in conditions like
'if ! git env--helper ...', which means that all invalid bool values
are interpreted the same as the ordinary 'false' (exit code 1).  This
has led to inadvertently skipped httpd tests in our CI builds for a
couple of weeks, see 3960290675 (ci: restore running httpd tests,
2019-09-06).

Let's be more careful about what the test suite accepts as bool values
in GIT_TEST_* environment variables, and error out loud and clear on
invalid values instead of simply skipping tests.  Add the
'test_bool_env' helper function to encapsulate the invocation of 'git
env--helper' and the verification of its exit code, and replace all
invocations of that command in our test framework and test suite with
a call to this new helper (except in 't0017-env-helper.sh', of
course).

  $ GIT_TEST_GIT_DAEMON=YesPlease ./t5570-git-daemon.sh
  fatal: bad numeric config value 'YesPlease' for 'GIT_TEST_GIT_DAEMON': invalid unit
  error: test_bool_env requires bool values both for $GIT_TEST_GIT_DAEMON and for the default fallback

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>t0000: test multiple local assignment</title>
<updated>2019-11-21T00:40:08Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-11-14T00:52:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8cb7980382855f9f696924fec70ed88ea6895030'/>
<id>urn:sha1:8cb7980382855f9f696924fec70ed88ea6895030</id>
<content type='text'>
According to POSIX enhancement request '0000767: Add built-in
"local"'[1],

	dash only allows one variable in a local definition; it permits
	assignment though it doesn't document that clearly.

however, this isn't true since t0000 still passes with this patch
applied on dash 0.5.10.2. Needless to say, since `local` isn't POSIX
standardized, it is not exactly clear what `local` entails on different
versions of different shells.

We currently already have many instances of multiple local assignments
in our codebase. Ensure that this is actually supported by explicitly
testing that it is sane.

[1]: http://austingroupbugs.net/bug_view_page.php?bug_id=767

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>Fix spelling errors in comments of testcases</title>
<updated>2019-11-10T07:00:54Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2019-11-05T17:07:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7a40cf1553a3fce9200d665352ff556d153d4a2d'/>
<id>urn:sha1:7a40cf1553a3fce9200d665352ff556d153d4a2d</id>
<content type='text'>
Reported-by: Jens Schleusener &lt;Jens.Schleusener@fossies.org&gt;
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>Merge branch 'dl/t0000-skip-test-test'</title>
<updated>2019-10-15T04:48:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-10-15T04:48:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4e8371ec26f0baeca9ff47233805dc1010d8e8d9'/>
<id>urn:sha1:4e8371ec26f0baeca9ff47233805dc1010d8e8d9</id>
<content type='text'>
test update.

* dl/t0000-skip-test-test:
  t0000: cover GIT_SKIP_TESTS blindspots
</content>
</entry>
<entry>
<title>t0000: cover GIT_SKIP_TESTS blindspots</title>
<updated>2019-10-09T01:47:08Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-10-08T09:22:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b05b40930ebfbd12ba89f73f15a46dfb107b16f6'/>
<id>urn:sha1:b05b40930ebfbd12ba89f73f15a46dfb107b16f6</id>
<content type='text'>
Currently, the tests for GIT_SKIP_TESTS do not cover the situation where
we skip an entire test suite. The tests also do not cover the situation
where we have GIT_SKIP_TESTS defined but the test suite does not match.

Add two test cases so we cover this blindspot.

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 'sg/show-failed-test-names'</title>
<updated>2019-08-22T19:34:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-08-22T19:34:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8ae7a46c4d74d14defe31cb5421787bc22b6b462'/>
<id>urn:sha1:8ae7a46c4d74d14defe31cb5421787bc22b6b462</id>
<content type='text'>
The first line of verbose output from each test piece now carries
the test name and number to help scanning with eyeballs.

* sg/show-failed-test-names:
  tests: show the test name and number at the start of verbose output
  t0000-basic: use realistic test script names in the verbose tests
</content>
</entry>
</feed>
