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

PATCH: 3.1.9-dev-8: Load only newly-built modules during "make check"



This primarily affects the completion tests.

When zsh starts up with ZLE enabled, it immediately loads the zle, complete,
and compctl modules.  This occurs before there's any opportunity to change
the module_path (because MODULE_PATH is not imported from the environment).

During "make check", the test scripts attempt to point zsh at new modules
installed in a temporary directory under Test/, but (prior to this patch)
may not succeed for those three ZLE modules.  This is OK if the version of
zsh being tested has never before been installed; but when, e.g., tracking
development code with CVS, it's possible that a change that affects module
linkage has not been accompanied by a change in version number, and the
installed modules can be picked up instead of the test modules.

This patch runs zsh with the +Z option during "make check".  This prevents
any modules from being dynamically loaded until after the module_path can
be reset, then explicitly does a "setopt zle" before testing completions.

There remains the problem that on some platforms, death of the completion
test process isn't properly detected by the zsh/zpty module, so an infinite
loop is still possible if something goes wrong in 53completion.ztst or in
54compmatch.ztst.  At least this patch makes that less likely.

Index: Test/Makefile.in
diff -ru zsh-forge/current/Test/Makefile.in zsh-3.1.9/Test/Makefile.in
--- zsh-forge/current/Test/Makefile.in	Wed Jul  5 00:18:28 2000
+++ zsh-3.1.9/Test/Makefile.in	Wed Feb  7 10:30:40 2001
@@ -46,7 +46,7 @@
 	  $(MAKE) MODDIR=`pwd`/$(subdir)/Modules install.modules > /dev/null; \
 	fi
 	-for f in $(sdir)/$(TESTNUM)*.ztst; do \
-	  $(dir_top)/Src/zsh -f $(sdir)/ztst.zsh $$f; \
+	  $(dir_top)/Src/zsh +Z -f $(sdir)/ztst.zsh $$f; \
 	done
 	rm -rf Modules .zcompdump
 
Index: Test/comptest
diff -ru zsh-forge/current/Test/comptest zsh-3.1.9/Test/comptest
--- zsh-forge/current/Test/comptest	Tue Feb  6 12:09:42 2001
+++ zsh-3.1.9/Test/comptest	Wed Feb  7 13:32:09 2001
@@ -16,7 +16,7 @@
   (( OPTIND > 1 )) && shift $(( OPTIND - 1 ))
 
   export PS1="<PROMPT>"
-  zpty -b zsh "$comptest_zsh" -f
+  zpty -b zsh "$comptest_zsh -f +Z"
 
   zpty -r zsh log1 "*<PROMPT>*" || { 
     print "first prompt hasn't appeared."
@@ -29,6 +29,7 @@
 "fpath=( $fpath )" \
 'LISTMAX=10000000
 stty columns 80 rows 24
+setopt zle
 bindkey -e
 autoload -U compinit
 compinit -u

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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