Thread (4 messages) 4 messages, 3 authors, 2024-03-31

Re: [PATCH] test-lib: fix non-functioning GIT_TEST_MAINT_SCHEDULER fallback

From: Eric Sunshine <hidden>
Date: 2024-03-31 06:51:28

On Fri, Mar 29, 2024 at 6:27 PM Eric Sunshine [off-list ref] wrote:
When environment variable GIT_TEST_MAINT_SCHEDULER is set, `git
maintenance` invokes the command specified as the variable's value
rather than invoking the actual underlying platform-specific scheduler
management command. By setting GIT_TEST_MAINT_SCHEDULER to some suitable
value, test authors can therefore validate behavior of "destructive"
`git maintenance` commands without having to worry about clobbering the
user's own local scheduler configuration.

In order to protect an absent-minded test author from forgetting to set
GIT_TEST_MAINT_SCHEDULER in the local test script (and thus clobbering
his or her own scheduler configuration), t/test-lib.sh assigns an
"immediately error-out" value to GIT_TEST_MAINT_SCHEDULER by default
which should ensure that the problem will be caught and reported before
any damage can be done to the configuration of the person running the
tests.

Unfortunately, however, t/test-lib.sh neglects to export
GIT_TEST_MAINT_SCHEDULER, which renders the default "error-out"
assignment worthles. Fix this by exporting the variable as originally
intended.
s/worthles/worthless/

(I won't reroll just for this minor typo.)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help