4 Commits

Author SHA1 Message Date
Darragh Bailey
7f69ada396 Enable color support based on tty and config
Use the git config command and provided options to have git detect
whether color support should be enabled or disabled. Additionally ensure
that git-review color support can be controlled separately via the
option 'color.review', while still falling back to 'color.ui' if the app
specific option is not defined.

This will ensure that when piping or redirecting the output that colour
output will be disabled unless color.review, or it's fallback color.ui,
is set to always.

Also by utilizing 'git config', the any config options specified on the
command line that change behaviour will be adhered to. e.g.

  git -c color.review=never review -l

Will always output without color enabled.

Change-Id: I8f83ed8623da88e87972109af956331704e15d38
Closes-Bug: #1097961
2014-11-26 20:35:09 +00:00
Yuriy Taraday
d3e2986fa1 Wrap exceptions that occur while running external process
This should help identify problem with timeouts.

Change-Id: I663b1ca3fe9a74ed0869fefdb16583951e3db6a5
2014-02-13 13:46:44 +04:00
Yuriy Taraday
9a7f8ad613 Make Gerrit port and dir selection deterministic
For every test number N run in process with PID, we take address
127.N.PID/256.PID%256 and let Gerrit listen on its default ports (29418
for SSH and 8080 for HTTP) on that address. We also name site dir with
the same address with "site-" prefix.

Thanks to Clark Boylan for this great idea.

Change-Id: I95b010e7a5b96c981614d5d3401efe861534806f
2014-02-13 11:46:13 +04:00
Dina Belova
e99aa8b16d Implement integration tests.
Provide intergation testing for the git-review utility. Requires
Gerrit war file (like 2.6.1-gerrit.war) in the .gerrit directory in
the git-review project (like git-review/.gerrit/2.6.1-gerrit.war).

Tests start local Gerrit and create test user and project there to
be used.

Closes-Bug: 1048724
Change-Id: I3242479dcbcf230085178004540992680f3f8e30
2013-08-15 21:08:08 +00:00