+2001-08-27 Akim Demaille <akim@epita.fr>
+
+ * lib/autotest/general.m4 (AT_INIT) <at_cmd_line>: Remove.
+ <at_cmd_line>: New.
+ Pass it to debug-*.sh scripts.
+ <AUTOTEST_PATH>: May contain absolute dir names.
+
2001-08-27 Akim Demaille <akim@epita.fr>
* lib/autotest/general.m4 (AT_INIT): Log the command line.
SHELL=${CONFIG_SHELL-/bin/sh}
# How were we run?
-at_cmd_line="$[0] $[@]"
+at_cli_args=${1+"$[@]"}
. ./atconfig
at_path=
# Build first.
for at_dir in $AUTOTEST_PATH; do
- at_dir=`(cd "$top_builddir/$at_dir" && pwd) 2>/dev/null`
- if test -n "$at_dir"; then
+ case $at_dir in
+ [[\\/]]* | ?:[[\\/]]* )
+ at_dir=`(cd "$at_dir" && pwd) 2>/dev/null` ;;
+ * )
+ at_dir=`(cd "$top_builddir/$at_dir" && pwd) 2>/dev/null` ;;
+ esac
+ if test -d "$at_dir"; then
at_path="$at_path$at_sep$at_dir"
at_sep=$PATH_SEPARATOR
fi
done
# Then source.
for at_dir in $AUTOTEST_PATH; do
- at_dir=`(cd "$top_srcdir/$at_dir" && pwd) 2>/dev/null`
- if test -n "$at_dir"; then
+ case $at_dir in
+ [[\\/]]* | ?:[[\\/]]* )
+ at_dir=`(cd "$at_dir" && pwd) 2>/dev/null` ;;
+ * )
+ at_dir=`(cd "$top_srcdir/$at_dir" && pwd) 2>/dev/null` ;;
+ esac
+ if test -d "$at_dir"; then
at_path="$at_path$at_sep$at_dir"
at_sep=$PATH_SEPARATOR
fi
# And finally PATH.
for at_dir in $PATH; do
at_dir=`(cd "$at_dir" && pwd) 2>/dev/null`
- if test -n "$at_dir"; then
+ if test -d "$at_dir"; then
at_path="$at_path$at_sep$at_dir"
at_sep=$PATH_SEPARATOR
fi
echo
echo "$as_me: command line was:"
- echo " $ $at_cmd_line"
+ echo " $ $[0] $at_cli_args"
echo
# Try to find a few ChangeLogs in case it might help determining the
for at_group in $at_fail_list; do
echo $at_n " $at_group$at_c"
( echo "#! /bin/sh"
- echo 'exec ${CONFIG_SHELL-'"$SHELL"'} '"$[0]"' -v -d '"$at_group"' ${1+"$[@]"}'
+ echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$[0]" \
+ '-v -d' "$at_cli_args" "$at_group" '${1+"$[@]"}'
echo 'exit 1'
) >debug-$at_group.sh
chmod +x debug-$at_group.sh