* renamed udd to ctx in qse_mmgr_t

* fixed problems in build and test scripts
This commit is contained in:
2011-08-15 03:07:31 +00:00
parent f332efc288
commit 6e2dd10655
37 changed files with 328 additions and 149 deletions

View File

@ -1,8 +1,10 @@
AUTOMAKE_OPTIONS = no-dependencies
noinst_SCRIPTS = regress.sh
EXTRA_DIST = \
regress.sh \
regress.out \
regress.out.xma \
adr-001.awk \
adr-002.awk \
asm.awk \
@ -127,8 +129,28 @@ EXTRA_DIST = \
cou.dat \
emp.dat \
indent.dat \
passwd.dat \
quicksort2.dat \
quicksort.dat \
stripcomment.dat \
unr.dat \
asm.s
asm.s \
lisp/awklisp \
lisp/lists \
lisp/perlisp \
lisp/tail.lsp \
lisp/eliza.dat \
lisp/Manual \
lisp/README \
lisp/test.scm \
lisp/eliza.lsp \
lisp/numbers \
lisp/scheme.lsp \
lisp/trace \
lisp/fib.lsp \
lisp/numbers.dat \
lisp/scmhelp.lsp \
lisp/Impl-notes \
lisp/old-awklisp \
lisp/startup

View File

@ -14,6 +14,7 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@ -34,7 +35,8 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = regress/awk
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/regress.sh.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@ -44,8 +46,9 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/qse/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_FILES = regress.sh
CONFIG_CLEAN_VPATH_FILES =
SCRIPTS = $(noinst_SCRIPTS)
depcomp =
am__depfiles_maybe =
SOURCES =
@ -193,9 +196,10 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = no-dependencies
noinst_SCRIPTS = regress.sh
EXTRA_DIST = \
regress.sh \
regress.out \
regress.out.xma \
adr-001.awk \
adr-002.awk \
asm.awk \
@ -320,11 +324,30 @@ EXTRA_DIST = \
cou.dat \
emp.dat \
indent.dat \
passwd.dat \
quicksort2.dat \
quicksort.dat \
stripcomment.dat \
unr.dat \
asm.s
asm.s \
lisp/awklisp \
lisp/lists \
lisp/perlisp \
lisp/tail.lsp \
lisp/eliza.dat \
lisp/Manual \
lisp/README \
lisp/test.scm \
lisp/eliza.lsp \
lisp/numbers \
lisp/scheme.lsp \
lisp/trace \
lisp/fib.lsp \
lisp/numbers.dat \
lisp/scmhelp.lsp \
lisp/Impl-notes \
lisp/old-awklisp \
lisp/startup
all: all-am
@ -359,6 +382,8 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
regress.sh: $(top_builddir)/config.status $(srcdir)/regress.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
@ -404,7 +429,7 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-am
all-am: Makefile
all-am: Makefile $(SCRIPTS)
installdirs:
install: install-am
install-exec: install-exec-am

View File

@ -1,6 +1,6 @@
BEGIN {
recurse1 = "../../cmd/awk/qseawk -f quicksort2.awk #" rand()
recurse2 = "../../cmd/awk/qseawk -f quicksort2.awk #" rand()
recurse1 = QSEAWK " -vQSEAWK=" QSEAWK " -vSCRIPT_PATH=" SCRIPT_PATH " -f " SCRIPT_PATH "/quicksort2.awk #" rand()
recurse2 = QSEAWK " -vQSEAWK=" QSEAWK " -vSCRIPT_PATH=" SCRIPT_PATH " -f " SCRIPT_PATH "/quicksort2.awk #" rand()
}
NR == 1 {
pivot=$0;

View File

@ -37,12 +37,12 @@ print_usage()
###################
[ -z "${QSEAWK}" ] && {
QSEAWK=../../cmd/awk/.libs/qseawk
[ -f "${QSEAWK}" ] || QSEAWK=../../cmd/awk/qseawk
QSEAWK="@abs_top_builddir@/cmd/awk/.libs/qseawk"
[ -f "${QSEAWK}" ] || QSEAWK="@abs_top_builddir@/cmd/awk/qseawk"
}
[ -z "${QSESED}" ] && {
QSESED=../../cmd/sed/.libs/qsesed
[ -f "${QSESED}" ] || QSESED=../../cmd/sed/qsesed
QSESED="@abs_top_builddir@/cmd/sed/.libs/qsesed"
[ -f "${QSESED}" ] || QSESED="@abs_top_builddir@/cmd/sed/qsesed"
}
[ -f "${QSEAWK}" -a -x "${QSEAWK}" ] || {
echo_so "the executable '${QSEAWK}' is not found or not executable"
@ -55,6 +55,10 @@ print_usage()
QSEAWK_BASENAME="`basename "${QSEAWK}"`"
SCRIPT_DIR="@abs_top_srcdir@/regress/awk"
BASE_OUTFILE="@abs_top_srcdir@/regress/awk/regress.out"
BASE_OUTFILE_XMA="@abs_top_srcdir@/regress/awk/regress.out.xma"
TMPFILE="${TMPFILE:=./regress.temp}"
OUTFILE="${OUTFILE:=./regress.out}"
OUTFILE_XMA="${OUTFILE}.xma"
@ -173,7 +177,7 @@ PROGS="
levenshtein-utests.awk!!!--newline=on --include=on
rcalc.awk!!!--newline=on -v target=89000
quicksort.awk!quicksort.dat!!
quicksort2.awk!quicksort2.dat!!
quicksort2.awk!quicksort2.dat!!-vQSEAWK=\"${QSEAWK}\" -vSCRIPT_PATH=\"${SCRIPT_DIR}\"
asm.awk!asm.s!asm.dat!
stripcomment.awk!stripcomment.dat!!
wordfreq.awk!wordfreq.awk!!
@ -208,23 +212,34 @@ run_scripts()
script="`echo ${prog} | cut -d! -f1`"
datafile="`echo ${prog} | cut -d! -f2`"
redinfile="`echo ${prog} | cut -d! -f3`"
readinfile="`echo ${prog} | cut -d! -f3`"
awkopts="`echo ${prog} | cut -d! -f4`"
orgscript="${script}"
[ -z "${script}" ] && continue
script_path="@abs_srcdir@/${script}"
datafile_path="@abs_srcdir@/${datafile}"
readinfile_path="@abs_srcdir@/${readinfile}"
[ -f "${script}".dp ] && script="${script}.dp"
[ -f "${script}" ] ||
[ -f "${script_path}" ] ||
{
echo_so "${script} not found"
continue
}
[ -z "${redinfile}" ] && redinfile="/dev/stdin"
[ -z "${readinfile}" ] &&
{
readinfile="/dev/stdin"
readinfile_path="/dev/stdin"
}
echo_title "${valgrind} ${QSEAWK_BASENAME} ${extraopts} ${awkopts} -f ${orgscript} ${datafile} <${redinfile} 2>&1"
${valgrind} ${QSEAWK} ${extraopts} -o "${script}.dp" ${awkopts} -f ${script} ${datafile} <${redinfile} 2>&1
# if the datafile does not exist, let's not use the original name
[ -f "${datafile_path}" ] || datafile_path="$datafile"
echo_title "${valgrind} ${QSEAWK_BASENAME} ${extraopts} ${awkopts} -f ${orgscript} ${datafile} <${readinfile} 2>&1"
${valgrind} ${QSEAWK} ${extraopts} -o "${script}.dp" ${awkopts} -f ${script_path} ${datafile_path} <${readinfile_path} 2>&1
done < "${TMPFILE}"
@ -233,8 +248,9 @@ run_scripts()
run_test()
{
outfile="${1}"
extraopts="${2}"
base_outfile="${1}"
outfile="${2}"
extraopts="${3}"
rm -f *.dp
echo_so "FIRST RUN WITH ORIGINAL SOURCE"
@ -255,11 +271,11 @@ run_test()
# diff -q is not supported on old platforms.
# redirect output to /dev/null instead.
diff "${outfile}" "${outfile}.test" > /dev/null || {
diff "${base_outfile}" "${outfile}.test" > /dev/null || {
echo_so "ERROR: Difference is found between expected output and actual output."
echo_so " The expected output is stored in '${outfile}'."
echo_so " The expected output is stored in '${base_outfile}'."
echo_so " The actual output is stored in '${outfile}.test'."
echo_so " You may execute 'diff ${outfile} ${outfile}.test' for more info."
echo_so " You may execute 'diff ${base_outfile} ${outfile}.test' for more info."
return 1
}
rm -f "${outfile}.test"
@ -269,21 +285,23 @@ run_test()
case $1 in
init)
rm -f *.dp
run_scripts "" "" > "${OUTFILE}"
run_scripts "" "${XMAOPTS}" > "${OUTFILE_XMA}"
run_scripts "" "" > "${BASE_OUTFILE}"
run_scripts "" "${XMAOPTS}" > "${BASE_OUTFILE_XMA}"
rm -f *.dp
echo_so "INIT OK"
;;
test)
run_test "${OUTFILE}" "" && {
run_test "${OUTFILE_XMA}" "${XMAOPTS}" && {
#diff "${OUTFILE}" "${OUTFILE_XMA}" | grep -v '^\[CMD\] '
${QSESED} "s|${QSEAWK_BASENAME} ${XMAOPTS}|${QSEAWK_BASENAME} |" "${OUTFILE_XMA}" > "${OUTFILE_XMA}.$$"
diff "${OUTFILE}" "${OUTFILE_XMA}.$$" || {
run_test "${BASE_OUTFILE}" "${OUTFILE}" "" &&
{
run_test "${BASE_OUTFILE_XMA}" "${OUTFILE_XMA}" "${XMAOPTS}" &&
{
${QSESED} "s|${QSESED_BASENAME} ${XMAOPTS}|${QSESED_BASENAME} |" "${OUTFILE_XMA}.test" > "${OUTFILE_XMA}.$$"
diff "${OUTFILE}.test" "${OUTFILE_XMA}.$$" ||
{
rm -f "${OUTFILE_XMA}.$$"
echo_so "ERROR: Difference is found between normal output and xma output."
echo_so " The normal output is stored in '${OUTFILE}'."
echo_so " The xma output is stored in '${OUTFILE_XMA}'."
echo_so " The normal output is stored in '${OUTFILE}.test'."
echo_so " The xma output is stored in '${OUTFILE_XMA}.test'."
echo_so " Ignore lines staring with [CMD] in the difference."
exit 1;
}

View File

@ -1,7 +1,9 @@
AUTOMAKE_OPTIONS = no-dependencies
noinst_SCRIPTS = regress.sh
EXTRA_DIST = \
regress.sh regress.out \
regress.out regress.out.xma \
s001.sed s001.dat \
s002.sed s002.dat \
s003.sed s003.dat \

View File

@ -14,6 +14,7 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@ -34,7 +35,8 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = regress/sed
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/regress.sh.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@ -44,8 +46,9 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/qse/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_FILES = regress.sh
CONFIG_CLEAN_VPATH_FILES =
SCRIPTS = $(noinst_SCRIPTS)
depcomp =
am__depfiles_maybe =
SOURCES =
@ -193,8 +196,9 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = no-dependencies
noinst_SCRIPTS = regress.sh
EXTRA_DIST = \
regress.sh regress.out \
regress.out regress.out.xma \
s001.sed s001.dat \
s002.sed s002.dat \
s003.sed s003.dat \
@ -233,6 +237,8 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
regress.sh: $(top_builddir)/config.status $(srcdir)/regress.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
@ -278,7 +284,7 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-am
all-am: Makefile
all-am: Makefile $(SCRIPTS)
installdirs:
install: install-am
install-exec: install-exec-am

View File

@ -37,8 +37,8 @@ print_usage()
###################
[ -z "${QSESED}" ] && {
QSESED=../../cmd/sed/.libs/qsesed
[ -f "${QSESED}" ] || QSESED=../../cmd/sed/qsesed
QSESED="@abs_top_builddir@/cmd/sed/.libs/qsesed"
[ -f "${QSESED}" ] || QSESED="@abs_top_builddir@/cmd/sed/qsesed"
}
[ -f "${QSESED}" -a -x "${QSESED}" ] || {
echo_so "the executable '${QSESED}' is not found or not executable"
@ -47,6 +47,9 @@ print_usage()
QSESED_BASENAME="`basename "${QSESED}"`"
BASE_OUTFILE="@abs_top_srcdir@/regress/sed/regress.out"
BASE_OUTFILE_XMA="@abs_top_srcdir@/regress/sed/regress.out.xma"
TMPFILE="${TMPFILE:=./regress.temp}"
OUTFILE="${OUTFILE:=./regress.out}"
OUTFILE_XMA="${OUTFILE}.xma"
@ -77,21 +80,32 @@ run_scripts()
script="`echo ${prog} | cut -d/ -f1`"
datafile="`echo ${prog} | cut -d/ -f2`"
redinfile="`echo ${prog} | cut -d/ -f3`"
readinfile="`echo ${prog} | cut -d/ -f3`"
options="`echo ${prog} | cut -d/ -f4`"
[ -z "${script}" ] && continue
[ -f "${script}" ] ||
script_path="@abs_srcdir@/${script}"
datafile_path="@abs_srcdir@/${datafile}"
readinfile_path="@abs_srcdir@/${readinfile}"
[ -f "${script_path}" ] ||
{
echo_so "${script} not found"
echo_so "${script_path} not found"
continue
}
[ -z "${redinfile}" ] && redinfile="/dev/stdin"
[ -z "${readinfile}" ] &&
{
readinfile="/dev/stdin"
readinfile_path="/dev/stdin"
}
echo_title "${valgrind} ${QSESED_BASENAME} ${extraopts} ${options} -f ${script} ${datafile} <${redinfile} 2>&1"
${valgrind} ${QSESED} ${extraopts} ${options} -f ${script} ${datafile} <${redinfile} 2>&1
# if the datafile does not exist, let's not use the original name
#[ -f "${datafile_path}" ] || datafile_path="$datafile"
echo_title "${valgrind} ${QSESED_BASENAME} ${extraopts} ${options} -f ${script} ${datafile} <${readinfile} 2>&1"
${valgrind} ${QSESED} ${extraopts} ${options} -f ${script_path} ${datafile_path} <${readinfile_path} 2>&1
done < "${TMPFILE}"
@ -100,39 +114,43 @@ run_scripts()
run_test()
{
outfile="${1}"
extraopts="${2}"
base_outfile="${1}"
outfile="${2}"
extraopts="${3}"
run_scripts "" "${extraopts}"> "${outfile}.test"
# diff -q is not supported on old platforms.
# redirect output to /dev/null instead.
diff "${outfile}" "${outfile}.test" > /dev/null || {
diff "${base_outfile}" "${outfile}.test" > /dev/null || {
echo_so "ERROR: Difference is found between expected output and actual output."
echo_so " The expected output is stored in '${outfile}'."
echo_so " The expected output is stored in '${base_outfile}'."
echo_so " The actual output is stored in '${outfile}.test'."
echo_so " You may execute 'diff ${outfile} ${outfile}.test' for more info."
echo_so " You may execute 'diff ${base_outfile} ${outfile}.test' for more info."
return 1
}
rm -f "${outfile}.test"
# rm -f "${outfile}.test"
return 0
}
case $1 in
init)
run_scripts "" "" > "${OUTFILE}"
run_scripts "" "${XMAOPTS}" > "${OUTFILE_XMA}"
run_scripts "" "" > "${BASE_OUTFILE}"
run_scripts "" "${XMAOPTS}" > "${BASE_OUTFILE_XMA}"
echo_so "INIT OK"
;;
test)
run_test "${OUTFILE}" "" && {
run_test "${OUTFILE_XMA}" "${XMAOPTS}" && {
${QSESED} "s|${QSESED_BASENAME} ${XMAOPTS}|${QSESED_BASENAME} |" "${OUTFILE_XMA}" > "${OUTFILE_XMA}.$$"
diff "${OUTFILE}" "${OUTFILE_XMA}.$$" || {
run_test "${BASE_OUTFILE}" "${OUTFILE}" "" &&
{
run_test "${BASE_OUTFILE_XMA}" "${OUTFILE_XMA}" "${XMAOPTS}" &&
{
${QSESED} "s|${QSESED_BASENAME} ${XMAOPTS}|${QSESED_BASENAME} |" "${OUTFILE_XMA}.test" > "${OUTFILE_XMA}.$$"
diff "${OUTFILE}.test" "${OUTFILE_XMA}.$$" ||
{
rm -f "${OUTFILE_XMA}.$$"
echo_so "ERROR: Difference is found between normal output and xma output."
echo_so " The normal output is stored in '${OUTFILE}'."
echo_so " The xma output is stored in '${OUTFILE_XMA}'."
echo_so " The normal output is stored in '${OUTFILE}.test'."
echo_so " The xma output is stored in '${OUTFILE_XMA}.test'."
echo_so " Ignore lines staring with [CMD] in the difference."
exit 1;
}