<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t0000-basic.sh, branch v1.7.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.7.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2010-06-21T13:02:44Z</updated>
<entry>
<title>Merge branch 'gv/portable'</title>
<updated>2010-06-21T13:02:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-06-21T13:02:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8d676d85f772ce3a100b6f0dddd1c34a7e4313cf'/>
<id>urn:sha1:8d676d85f772ce3a100b6f0dddd1c34a7e4313cf</id>
<content type='text'>
* gv/portable:
  test-lib: use DIFF definition from GIT-BUILD-OPTIONS
  build: propagate $DIFF to scripts
  Makefile: Tru64 portability fix
  Makefile: HP-UX 10.20 portability fixes
  Makefile: HPUX11 portability fixes
  Makefile: SunOS 5.6 portability fix
  inline declaration does not work on AIX
  Allow disabling "inline"
  Some platforms lack socklen_t type
  Make NO_{INET_NTOP,INET_PTON} configured independently
  Makefile: some platforms do not have hstrerror anywhere
  git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition
  test_cmp: do not use "diff -u" on platforms that lack one
  fixup: do not unconditionally disable "diff -u"
  tests: use "test_cmp", not "diff", when verifying the result
  Do not use "diff" found on PATH while building and installing
  enums: omit trailing comma for portability
  Makefile: -lpthread may still be necessary when libc has only pthread stubs
  Rewrite dynamic structure initializations to runtime assignment
  Makefile: pass CPPFLAGS through to fllow customization

Conflicts:
	Makefile
	wt-status.h
</content>
</entry>
<entry>
<title>tests: use "test_cmp", not "diff", when verifying the result</title>
<updated>2010-05-31T23:59:27Z</updated>
<author>
<name>Gary V. Vaughan</name>
<email>git@mlists.thewrittenword.com</email>
</author>
<published>2010-05-14T09:31:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4fdf71be1ca3a817851a14f91b75e7d30f885a48'/>
<id>urn:sha1:4fdf71be1ca3a817851a14f91b75e7d30f885a48</id>
<content type='text'>
In tests, call test_cmp rather than raw diff where possible (i.e. if
the output does not go to a pipe), to allow the use of, say, 'cmp'
when the default 'diff -u' is not compatible with a vendor diff.

When that is not possible, use $DIFF, as set in GIT-BUILD-OPTIONS.

Signed-off-by: Gary V. Vaughan &lt;gary@thewrittenword.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>test-lib: some shells do not let $? propagate into an eval</title>
<updated>2010-05-06T20:16:14Z</updated>
<author>
<name>Jonathan Nieder</name>
<email>jrnieder@gmail.com</email>
</author>
<published>2010-05-06T08:41:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b6b0afdc30e066788592ca07c9a6c6936c68cc11'/>
<id>urn:sha1:b6b0afdc30e066788592ca07c9a6c6936c68cc11</id>
<content type='text'>
In 3bf7886 (test-lib: Let tests specify commands to be run at end of
test, 2010-05-02), the git test harness learned to run cleanup
commands unconditionally at the end of a test.  During each test,
the intended cleanup actions are collected in the test_cleanup variable
and evaluated.  That variable looks something like this:

	eval_ret=$?; clean_something &amp;&amp; (exit "$eval_ret")
	eval_ret=$?; clean_something_else &amp;&amp; (exit "$eval_ret")
	eval_ret=$?; final_cleanup &amp;&amp; (exit "$eval_ret")
	eval_ret=$?

All cleanup actions are run unconditionally but if one of them fails
it is properly reported through $eval_ret.

On FreeBSD, unfortunately, $? is set at the beginning of an ‘eval’
to 0 instead of the exit status of the previous command.  This results
in tests using test_expect_code appearing to fail and all others
appearing to pass, unless their cleanup fails.  Avoid the problem by
setting eval_ret before the ‘eval’ begins.

Thanks to Jeff King for the explanation.

Cc: Jeff King &lt;peff@peff.net&gt;
Cc: Johannes Sixt &lt;j6t@kdbg.org&gt;
Acked-by: Jeff King &lt;peff@peff.net&gt;
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>Use prerequisite tags to skip tests that depend on symbolic links</title>
<updated>2009-03-22T16:26:44Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2009-03-04T21:38:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=704a3143d5ba0709727430154ef3dad600aad4de'/>
<id>urn:sha1:704a3143d5ba0709727430154ef3dad600aad4de</id>
<content type='text'>
Many tests depend on that symbolic links work.  This introduces a check
that sets the prerequisite tag SYMLINKS if the file system supports
symbolic links.  Since so many tests have to check for this prerequisite,
we do the check in test-lib.sh, so that we don't need to repeat the test
in many scripts.

To check for 'ln -s' failures, you can use a FAT partition on Linux:

$ mkdosfs -C git-on-fat 1000000
$ sudo mount -o loop,uid=j6t,gid=users,shortname=winnt git-on-fat /mnt

Clone git to /mnt and

$ GIT_SKIP_TESTS='t0001.1[34] t0010 t1301 t403[34] t4129.[47] t5701.7
          t7701.3 t9100 t9101.26 t9119 t9124.[67] t9200.10 t9600.6' \
        make test

(These additionally skipped tests depend on POSIX permissions that FAT on
Linux does not provide.)

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
</content>
</entry>
<entry>
<title>test-lib: Infrastructure to test and check for prerequisites</title>
<updated>2009-03-21T20:09:27Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2009-03-01T20:04:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a7bb394037e1c32d47d0b04da025bdbe2eb78d66'/>
<id>urn:sha1:a7bb394037e1c32d47d0b04da025bdbe2eb78d66</id>
<content type='text'>
Some tests can be run only if a particular prerequisite is available. For
example, some tests require that an UTF-8 locale is available. Here we
introduce functions that are used in this way:

1. Insert code that checks whether the prerequisite is available. If it is,
   call test_set_prereq with an arbitrary tag name that subsequently can be
   used to check for the prerequisite:

      case $LANG in
      *.utf-8)
            test_set_prereq UTF8
            ;;
      esac

2. In the calls to test_expect_success pass the tag name:

      test_expect_success UTF8 '...description...' '...tests...'

3. There is an auxiliary predicate that can be used anywhere to test for
   a prerequisite explicitly:

      if test_have_prereq UTF8
      then
            ...code to be skipped if prerequisite is not available...
      fi

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
</content>
</entry>
<entry>
<title>Tests: use test_cmp instead of diff where possible</title>
<updated>2009-03-17T21:25:52Z</updated>
<author>
<name>Miklos Vajna</name>
<email>vmiklos@frugalware.org</email>
</author>
<published>2009-03-16T20:18:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=188c3827c10f5a04588ef7af8b63a7b5dbcc38ed'/>
<id>urn:sha1:188c3827c10f5a04588ef7af8b63a7b5dbcc38ed</id>
<content type='text'>
Several old tests were written before test_cmp was introduced, convert
these to test_cmp.

If were are at it, fix the order of the arguments where necessary to
make expected come first, so the command shows how the test result
deviates from the correct output.

Signed-off-by: Miklos Vajna &lt;vmiklos@frugalware.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t/: Use "test_must_fail git" instead of "! git"</title>
<updated>2008-07-13T20:21:26Z</updated>
<author>
<name>Stephan Beyer</name>
<email>s-beyer@gmx.net</email>
</author>
<published>2008-07-12T15:47:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d492b31cafe9aa5ce001b1d48815f4c0bb40d01a'/>
<id>urn:sha1:d492b31cafe9aa5ce001b1d48815f4c0bb40d01a</id>
<content type='text'>
This patch changes every occurrence of "! git" -- with the meaning
that a git call has to gracefully fail -- into "test_must_fail git".

This is useful to

 - make sure the test does not fail because of a signal,
   e.g. SIGSEGV, and

 - advertise the use of "test_must_fail" for new tests.

Signed-off-by: Stephan Beyer &lt;s-beyer@gmx.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Fold test-absolute-path into test-path-utils</title>
<updated>2008-05-23T21:15:01Z</updated>
<author>
<name>David Reiss</name>
<email>dreiss@facebook.com</email>
</author>
<published>2008-05-20T06:49:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d553e737897e8edbbc2092bf345fc58b2dae5251'/>
<id>urn:sha1:d553e737897e8edbbc2092bf345fc58b2dae5251</id>
<content type='text'>
Signed-off-by: David Reiss &lt;dreiss@facebook.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Fix tests breaking when checkout path contains shell metacharacters</title>
<updated>2008-05-05T21:37:02Z</updated>
<author>
<name>Bryan Donlan</name>
<email>bdonlan@fushizen.net</email>
</author>
<published>2008-05-04T05:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f69e836fab2b634281d92a0d304de4d768e479cc'/>
<id>urn:sha1:f69e836fab2b634281d92a0d304de4d768e479cc</id>
<content type='text'>
This fixes the remainder of the issues where the test script itself is at
fault for failing when the git checkout path contains whitespace or other
shell metacharacters.

The majority of git svn tests used the idiom

  test_expect_success "title" "test script using $svnrepo"

These were changed to have the test script in single-quotes:

  test_expect_success "title" 'test script using "$svnrepo"'

which unfortunately makes the patch appear larger than it really is.

One consequence of this change is that in the verbose test output the
value of $svnrepo (and in some cases other variables, too) is no
longer expanded, i.e. previously we saw

  * expecting success:
	test script using /path/to/git/t/trash/svnrepo

but now it is:

  * expecting success:
	test script using "$svnrepo"

Signed-off-by: Bryan Donlan &lt;bdonlan@fushizen.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Fix make_absolute_path() for parameters without a slash</title>
<updated>2008-03-02T09:58:31Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>Johannes.Schindelin@gmx.de</email>
</author>
<published>2008-03-02T07:40:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e371a4c648e72673fcfdf0b45192857dd149e2f5'/>
<id>urn:sha1:e371a4c648e72673fcfdf0b45192857dd149e2f5</id>
<content type='text'>
When passing "xyz" to make_absolute_path(), make_absolute_path()
erroneously tried to chdir("xyz"), and then append "/xyz".  Instead,
skip the chdir() completely when no slash was found.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
