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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 30, 2016 at 10:48:19PM +0200, Ævar Arnfjörð Bjarmason wrote:

> >  -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@xxxxxxxxxxxxxxxxxxxxx/



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]