2012-10-19 Joseph Myers <joseph@codesourcery.com>
+ * grp/Makefile ($(objpfx)tst_fgetgrent.out): Pass
+ $(run-program-prefix) to tst_fgetgrent.sh, not $(elf-objpfx) and
+ $(rtld-installed-name).
+ * grp/tst_fgetgrent.sh (elf_objpfx): Remove variable.
+ (rtld_installed_name): Likewise.
+ (library_path): Likewise.
+ (run_program_prefix): New variable. Use it to run tst_fgetgrent.
+ * iconvdata/Makefile ($(objpfx)tst-tables.out): Pass
+ $(run-program-prefix) to tst-tables.sh.
+ * iconvdata/tst-table.sh (run_program_prefix): New variable. Use
+ it to run tst-table-from and tst-table-to.
+ * iconvdata/tst-tables.sh (run_program_prefix): New variable.
+ Pass it to tst-table.sh.
+ * intl/Makefile ($(objpfx)tst-gettext.out): Pass
+ $(run-program-prefix) to tst-gettext.sh.
+ ($(objpfx)tst-translit.out): Pass $(run-program-prefix) to
+ tst-translit.sh.
+ ($(objpfx)tst-gettext2.out): Pass $(run-program-prefix) to
+ tst-gettext2.sh.
+ * intl/tst-gettext.sh (run_program_prefix): New variable. Use it
+ to run tst-gettext.
+ * intl/tst-gettext2.sh (run_program_prefix): New variable. Use it
+ to run tst-gettext2.
+ * intl/tst-translit.sh (run_program_prefix): New variable. Use it
+ to run tst-translit.
+ * malloc/Makefile ($(objpfx)tst-mtrace.out): Pass
+ $(run-program-prefix) to tst-mtrace.sh.
+ * malloc/tst-mtrace.sh (run_program_prefix): New variable. Use it
+ to run tst-mtrace.
+ * posix/Makefile ($(objpfx)wordexp-tst.out): Pass
+ $(run-program-prefix) to wordexp-tst.sh, not $(elf-objpfx) and
+ $(rtld-installed-name).
+ * posix/wordexp-tst.sh (elf_objpfx): Remove variable.
+ (rtld_installed_name): Likewise.
+ (run_program_prefix): New variable. Use it to run wordexp-test.
+
* Makeconfig (ARCH): Remove all definitions.
(machine): Likewise.
[ARCH]: Remove conditional code.
ifeq (yes,$(build-shared))
tests: $(objpfx)tst_fgetgrent.out
$(objpfx)tst_fgetgrent.out: tst_fgetgrent.sh $(objpfx)tst_fgetgrent
- $(SHELL) $< $(common-objpfx) $(elf-objpfx) \
- $(rtld-installed-name)
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)'
endif
endif
set -e
common_objpfx=$1; shift
-elf_objpfx=$1; shift
-rtld_installed_name=$1; shift
+run_program_prefix=$1; shift
testout=${common_objpfx}/grp/tst_fgetgrent.out
-library_path=${common_objpfx}
result=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}grp/tst_fgetgrent 0 > ${testout} || result=1
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}grp/tst_fgetgrent 1 >> ${testout} || result=1
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}grp/tst_fgetgrent 2 >> ${testout} || result=1
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}grp/tst_fgetgrent 3 >> ${testout} || result=1
exit $result
$(objpfx)tst-tables.out: tst-tables.sh $(objpfx)gconv-modules \
$(addprefix $(objpfx),$(modules.so)) \
$(objpfx)tst-table-from $(objpfx)tst-table-to
- $(SHELL) $< $(common-objpfx) $(common-objpfx)iconvdata/ > $@
+ $(SHELL) $< $(common-objpfx) $(common-objpfx)iconvdata/ \
+ '$(run-program-prefix)' > $@
do-tests-clean common-mostlyclean: tst-tables-clean
#!/bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
#
common_objpfx=$1
objpfx=$2
-charset=$3
-charmap=$4
+run_program_prefix=$3
+charset=$4
+charmap=$5
GCONV_PATH=${common_objpfx}iconvdata
export GCONV_PATH
fi
# iconv in one direction.
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${run_program_prefix} \
${objpfx}tst-table-from ${charset} \
> ${objpfx}tst-${charset}.table
# iconv in the other direction.
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${run_program_prefix} \
${objpfx}tst-table-to ${charset} | sort \
> ${objpfx}tst-${charset}.inverse.table
#!/bin/sh
-# Copyright (C) 2000-2004,2007,2011 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
#
common_objpfx=$1
objpfx=$2
+run_program_prefix=$3
status=0
if test "$charset" = GB18030; then echo "This might take a while" 1>&2; fi
case ${charset} in \#*) continue;; esac
echo -n "Testing ${charset}" 1>&2
- if ${SHELL} tst-table.sh ${common_objpfx} ${objpfx} ${charset} ${charmap}; then
+ if ${SHELL} tst-table.sh ${common_objpfx} ${objpfx} "${run_program_prefix}" \
+ ${charset} ${charmap}; then
echo 1>&2
else
echo "failed: ./tst-table.sh ${common_objpfx} ${objpfx} ${charset} ${charmap}"
$(objpfx)mtrace-tst-gettext: $(objpfx)tst-gettext.out
$(common-objpfx)malloc/mtrace $(objpfx)tst-gettext.mtrace > $@
$(objpfx)tst-gettext.out: tst-gettext.sh $(objpfx)tst-gettext
- $(SHELL) $< $(common-objpfx) $(common-objpfx)intl/ \
- $(objpfx)tst-gettext.mtrace
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' \
+ $(common-objpfx)intl/ $(objpfx)tst-gettext.mtrace
$(objpfx)tst-translit.out: tst-translit.sh $(objpfx)tst-translit
- $(SHELL) $< $(common-objpfx) $(common-objpfx)intl/
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' \
+ $(common-objpfx)intl/
$(objpfx)tst-gettext2.out: tst-gettext2.sh $(objpfx)tst-gettext2
- $(SHELL) $< $(common-objpfx) $(common-objpfx)intl/
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' \
+ $(common-objpfx)intl/
$(objpfx)tst-gettext4.out: tst-gettext4.sh $(objpfx)tst-gettext4
$(SHELL) $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
$(objpfx)tst-gettext6.out: tst-gettext6.sh $(objpfx)tst-gettext6
set -e
common_objpfx=$1
-objpfx=$2
-malloc_trace=$3
+run_program_prefix=$2
+objpfx=$3
+malloc_trace=$4
LC_ALL=C
export LC_ALL
# Now run the test.
MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${run_program_prefix} \
${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir
exit $?
set -e
common_objpfx=$1
-objpfx=$2
+run_program_prefix=$2
+objpfx=$3
LC_ALL=C
export LC_ALL
export LOCPATH
# Now run the test.
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${run_program_prefix} \
${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir &&
cmp ${objpfx}tst-gettext2.out - <<EOF
String1 - Lang1: 1st string
set -e
common_objpfx=$1
-objpfx=$2
+run_program_prefix=$2
+objpfx=$3
LC_ALL=C
export LC_ALL
LOCPATH=${common_objpfx}localedata
export LOCPATH
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${run_program_prefix} \
${objpfx}tst-translit > ${objpfx}tst-translit.out ${objpfx}domaindir
exit $?
ifneq ($(PERL),no)
tests: $(objpfx)tst-mtrace.out
$(objpfx)tst-mtrace.out: tst-mtrace.sh $(objpfx)tst-mtrace
- $(SHELL) $< $(common-objpfx)
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)'
endif
endif
endif
set -e
common_objpfx=$1; shift
+run_program_prefix=$1; shift
status=0
trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15
MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \
LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${run_program_prefix} \
${common_objpfx}malloc/tst-mtrace || status=1
if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then
$(SHELL) $< $(common-objpfx) $(elf-objpfx) \
$(rtld-installed-name)
$(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
- $(SHELL) $< $(common-objpfx) $(elf-objpfx) \
- $(rtld-installed-name)
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)'
endif
endif
# The others are just there to be parameters.
common_objpfx=$1; shift
-elf_objpfx=$1; shift
-rtld_installed_name=$1; shift
+run_program_prefix=$1; shift
logfile=${common_objpfx}posix/wordexp-tst.out
testout=${common_objpfx}posix/wordexp-test-result
export IFS
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '$*' > ${testout}1
cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1
wordexp returned 0
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '${*}' unquoted > ${testout}2
cat <<"EOF" | cmp - ${testout}2 >> $logfile || failed=1
wordexp returned 0
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '$@' unquoted > ${testout}3
cat <<"EOF" | cmp - ${testout}3 >> $logfile || failed=1
wordexp returned 0
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '"$* quoted"' param > ${testout}4
cat <<"EOF" | cmp - ${testout}4 >> $logfile || failed=1
wordexp returned 0
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '"$@ quoted"' param > ${testout}5
cat <<"EOF" | cmp - ${testout}5 >> $logfile || failed=1
wordexp returned 0
# Why? Because bash does it that way..
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '$#' 2 3 4 5 > ${testout}6
cat <<"EOF" | cmp - ${testout}6 >> $logfile || failed=1
wordexp returned 0
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '$2 ${3} $4' 2nd 3rd "4 th" > ${testout}7
cat <<"EOF" | cmp - ${testout}7 >> $logfile || failed=1
wordexp returned 0
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '${11}' 2 3 4 5 6 7 8 9 10 11 > ${testout}8
cat <<"EOF" | cmp - ${testout}8 >> $logfile || failed=1
wordexp returned 0
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '"a $@ b"' c d > ${testout}9
cat <<"EOF" | cmp - ${testout}9 >> $logfile || failed=1
wordexp returned 0
status=1
fi
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '${#@} ${#2} *$**' two 3 4 > ${testout}10
cat <<"EOF" | cmp - ${testout}10 || failed=1
wordexp returned 0