Re: [PATCH] Several tests: cd inside subshell instead of around
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Sep 7, 2010, 05:19 UTC
- Message-ID
- <20100907051922.GP1182@burratino>
- In-Reply-To
- <7vlj7ep2ch.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
Show 6 quoted lines
>> I like it. Affected test scripts: >> ... (many) ... >> and probably some others. > > For the record, I _do not_ like it at all. Is it worth being that > draconian and say each test must start at $TRASH? What do we gain by it?
To clarify, what I meant was something like "I like it, but reality does not seem to permit it now".
Show 6 quoted lines
> After we vet and apply Jens and your "turn 'cd there && do this && cd ..' > into a subshell" series, and the "modernize indentation style" series, > perhaps we should stop and think? In an ideal world, it would be really > nice if each "test_expect_success/failure" in a single script were > independent from each other (if we did so, GIT_SKIP_TESTS=4321.4 starts to > be more useful), but realistically, I don't think it is worth the effort.
Ah, our emails crossed. I would rather that tests that affect the state be marked as such, nothing more. The "always return to $TRASH" rule is a lot stronger than that, unfortunately. What I really liked about your suggestion is that the "tests must start and end in $TRASH" rule could be checked with very little effort. Unfortunately, as the list of scripts illustrates, that rule doesn't describe what our current tests do.