Thread (17 messages) flat view 17 messages, 3 authors, 2017-01-27

Re: [PATCH v2] t/Makefile: add a rule to re-run previously-failed tests

From: Johannes Schindelin <hidden>
Date: 2016-08-31 10:29:33

Hi Ævar,

On Tue, 30 Aug 2016, Ævar Arnfjörð Bjarmason wrote:
On Tue, Aug 30, 2016 at 10:51 PM, Jeff King [off-list ref] wrote:
quoted
On Tue, Aug 30, 2016 at 10:48:19PM +0200, Ævar Arnfjörð Bjarmason wrote:
quoted
quoted
 -failed: $(patsubst trash,,$(patsubst directory.%,%.sh,$(wildcard trash\ directory.t[0-9]*)))
 +failed:
 +      @failed=$$(cd '$(TEST_RESULTS_DIRECTORY_SQ)' && \
 +              grep -l '^failed [1-9]' $$(ls -t *.counts | \
 +                      sed 'G;h;/^\(t[^.]*\)-[0-9]*\..*\n\1-[0-9]*\./d;P;d') | \
 +              sed -n 's/-[0-9]*\.counts$$/.sh/p') && \
 +      test -z "$$failed" || $(MAKE) $$failed

  prove: pre-clean $(TEST_LINT)
        @echo "*** prove ***"; $(PROVE) --exec '$(SHELL_PATH_SQ)' $(GIT_PROVE_OPTS) $(T) :: $(GIT_TEST_OPTS)
I don't at all mind this solution to the problem, if it works for that's cool.

But FWIW something you may have missed is that you can just use
prove(1) for this, which is why I initially patched git.git to support
TAP, so I didn't have to implement stuff like this.
Heh. I think each iteration of this patch will be destined to have
somebody[1] point Johannes at prove. ;)

(But I really do recommend prove if you can use it).

-Peff

[1] http://public-inbox.org/git/20160630063725.GC15380@sigill.intra.peff.net/
Sorry about that, I see it's been mentioned already.
Yeah, it is true that prove(1) would be able to help. If it worked
reliably on Windows. (Probably Perl's fault, not prove's.)
My only excuse is that I don't know how to operate my E-Mail client :)
But we use email to discuss all things Git because it makes everything so
easy and convenient... ;-)

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help