From f41bf9380f7b08f5e8c07c9c58d66cd5da7bc356 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 28 Apr 2011 05:13:52 +0000 Subject: [v] Make alive.test avoid (mis-)loading the .scm files, if possible. Reported by Bernardo Ezequiel Contreras: * source/alive.test: If guile has ‘%load-extensions’, create a preload file that removes ".scm" from it; use that file for all invocations; and delete it when done. If in debug mode, display ponderings, as well as ‘guile --version’ output. --- diff --git a/source/ChangeLog b/source/ChangeLog index 2b5bd1b..2de79f4 100644 --- a/source/ChangeLog +++ b/source/ChangeLog @@ -1,3 +1,15 @@ +2011-04-28 Thien-Thi Nguyen + + [v] Make alive.test avoid (mis-)loading the .scm files, if possible. + + Reported by Bernardo Ezequiel Contreras: + + + * alive.test: If guile has ‘%load-extensions’, create a + preload file that removes ".scm" from it; use that file for + all invocations; and delete it when done. If in debug mode, + display ponderings, as well as ‘guile --version’ output. + 2011-01-24 Thien-Thi Nguyen Release: 2.29 diff --git a/source/alive.test b/source/alive.test index 3521fcc..76e91c8 100755 --- a/source/alive.test +++ b/source/alive.test @@ -35,6 +35,25 @@ decho () if $debug ; then echo "$1" ; fi } +decho 'guile:' +if $debug ; then ${GUILE-guile} --version ; fi + +if $guile -c '%load-extensions' >/dev/null 2>&1 ; then + preload=alive.preload + echo '(set! %load-extensions (delete ".scm" %load-extensions))' > $preload + if $debug ; then + decho 'preload:' + cat $preload + decho 'before:' + $guile -c '(begin (write %load-extensions) (newline))' + fi + guile="$guile -l $preload" + if $debug ; then + decho 'after:' + $guile -c '(begin (write %load-extensions) (newline))' + fi +fi + decho 'indivdually:' { while read m ; do @@ -48,4 +67,8 @@ all="`cat $all`" decho "$guile -c '(use-modules $all)'" $guile -c "(use-modules $all)" +if [ "$preload" ] ; then rm $preload ; fi + +exit 0 + # alive.test ends here -- cgit v0.9.0.2