Re: [PATCH] test-lib: try harder to ensure a working jgit

2019-05-15 Thread brian m. carlson
On Tue, May 14, 2019 at 04:45:34AM -0400, Jeff King wrote: > On Tue, May 14, 2019 at 02:14:19AM +, brian m. carlson wrote: > > I think this is an improvement, not only because of the reasons you > > mentioned, but because we remove the use of "type", which is not > > guaranteed to be present in

Re: [PATCH] test-lib: try harder to ensure a working jgit

2019-05-14 Thread Junio C Hamano
Todd Zullinger writes: >> This guards against cases where jgit is present on the system, but >> will fail to run, e.g. because of some JRE issue, or missing Java >> dependencies. Seeing if it gets far enough to process the >> "--version" argument isn't perfect, but seems to be goo

Re: [PATCH] test-lib: try harder to ensure a working jgit

2019-05-14 Thread Todd Zullinger
Hi, Jeff King wrote: > On Tue, May 14, 2019 at 02:14:19AM +, brian m. carlson wrote: > >> On Mon, May 13, 2019 at 10:05:20PM -0400, Todd Zullinger wrote: >>> diff --git a/t/test-lib.sh b/t/test-lib.sh >>> index 908ddb9c46..599fd70e14 100644 >>> --- a/t/test-lib.sh >>> +++ b/t/test-lib.sh >>>

Re: [PATCH] test-lib: try harder to ensure a working jgit

2019-05-14 Thread Todd Zullinger
Hi, Ævar Arnfjörð Bjarmason wrote: > > On Tue, May 14 2019, Jonathan Nieder wrote: > >> Todd Zullinger wrote: >> >>> The JGIT prereq uses 'type jgit' to determine whether jgit is present. >>> While this should be sufficient, if the jgit found is broken we'll waste >>> time running tests which fa

Re: [PATCH] test-lib: try harder to ensure a working jgit

2019-05-14 Thread Junio C Hamano
Jeff King writes: > All that said, I think Todd's patch makes perfect sense even without > wanting to avoid "type". Same here. t/lib-bash.sh seems to use "if type bash" to see if one is available on $PATH; I've never felt the need to avoid "type".

Re: [PATCH] test-lib: try harder to ensure a working jgit

2019-05-14 Thread Jeff King
On Tue, May 14, 2019 at 02:14:19AM +, brian m. carlson wrote: > On Mon, May 13, 2019 at 10:05:20PM -0400, Todd Zullinger wrote: > > diff --git a/t/test-lib.sh b/t/test-lib.sh > > index 908ddb9c46..599fd70e14 100644 > > --- a/t/test-lib.sh > > +++ b/t/test-lib.sh > > @@ -1522,7 +1522,7 @@ test_

Re: [PATCH] test-lib: try harder to ensure a working jgit

2019-05-14 Thread Ævar Arnfjörð Bjarmason
On Tue, May 14 2019, Jonathan Nieder wrote: > Todd Zullinger wrote: > >> The JGIT prereq uses 'type jgit' to determine whether jgit is present. >> While this should be sufficient, if the jgit found is broken we'll waste >> time running tests which fail due to no fault of our own. >> >> Use 'jgit

Re: [PATCH] test-lib: try harder to ensure a working jgit

2019-05-13 Thread Jonathan Nieder
Todd Zullinger wrote: > The JGIT prereq uses 'type jgit' to determine whether jgit is present. > While this should be sufficient, if the jgit found is broken we'll waste > time running tests which fail due to no fault of our own. > > Use 'jgit --version' instead, to catch some badly broken jgit >

Re: [PATCH] test-lib: try harder to ensure a working jgit

2019-05-13 Thread brian m. carlson
On Mon, May 13, 2019 at 10:05:20PM -0400, Todd Zullinger wrote: > diff --git a/t/test-lib.sh b/t/test-lib.sh > index 908ddb9c46..599fd70e14 100644 > --- a/t/test-lib.sh > +++ b/t/test-lib.sh > @@ -1522,7 +1522,7 @@ test_lazy_prereq NOT_ROOT ' > ' > > test_lazy_prereq JGIT ' > - type jgit >

[PATCH] test-lib: try harder to ensure a working jgit

2019-05-13 Thread Todd Zullinger
The JGIT prereq uses 'type jgit' to determine whether jgit is present. While this should be sufficient, if the jgit found is broken we'll waste time running tests which fail due to no fault of our own. Use 'jgit --version' instead, to catch some badly broken jgit installations. Signed-off-by: Tod