Thread (1 message) 1 message, 1 author, 2018-05-07

Re: [PATCH] tests: introduce test_unset_prereq, for debugging

From: Junio C Hamano <hidden>
Date: 2018-05-07 14:22:42

SZEDER Gábor [off-list ref] writes:
quoted
For convenience, the following two methods are now supported ways to
pretend that a prereq is not met:

	test_set_prereq !GPG

and

	test_unset_prereq GPG
I'm not sure this is the right way to do this.

I wanted to run the whole test suite with all GPG tests skipped the
other day.  With this 'test_unset_prereq' I would have to modify all
test scripts containing tests depending on the GPG prereq and add
'test_unset_prereq GPG', right?
Excellent point.  This won't cover that use case well.

That does not mean this change is useless.  If you are focusing on
developing a single test script, you can afford to tentatively add
these set/unset, just like you tentatively debug with echo's ;-)

But I find your SKIP_PREREQS an excellent idea.

It may want to be FORCE_PREREQS that lets you pretend a prereq is
not satisfied on your machine even when it actually is, and also
lets you pretend a prereq is satisfied on your machine even when it
is not.  SKIP_PREREQS would only do the first half, which would be
sufficient most of the time, though.
I think we would be better served by an environment variable similar
to $GIT_SKIP_TESTS, e.g. $GIT_SKIP_PREREQS, to list all the prereqs
that should be skipped even if they were met.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help