Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Valgrind tests (was: Re: Zsh: [7] + 23074 suspended (tty output))

On Mon, 2019-07-15 at 00:17 +0200, Sebastian Gniazdowski wrote:
> On Sun, 14 Jul 2019 at 08:39, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> Ok. I've waited 9 days and I'm afraid that the patch will get lost
> somewhere. I just want to say, that the thing isn't actually a patch.
> It's a tool that makes the current tests go through Valgrind. The
> patch that adds the 'VALGRIND=1' variable to the tests' Makefile is a
> +-2 lines patch. Therefore could someone else take a look? There's not
> much to review.

I don't mind the handler code changing, to make it easy to run tests
slightly different, but I'd prefer to add a more general mechanism
that's more like how the current system works...

This would mean running

make ZTST_handler=vruntests.zsh

or you can simply set that in the environment.


diff --git a/Test/Makefile.in b/Test/Makefile.in
index 083df4942..09f37bf53 100644
--- a/Test/Makefile.in
+++ b/Test/Makefile.in
@@ -40,16 +40,21 @@ INSTALL         = @INSTALL@
 # ========== DEPENDENCIES FOR TESTING ==========
+# If ZTST_handler is not empty, run that instead of runtests.zsh.
+# It's assumed to be found in the source directory.
 check test:
 	if test -n "$(DLLD)"; then \
 	  cd $(dir_top) && DESTDIR= \
 	  $(MAKE) MODDIR=`pwd`/$(subdir)/Modules install.modules > /dev/null; \
+	if test -z "$$ZTST_handler"; then \
+	  ZTST_handler=runtests.zsh; \
+	fi; \
 	if ZTST_testlist="`for f in $(sdir)/$(TESTNUM)*.ztst; \
            do echo $$f; done`" \
 	 ZTST_srcdir="$(sdir)" \
 	 ZTST_exe=$(dir_top)/Src/zsh@EXEEXT@ \
-	 $(dir_top)/Src/zsh@EXEEXT@ +Z -f $(sdir)/runtests.zsh; then \
+	 $(dir_top)/Src/zsh@EXEEXT@ +Z -f $(sdir)/$$ZTST_handler; then \
 	 stat=0; \
 	else \
 	 stat=1; \

Messages sorted by: Reverse Date, Date, Thread, Author