annotate etc/bundled-packages/test.sh @ 5014:c2e0c3af5fe3

cleanups to debug-print, try harder to make it work during GC -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-02-08 Ben Wing <ben@xemacs.org> * emacs.c: * emacs.c (assert_failed): Fix comments about when inhibit_non_essential_printing_operations is set and how used. Increment/decrement in assert_failed rather than just setting/resetting to avoid hosing things in case we're called when the value is already non-zero. Similarly increment/ decrement in_assert_failed. * gc.c (gc_prepare): * gc.c (gc_finish): Increment/decrement inhibit_non_essential_printing_operations rather than setting/resetting. * print.c: * print.c (debug_out): * print.c (write_string_to_alternate_debugging_output): * print.c (restore_inhibit_non_essential_conversion_operations): * print.c (debug_print_exit): * print.c (debug_print_enter): * print.c (debug_prin1): * print.c (debug_p4): * print.c (ext_print_begin): * print.c (ext_print_end): * print.c (external_debug_print): * print.c (debug_p3): * print.c (debug_backtrace): * print.c (debug_short_backtrace): * print.c (vars_of_print): Lots of cleanup. Fix debug_out() so it binds inhibit_non_essential_printing_operations around it to ensure no conversion. Remove many other places that set the same var since the lower-level functions now all do it. A few other places, add inhibit_non_essential_printing_operations bindings.Extract the code out that sets up and resets lots of bindings in debug_prin1() so that debug_backtrace() can use it, and rewrite it to use the new STORE_VOID_IN_LISP() rather than having to have a single static opaque structure holding all the bindings (and not handling reentrancy). Fix raw `char' to be `CIbyte' in the declaration of `alternate_do_string'. * signal.c (check_what_happened): Fix bug: Don't try to check for QUIT when inhibit_non_essential_printing_operations or we may screw things up if QUIT happens during debug printing.
author Ben Wing <ben@xemacs.org>
date Mon, 08 Feb 2010 07:00:24 -0600
parents 232d873b9705
children fd714e8ba81e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4354
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
1 # tests for the bundled packages feature
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
2
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
3 # usage: sh etc/bundled-packages/tests.sh [TMP_TEST_DIR]
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
4
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
5 # Always run this script from the top directory of the source tree.
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
6 # You need a mv that supports the -v for verbose flag, and a mkdir that
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
7 # supports the -p flag to make parents.
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
8 # Output from this script is preceded by 4 stars (****).
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
9
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
10 # This test script is probably more fragile than the build process, but if
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
11 # it runs to completion things are probably OK.
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
12
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
13 # configure the installation target
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
14
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
15 if test -z "$1"; then
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
16 TMP_TEST_DIR=/tmp/test/bundled-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
17 else
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
18 TMP_TEST_DIR=$1
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
19 fi
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
20
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
21 srcdir=`pwd`
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
22 blddir=${TMP_TEST_DIR}/build
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
23 pkgdir=${TMP_TEST_DIR}/lib/xemacs
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
24
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
25 echo "**** srcdir = ${srcdir}"
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
26 echo "**** blddir = ${blddir}"
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
27 echo "**** pkgdir = ${pkgdir}"
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
28
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
29 if test -e "${pkgdir}"; then
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
30 echo "**** pkgdir (${pkgdir}) exists; bailing out."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
31 exit -1
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
32 fi
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
33
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
34 # mv existing tarballs out of harm's way and make a fake one
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
35
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
36 echo "**** Moving existing tarballs to etc/bundled-packages/saved."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
37 mkdir -p etc/bundled-packages/saved
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
38 cd etc/bundled-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
39 echo "**** 'mv' may error because there are no files to move. It's harmless."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
40 mv -v *.tar.gz saved/
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
41 cd ../..
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
42
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
43 # configure in a temporary directory
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
44
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
45 if test -e ${blddir}; then
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
46 echo "**** blddir (${blddir}) exists; bailing out."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
47 exit -1
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
48 fi
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
49 mkdir -p ${blddir}
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
50 cd ${blddir}
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
51 echo "**** Running 'configure'. This takes *several minutes*."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
52 echo "**** Redirecting configure output to ${blddir}/beta.err."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
53 ${srcdir}/configure >beta.err 2>&1
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
54
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
55 # test check-available-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
56
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
57 echo "**** This test should produce no error and no output."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
58 make check-available-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
59 cd ${srcdir}/etc/bundled-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
60 echo "**** This test should explain how to install bootstrap packages."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
61 echo "This file pretends to be a bootstrap hierarchy." > xemacs-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
62 tar czf bootstrap.tar.gz xemacs-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
63 rm xemacs-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
64 cd ${blddir}
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
65 make check-available-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
66 echo "**** This test should explain how to install all three."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
67 cd ${srcdir}/etc/bundled-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
68 echo "This file pretends to be a xemacs-packages hierarchy." > xemacs-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
69 echo "This file pretends to be a mule-packages hierarchy." > mule-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
70 tar czf xemacs-sumo.tar.gz xemacs-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
71 tar czf xemacs-mule-sumo.tar.gz mule-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
72 rm xemacs-packages mule-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
73 cd ${blddir}
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
74 make check-available-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
75
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
76 # test installation without package path given
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
77
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
78 echo "**** Make the 'make-path' utility needed by the installation routine."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
79 make -C lib-src make-path
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
80 echo "**** This test should error because --with-late-packages wasn't given."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
81 make install-bootstrap-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
82
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
83 # test installation with package path given
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
84
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
85 echo "**** Running 'configure'. This takes *several minutes*."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
86 echo "**** Redirecting configure output to ${blddir}/beta.err."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
87 ${srcdir}/configure --with-late-packages=${pkgdir} >beta.err 2>&1
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
88 echo "**** Make the 'make-path' utility needed by the installation routine."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
89 make -C lib-src make-path
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
90 echo "**** Test install-bootstrap-packages."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
91 make install-bootstrap-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
92 echo "**** The following should list xemacs-packages in the right place."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
93 ls ${pkgdir}/*
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
94
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
95 #### no tests below this line ####
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
96
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
97 # put tarballs back and clean up
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
98
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
99 cd ${srcdir}/etc/bundled-packages
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
100 rm *.tar.gz
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
101 echo "**** 'mv' may error because there are no files to move. It's harmless."
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
102 mv -v saved/*.tar.gz ../
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
103 rmdir saved
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
104 rm -rf ${blddir} ${pkgdir}
232d873b9705 Add support for installing bundled patches.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
diff changeset
105 exit 0