tests/mansyntax.sh: fix 'make distcheck' with recent autotools
Do not create symbolic links off the build directory. Recent autotools verify that out-of-source build works even if the source directory tree is not writable.
Этот коммит содержится в:
родитель
418be878ad
Коммит
13f8addd1b
@ -78,8 +78,9 @@ find_program(MAN_EXECUTABLE man)
|
||||
find_program(GREP_EXECUTABLE grep)
|
||||
mark_as_advanced(SH_EXECUTABLE MAN_EXECUTABLE GREP_EXECUTABLE)
|
||||
if(SH_EXECUTABLE AND MAN_EXECUTABLE AND GREP_EXECUTABLE)
|
||||
add_test(mansyntax
|
||||
${SH_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/mansyntax.sh")
|
||||
set(cmd "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(cmd "${cmd} ${CMAKE_CURRENT_SOURCE_DIR}/mansyntax.sh")
|
||||
add_test(mansyntax ${SH_EXECUTABLE} -c "${cmd}")
|
||||
endif()
|
||||
|
||||
add_test(simple test-simple)
|
||||
@ -107,4 +108,4 @@ if(SSHD_EXECUTABLE AND CHMOD_EXECUTABLE AND KILL_EXECUTABLE)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/test-${TEST_NAME}_fixture.sh
|
||||
$<TARGET_FILE:test-${TEST_NAME}>)
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
@ -14,6 +14,7 @@ endif
|
||||
check_PROGRAMS = $(ctests)
|
||||
|
||||
TESTS_ENVIRONMENT = SSHD=$(SSHD) EXEEXT=$(EXEEXT)
|
||||
TESTS_ENVIRONMENT += srcdir=$(top_srcdir)/tests builddir=$(top_builddir)/tests
|
||||
|
||||
EXTRA_DIST = ssh2.sh mansyntax.sh
|
||||
EXTRA_DIST += etc/host etc/host.pub etc/user etc/user.pub
|
||||
|
@ -6,7 +6,8 @@ set -e
|
||||
# Run syntax checks for all manpages in the documentation tree.
|
||||
#
|
||||
|
||||
srcdir="`cd $(dirname $0);pwd`"
|
||||
srcdir=${srcdir:-$PWD}
|
||||
dstdir=${builddir:-$PWD}
|
||||
mandir=${srcdir}/../docs
|
||||
|
||||
#
|
||||
@ -19,13 +20,13 @@ fi
|
||||
|
||||
ec=0
|
||||
|
||||
trap "rm -f $srcdir/man3" EXIT
|
||||
trap "rm -f $dstdir/man3" EXIT
|
||||
|
||||
ln -sf "$mandir" "$srcdir/man3"
|
||||
ln -sf "$mandir" "$dstdir/man3"
|
||||
|
||||
for manpage in $mandir/libssh2_*.*; do
|
||||
echo "$manpage"
|
||||
warnings=$(LANG=en_US.UTF-8 MANWIDTH=80 man -M "$srcdir" --warnings \
|
||||
warnings=$(LANG=en_US.UTF-8 MANWIDTH=80 man -M "$dstdir" --warnings \
|
||||
-E UTF-8 -l "$manpage" 2>&1 >/dev/null)
|
||||
if [ -n "$warnings" ]; then
|
||||
echo "$warnings"
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user