Run the scripts with the correct shell in test_scripts.sh.

The scripts are now made executable in the build tree.
This way the scripts can be run like programs in
test_scripts.sh. Previously test_scripts.sh always
used sh but it's not correct if @POSIX_SHELL@ is set
to something else by configure.

Thanks to Jonathan Nieder for the patch.
This commit is contained in:
Lasse Collin 2011-08-06 20:37:28 +03:00
parent 1c673e5681
commit e9ed88126e
2 changed files with 8 additions and 8 deletions

View File

@ -716,13 +716,13 @@ AC_CONFIG_FILES([
src/xzdec/Makefile src/xzdec/Makefile
src/lzmainfo/Makefile src/lzmainfo/Makefile
src/scripts/Makefile src/scripts/Makefile
src/scripts/xzdiff
src/scripts/xzgrep
src/scripts/xzmore
src/scripts/xzless
tests/Makefile tests/Makefile
debug/Makefile debug/Makefile
]) ])
AC_CONFIG_FILES([src/scripts/xzdiff], [chmod +x src/scripts/xzdiff])
AC_CONFIG_FILES([src/scripts/xzgrep], [chmod +x src/scripts/xzgrep])
AC_CONFIG_FILES([src/scripts/xzmore], [chmod +x src/scripts/xzmore])
AC_CONFIG_FILES([src/scripts/xzless], [chmod +x src/scripts/xzless])
AC_OUTPUT AC_OUTPUT

View File

@ -13,7 +13,7 @@
XZ=../src/xz/xz XZ=../src/xz/xz
XZDIFF=../src/scripts/xzdiff XZDIFF=../src/scripts/xzdiff
test -x "$XZ" || XZ= test -x "$XZ" || XZ=
test -r "$XZDIFF" || XZDIFF= test -x "$XZDIFF" || XZDIFF=
if test -z "$XZ" || test -z "$XZDIFF"; then if test -z "$XZ" || test -z "$XZDIFF"; then
(exit 77) (exit 77)
exit 77 exit 77
@ -26,7 +26,7 @@ preimage=$srcdir/files/good-1-check-crc32.xz
samepostimage=$srcdir/files/good-1-check-crc64.xz samepostimage=$srcdir/files/good-1-check-crc64.xz
otherpostimage=$srcdir/files/good-1-lzma2-1.xz otherpostimage=$srcdir/files/good-1-lzma2-1.xz
sh "$XZDIFF" "$preimage" "$samepostimage" >/dev/null "$XZDIFF" "$preimage" "$samepostimage" >/dev/null
status=$? status=$?
if test "$status" != 0 ; then if test "$status" != 0 ; then
echo "xzdiff with no changes exited with status $status != 0" echo "xzdiff with no changes exited with status $status != 0"
@ -34,7 +34,7 @@ if test "$status" != 0 ; then
exit 1 exit 1
fi fi
sh "$XZDIFF" "$preimage" "$otherpostimage" >/dev/null "$XZDIFF" "$preimage" "$otherpostimage" >/dev/null
status=$? status=$?
if test "$status" != 1 ; then if test "$status" != 1 ; then
echo "xzdiff with changes exited with status $status != 1" echo "xzdiff with changes exited with status $status != 1"
@ -42,7 +42,7 @@ if test "$status" != 1 ; then
exit 1 exit 1
fi fi
sh "$XZDIFF" "$preimage" "$srcdir/files/missing.xz" >/dev/null 2>&1 "$XZDIFF" "$preimage" "$srcdir/files/missing.xz" >/dev/null 2>&1
status=$? status=$?
if test "$status" != 2 ; then if test "$status" != 2 ; then
echo "xzdiff with missing operand exited with status $status != 2" echo "xzdiff with missing operand exited with status $status != 2"