mirror of
https://git.tukaani.org/xz.git
synced 2025-02-17 14:08:12 +00:00
Test: Add CMake support to test_suffix.sh
It needs to find the xz executable from a different directory and work without config.h. (cherry picked from commit a805594ed0b4cbf7b81aa28ff46a8ab3c83c6876)
This commit is contained in:
parent
1e243ab378
commit
86f33bb90c
@ -7,10 +7,10 @@
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# If xz was not built, skip this test.
|
||||
XZ=../src/xz/xz
|
||||
test -x "$XZ" || XZ=
|
||||
if test -z "$XZ"; then
|
||||
# If xz was not built, skip this test. Autotools and CMake put
|
||||
# the xz executable in a different location.
|
||||
XZ=${1:-../src/xz}/xz
|
||||
if test ! -x "$XZ"; then
|
||||
echo "xz was not built, skipping this test."
|
||||
exit 77
|
||||
fi
|
||||
@ -19,7 +19,9 @@ fi
|
||||
# This isn't perfect because it does not specifically check for LZMA1/2
|
||||
# filters. Many of the other tests also assume LZMA1/2 support if encoders
|
||||
# or decoders are enabled.
|
||||
if grep 'define HAVE_ENCODERS' ../config.h > /dev/null \
|
||||
if test ! -f ../config.h ; then
|
||||
:
|
||||
elif grep 'define HAVE_ENCODERS' ../config.h > /dev/null \
|
||||
&& grep 'define HAVE_DECODERS' ../config.h > /dev/null ; then
|
||||
:
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user