<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/ci, branch v2.17.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.17.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.17.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-03-14T19:01:03Z</updated>
<entry>
<title>Merge branch 'sg/test-x'</title>
<updated>2018-03-14T19:01:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-14T19:01:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=571e472dc43f7b401b27cdcab5d43b0e66b9d203'/>
<id>urn:sha1:571e472dc43f7b401b27cdcab5d43b0e66b9d203</id>
<content type='text'>
Running test scripts under -x option of the shell is often not a
useful way to debug them, because the error messages from the
commands tests try to capture and inspect are contaminated by the
tracing output by the shell.  An earlier work done to make it more
pleasant to run tests under -x with recent versions of bash is
extended to cover posix shells that do not support BASH_XTRACEFD.

* sg/test-x:
  travis-ci: run tests with '-x' tracing
  t/README: add a note about don't saving stderr of compound commands
  t1510-repo-setup: mark as untraceable with '-x'
  t9903-bash-prompt: don't check the stderr of __git_ps1()
  t5570-git-daemon: don't check the stderr of a subshell
  t5526: use $TRASH_DIRECTORY to specify the path of GIT_TRACE log file
  t5500-fetch-pack: don't check the stderr of a subshell
  t3030-merge-recursive: don't check the stderr of a subshell
  t1507-rev-parse-upstream: don't check the stderr of a shell function
  t: add means to disable '-x' tracing for individual test scripts
  t: prevent '-x' tracing from interfering with test helpers' stderr
</content>
</entry>
<entry>
<title>Merge branch 'sg/travis-build-during-script-phase'</title>
<updated>2018-03-08T20:36:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-08T20:36:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c710d182ea6d3846f6f2dc6f1b6c7dbd35c2fce8'/>
<id>urn:sha1:c710d182ea6d3846f6f2dc6f1b6c7dbd35c2fce8</id>
<content type='text'>
Build the executable in 'script' phase in Travis CI integration, to
follow the established practice, rather than during 'before_script'
phase.  This allows the CI categorize the failures better ('failed'
is project's fault, 'errored' is build environment's).

* sg/travis-build-during-script-phase:
  travis-ci: build Git during the 'script' phase
</content>
</entry>
<entry>
<title>travis-ci: run tests with '-x' tracing</title>
<updated>2018-02-28T20:57:51Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-02-23T23:39:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=aedffe9525084e3fcea251c8dd453c14deab6f4d'/>
<id>urn:sha1:aedffe9525084e3fcea251c8dd453c14deab6f4d</id>
<content type='text'>
Now that the test suite runs successfully with '-x' tracing even with
/bin/sh, enable it on Travis CI in order to

  - get more information about test failures, and

  - catch constructs breaking '-x' with /bin/sh sneaking into our test
    suite.

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 'sg/travis-linux32-sanity'</title>
<updated>2018-02-13T21:39:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-02-13T21:39:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=798224a1c97ccdeb5f80d97914c7447e356670ac'/>
<id>urn:sha1:798224a1c97ccdeb5f80d97914c7447e356670ac</id>
<content type='text'>
Travis updates.

* sg/travis-linux32-sanity:
  travis-ci: don't fail if user already exists on 32 bit Linux build job
  travis-ci: don't run the test suite as root in the 32 bit Linux build
  travis-ci: don't repeat the path of the cache directory
  travis-ci: use 'set -e' in the 32 bit Linux build job
  travis-ci: use 'set -x' for the commands under 'su' in the 32 bit Linux build
</content>
</entry>
<entry>
<title>Merge branch 'tg/split-index-fixes'</title>
<updated>2018-02-13T21:39:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-02-13T21:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e75c862125f219c983cd2980d1b33ec09a3c34b9'/>
<id>urn:sha1:e75c862125f219c983cd2980d1b33ec09a3c34b9</id>
<content type='text'>
The split-index mode had a few corner case bugs fixed.

* tg/split-index-fixes:
  travis: run tests with GIT_TEST_SPLIT_INDEX
  split-index: don't write cache tree with null oid entries
  read-cache: fix reading the shared index for other repos
</content>
</entry>
<entry>
<title>travis-ci: don't fail if user already exists on 32 bit Linux build job</title>
<updated>2018-01-30T21:27:19Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-01-29T17:17:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6b995760dc463d050791d3815c20e4cb78ce4c2c'/>
<id>urn:sha1:6b995760dc463d050791d3815c20e4cb78ce4c2c</id>
<content type='text'>
The 32 bit Linux build job runs in a Docker container, which lends
itself to running and debugging locally, too.  Especially during
debugging one usually doesn't want to start with a fresh container
every time, to save time spent on installing a bunch of dependencies.
However, that doesn't work quite smootly, because the script running
in the container always creates a new user, which then must be removed
every time before subsequent executions, or the build script fails.

Make this process more convenient and don't try to create that user if
it already exists and has the right user ID in the container, so
developers don't have to bother with running a 'userdel' each time
before they run the build script.

The build job on Travis CI always starts with a fresh Docker
container, so this change doesn't make a difference there.

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>travis-ci: don't run the test suite as root in the 32 bit Linux build</title>
<updated>2018-01-30T21:27:19Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-01-29T17:17:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=533033024a15ad2aa7b853277cbb8f04d74edc48'/>
<id>urn:sha1:533033024a15ad2aa7b853277cbb8f04d74edc48</id>
<content type='text'>
Travis CI runs the 32 bit Linux build job in a Docker container, where
all commands are executed as root by default.  Therefore, ever since
we added this build job in 88dedd5e7 (Travis: also test on 32-bit
Linux, 2017-03-05), we have a bit of code to create a user in the
container matching the ID of the host user and then to run the test
suite as this user.  Matching the host user ID is important, because
otherwise the host user would have no access to any files written by
processes running in the container, notably the logs of failed tests
couldn't be included in the build job's trace log.

Alas, this piece of code never worked, because it sets the variable
holding the user name ($CI_USER) in a subshell, meaning it doesn't
have any effect by the time we get to the point to actually use the
variable to switch users with 'su'.  So all this time we were running
the test suite as root.

Reorganize that piece of code in 'ci/run-linux32-build.sh' a bit to
avoid that problematic subshell and to ensure that we switch to the
right user.  Furthermore, make the script's optional host user ID
option mandatory, so running the build accidentally as root will
become harder when debugging locally.  If someone really wants to run
the test suite as root, whatever the reasons might be, it'll still be
possible to do so by explicitly passing '0' as host user ID.

Finally, one last catch: since commit 7e72cfcee (travis-ci: save prove
state for the 32 bit Linux build, 2017-12-27) the 'prove' test harness
has been writing its state to the Travis CI cache directory from
within the Docker container while running as root.  After this patch
'prove' will run as a regular user, so in future build jobs it won't
be able overwrite a previously written, still root-owned state file,
resulting in build job failures.  To resolve this we should manually
delete caches containing such root-owned files, but that would be a
hassle.  Instead, work this around by changing the owner of the whole
contents of the cache directory to the host user ID.

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>travis-ci: don't repeat the path of the cache directory</title>
<updated>2018-01-30T21:27:19Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-01-29T17:17:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b2cbaa091ca676478d131afd40ca4717cc5eed39'/>
<id>urn:sha1:b2cbaa091ca676478d131afd40ca4717cc5eed39</id>
<content type='text'>
Some of our 'ci/*' scripts repeat the name or full path of the Travis
CI cache directory, and the following patches will add new places
using that path.

Use a variable to refer to the path of the cache directory instead, so
it's hard-coded only in a single place.

Pay extra attention to the 32 bit Linux build: it runs in a Docker
container, so pass the path of the cache directory from the host to
the container in an environment variable.  Note that an environment
variable passed this way is exported inside the container, therefore
its value is directly available in the 'su' snippet even though that
snippet is single quoted.  Furthermore, use the variable in the
container only if it's been assigned a non-empty value, to prevent
errors when someone is running or debugging the Docker build locally,
because in that case the variable won't be set as there won't be any
Travis CI cache.

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>travis-ci: use 'set -e' in the 32 bit Linux build job</title>
<updated>2018-01-30T21:27:18Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-01-29T17:17:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=04d47e969a1fb952baffbd12a1a0dd2dc6cd2746'/>
<id>urn:sha1:04d47e969a1fb952baffbd12a1a0dd2dc6cd2746</id>
<content type='text'>
The script 'ci/run-linux32-build.sh' running inside the Docker
container of the 32 bit Linux build job uses an &amp;&amp; chain to break the
build if one of the commands fails.  This is problematic for two
reasons:

  - The &amp;&amp; chain is broken, because there is this in the middle:

    test -z $HOST_UID || (CI_USER="ci" &amp;&amp; useradd -u $HOST_UID $CI_USER) &amp;&amp;

    Luckily it is broken in a way that it didn't lead to false
    successes.  If installing dependencies fails, then the rest of the
    first &amp;&amp; chain is skipped and execution resumes  after the ||
    operator.  At that point $HOST_UID is still unset, causing
    'useradd' to error out with "invalid user ID 'ci'", which in turn
    causes the second &amp;&amp; chain to abort the script and thus break the
    build.

  - All other 'ci/*' scripts use 'set -e' to break the build if one of
    the commands fails.  This inconsistency among these scripts is
    asking for trouble: I forgot about the &amp;&amp; chain more than once
    while working on this patch series.

Enable 'set -e' for the whole script and for the commands executed
under 'su' as well.

While touching every line in the 'su' command block anyway, change
their indentation to use a tab instead of spaces.

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>travis-ci: use 'set -x' for the commands under 'su' in the 32 bit Linux build</title>
<updated>2018-01-30T21:27:18Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-01-29T17:17:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f63b12392aa16a8a7a68900afa906b0382345aad'/>
<id>urn:sha1:f63b12392aa16a8a7a68900afa906b0382345aad</id>
<content type='text'>
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>
</feed>
