<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/lib-git-p4.sh, branch v2.7.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.7.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-11-20T13:02:06Z</updated>
<entry>
<title>git-p4: add trap to kill p4d on test exit</title>
<updated>2015-11-20T13:02:06Z</updated>
<author>
<name>Lars Schneider</name>
<email>larsxschneider@gmail.com</email>
</author>
<published>2015-11-19T08:58:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dfe90e8b528be4d9668b1bdc6329f8227cbf307a'/>
<id>urn:sha1:dfe90e8b528be4d9668b1bdc6329f8227cbf307a</id>
<content type='text'>
Sometimes the "prove" test runner hangs on test exit because p4d is
still running. Add a trap to always kill "p4d" on test exit.

You can reproduce the problem by commenting "P4D_TIMEOUT" in
"lib-git-p4.sh" and running "prove ./t9800-git-p4-basic.sh".

Signed-off-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>git-p4: add p4d timeout in tests</title>
<updated>2015-11-20T13:02:06Z</updated>
<author>
<name>Lars Schneider</name>
<email>larsxschneider@gmail.com</email>
</author>
<published>2015-11-19T08:58:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=842addef70e41f8bb8a16f4d9084432301c3f50f'/>
<id>urn:sha1:842addef70e41f8bb8a16f4d9084432301c3f50f</id>
<content type='text'>
In rare cases p4d seems to hang. This watchdog will kill the p4d
process after 300s in any case. That means each individual git p4 test
needs to finish before 300s or it will fail.

Signed-off-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Acked-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>git-p4: retry kill/cleanup operations in tests with timeout</title>
<updated>2015-11-20T13:02:06Z</updated>
<author>
<name>Lars Schneider</name>
<email>larsxschneider@gmail.com</email>
</author>
<published>2015-11-19T08:58:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=23aee4199a69fae861f9d173ee0ef1c2a7fab0d5'/>
<id>urn:sha1:23aee4199a69fae861f9d173ee0ef1c2a7fab0d5</id>
<content type='text'>
In rare cases kill/cleanup operations in tests fail. Retry these
operations with a timeout to make the test less flaky.

Signed-off-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>git-p4: add failing tests for case-folding p4d</title>
<updated>2015-04-28T19:19:43Z</updated>
<author>
<name>Luke Diamand</name>
<email>luke@diamand.org</email>
</author>
<published>2015-04-28T09:08:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e80967b28704930b4ca30f8dedf7ce0145c7eaa4'/>
<id>urn:sha1:e80967b28704930b4ca30f8dedf7ce0145c7eaa4</id>
<content type='text'>
When p4d runs on a case-folding OS, git-p4 can end up getting
very confused. This adds failing tests to demonstrate the problem.

Signed-off-by: Luke Diamand &lt;luke@diamand.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git p4 test: do not pollute /tmp</title>
<updated>2014-01-22T16:06:19Z</updated>
<author>
<name>Pete Wyckoff</name>
<email>pw@padd.com</email>
</author>
<published>2014-01-21T23:16:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0cf1b72a38e6190a7e614bbc53fbb81704a3d4af'/>
<id>urn:sha1:0cf1b72a38e6190a7e614bbc53fbb81704a3d4af</id>
<content type='text'>
Generating the submit template for p4 uses tempfile.mkstemp(),
which by default puts files in /tmp.  For a test that fails,
possibly on purpose, this is not cleaned up.  Run with TMPDIR
pointing into the trash directory so the temp files go away
with the test results.

To do this required some other minor changes.  First, the editor
is launched using system(editor + " " + template_file), using
shell expansion to build the command string.  This doesn't work
if editor has a space in it.  And is generally unwise as it's
easy to fool the shell into doing extra work.  Exec the args
directly, without shell expansion.

Second, without shell expansion, the trick of "P4EDITOR=:" used
in the tests doesn't work.  Use a real command, true, as the
non-interactive editor for testing.

Signed-off-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git p4 test: run as user "author"</title>
<updated>2014-01-22T16:05:27Z</updated>
<author>
<name>Pete Wyckoff</name>
<email>pw@padd.com</email>
</author>
<published>2014-01-21T23:16:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0055b56e10f77b1b5f5521b8ba3614f962a09288'/>
<id>urn:sha1:0055b56e10f77b1b5f5521b8ba3614f962a09288</id>
<content type='text'>
The tests use author@example.com as the canonical submitter,
but he does not have an entry in the p4 users database.
This causes the generated change description to complain
that the git and p4 users disagree.  The complaint message
is still valid, but isn't useful in tests.  It was introduced
in 848de9c (git-p4: warn if git authorship won't be retained,
2011-05-13).

Fix t9813 to use @example.com instead of @localhost due to
change in p4_add_user().  Move the function into the git p4
test library so author can be added at initialization time.

Signed-off-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git p4 test: sanitize P4CHARSET</title>
<updated>2013-08-12T06:19:08Z</updated>
<author>
<name>kazuki saitoh</name>
<email>ksaitoh560@gmail.com</email>
</author>
<published>2013-08-10T20:15:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=799460316b87c2b0f26c3c0fcd99ae153f9f7358'/>
<id>urn:sha1:799460316b87c2b0f26c3c0fcd99ae153f9f7358</id>
<content type='text'>
In the tests, p4d is started without using "internationalized
mode".  Make sure this environment variable is unset, otherwise
a mis-matched user setting would break the tests.  The error
message would be "Unicode clients require a unicode enabled server."

[pw: use unset, add commit text]

Signed-off-by: Kazuki Saitoh &lt;ksaitoh560@gmail.com&gt;
Signed-off-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git p4: cygwin p4 client does not mark read-only</title>
<updated>2013-01-27T06:00:39Z</updated>
<author>
<name>Pete Wyckoff</name>
<email>pw@padd.com</email>
</author>
<published>2013-01-27T03:11:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e9df0f9c7a7fbaed924273d0a9b502171ed23b7c'/>
<id>urn:sha1:e9df0f9c7a7fbaed924273d0a9b502171ed23b7c</id>
<content type='text'>
There are some old versions of p4, compiled for cygwin, that
treat read-only files differently.

Normally, a file that is not open is read-only, meaning that
"test -w" on the file is false.  This works on unix, and it works
on windows using the NT version of p4.  The cygwin version
of p4, though, changes the permissions, but does not set the
windows read-only attribute, so "test -w" returns false.

Notice this oddity and make the tests work, even on cygiwn.

Signed-off-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git p4 test: use LineEnd unix in windows tests too</title>
<updated>2013-01-27T06:00:39Z</updated>
<author>
<name>Pete Wyckoff</name>
<email>pw@padd.com</email>
</author>
<published>2013-01-27T03:11:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e93f8695939bae73fbf5122a9a8f53637dce8e39'/>
<id>urn:sha1:e93f8695939bae73fbf5122a9a8f53637dce8e39</id>
<content type='text'>
In all clients, even those created on windows, use unix line
endings.  This makes it possible to verify file contents without
doing OS-specific comparisons in all the tests.

Tests in t9802-git-p4-filetype.sh are used to make sure that
the other LineEnd options continue to work.

Signed-off-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git p4 test: translate windows paths for cygwin</title>
<updated>2013-01-27T06:00:39Z</updated>
<author>
<name>Pete Wyckoff</name>
<email>pw@padd.com</email>
</author>
<published>2013-01-27T03:11:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cfa96496bd9e7828c5626e2cd1353e9fb7d3d0c7'/>
<id>urn:sha1:cfa96496bd9e7828c5626e2cd1353e9fb7d3d0c7</id>
<content type='text'>
Native windows binaries do not understand posix-like
path mapping offered by cygwin.  Convert paths to native
using "cygpath --windows" before presenting them to p4d.

This is done using the AltRoots mechanism of p4.  Both the
posix and windows forms are put in the client specification,
allowing p4 to find its location by native path even though
the environment reports a different PWD.

Shell operations in tests will use the normal form of $cli,
which will look like a posix path in cygwin, while p4 will
use AltRoots to match against the windows form of the working
directory.

This mechanism also handles the symlink issue that was fixed in
23bd0c9 (git p4 test: use real_path to resolve p4 client
symlinks, 2012-06-27).  Now that every p4 client view has
an AltRoots with the real_path in it, explicitly calculating
the real_path elsewhere is not necessary.

Thanks-to: Sebastian Schuberth &lt;sschuberth@gmail.com&gt;
Thanks-to: Johannes Sixt &lt;j6t@kdbg.org&gt;

fixup! git p4 test: translate windows paths for cygwin

Signed-off-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
