ольга крыжановская wrote:
John, thank you for reporting this.
I have 2 questions: How do I run the autoconf test suite and how do I
make sure it uses a specific shell? I like to add the autoconf test
suite to our regular tests, but also like to include features like
shcomp (the shell compiler) to be covered by the tests, too.
Olga
Olga,
After building a version of autoconf with the GNU make, the regression
tests are run by making the target "check".
gmake check
To use a specific shell, set and export CONFIG_SHELL to the ksh binary
to be tested.
Tests are run in the sub-directory ./tests/testsuite.dir. Each numbered
test in a correspondingly numbered subdirectory. When a test fails,
that numbered subdirectory is conveniently left in place.
Individual tests, debugging, script tracing, etc. can be controlled by
means of the TESTSUITEFLAGS settings:
gmake check TESTSUITEFLAGS=' -d -x NUM[-NUM]'
See section "Running 'testsuite' Scripts " section in the
doc/autoconf.info file available after the initial build for a complete
list of options available.
As for testing with the shell compiler, I would surmise that the
autoconf script (bin/autoconf), built in the initial gmake from
bin/autoconf.as, would need to be modified to run shcomp on the
configure script built for each test from that test's configure.ac or
configure.in template. For the shcomp of the generated config.status in
each test, the autoconf AC_OUPUT macro that generates and runs the
config.status would need modified to do so.
I have attached the simple scripts provided to me by Tim Rice of
Multitalents that were
used to build and test multiple releases of GNU autoconf. Variances
between autoconf releases for the same test (by name) tended to
highlight buffer boundary issues. Comparison of results with different
versions of ksh confirmed the patches.
Hope that helps
-- John
#! /bin/ksh
# x.build-tree
#
# script to extract the GNU autoconf releases to be used for testing
# and install an install script in each release to do the initial
# configure
#
# NOTE: need GNU m4 macro processor - version 1.4.6 or later
#
# set PATH accordingly
DIST_DIR=$HOME/WORK.autoconf.tst/archive
LIST="2.59 2.61 2.61a 2.62 2.63 2.64 2.65 2.66 2.67 2.68"
for i in ${LIST}
do
[ -d autoconf-${i} ] || {
if [ -f ${DIST_DIR}/autoconf-${i}.tar.bz2 ]
then
gtar xof ${DIST_DIR}/autoconf-${i}.tar.bz2
else
gtar xof ${DIST_DIR}/autoconf-${i}.tar.gz
fi
cat > autoconf-${i}/x.do-conf-test << EOF
:
[ -f x.conf ] && mv x.conf x.conf2
PATH=/usr/bin:/usr/ccs/bin:/usr/ucb:/usr/local/bin ; export PATH
# i686-unknown-sysv5UnixWare7.1.4
M4=/opt/bin/m4 \\
./configure \\
2>&1 | tee x.conf
EOF
}
done
:
# x.run
# script to step through each autoconf release and to the build and
# run the regression testsuite
LIST="2.59 2.61 2.61a 2.62 2.63 2.64 2.65 2.66 2.67 2.68"
for i in ${LIST}
do
[ -d autoconf-${i} ] && {
echo "************ autoconf-${i} *******************"
(
cd autoconf-${i}
pwd
sh x.do-conf-test
gmake 2>&1 | tee x.mk
[ -f x.tst ] && mv x.tst x.tst2
gmake check 2>&1 | tee x.tst
) 2>&1 | tee log.autoconf-${i}
}
done
:
# x.diff.2.builds
#
# Compare regression test results between x.run with different
# ksh versions
LIST="2.59 2.61 2.61a 2.62 2.63 2.64 2.65 2.66 2.67 2.68"
#LIST="2.59 2.61 2.61a 2.62 2.63 2.64 2.65 "
usage () {
print "usage: $0 <dir 1> <dir 2>"
exit 1
}
[ $# -eq 2 ] || usage
dir1=$1
dir2=$2
[ ! -d $dir1 ] && print "no such directory - dir 1: $dir1" && exit 1
[ ! -d $dir2 ] && print "no such directory - dir 2: $dir2" && exit 1
print "Comparing test results for build trees: < $dir1 vs. > $dir2"
print "====================================================================="
print " "
for i in ${LIST}
do
print " autoconf-${i} ***********************************"
diff $dir1/autoconf-${i}/x.tst $dir2/autoconf-${i}/x.tst | grep Subject:
done
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers