Karel Zak 42def0
#!/bin/bash
Karel Zak 42def0
Karel Zak 42def0
# Copyright (C) 2019 Karel Zak <kzak@redhat.com>
Karel Zak 42def0
Karel Zak 42def0
srcdir="../source"
Karel Zak 42def0
testdir="${srcdir}/tests"
Karel Zak 42def0
Karel Zak 42def0
echo "srcdir:  $srcdir"
Karel Zak 42def0
echo "testdir: $testdir"
Karel Zak 42def0
Karel Zak 42def0
if [ ! -x "${testdir}/run.sh" ]; then
Karel Zak 42def0
	echo "upstream tests not found"
Karel Zak 42def0
	exit 1
Karel Zak 42def0
fi
Karel Zak 42def0
Karel Zak 42def0
# We don't compile the tests, but it still needs some hints.
Karel Zak 42def0
#
Karel Zak 42def0
echo > ${srcdir}/config.h
Karel Zak 42def0
echo "#define HAVE_WIDECHAR 1"              >> ${srcdir}/config.h
Karel Zak 42def0
echo "#define HAVE_LINUX_NET_NAMESPACE_H 1" >> ${srcdir}/config.h
Karel Zak 42def0
Karel Zak 42def0
# Remove stuff we don't have in RHEL
Karel Zak 42def0
#
Karel Zak 42def0
rm -rf ${testdir}/ts/misc/line
Karel Zak 42def0
Karel Zak 42def0
Karel Zak 42def0
version_tests=$(cat ${srcdir}/.version)
Karel Zak 42def0
version_system=$(rpm -q util-linux)
Karel Zak 42def0
Karel Zak 42def0
echo
Karel Zak 42def0
echo "Used versions: "
Karel Zak 42def0
echo "       upstream tests: $version_tests"
Karel Zak 42def0
echo " installed util-linux: $version_system"
Karel Zak 42def0
echo
Karel Zak 42def0
Karel Zak 42def0
# Run upstream tests
Karel Zak 42def0
#
Karel Zak 42def0
${testdir}/run.sh --use-system-commands --noskip-commands --show-diff
Karel Zak 42def0
Karel Zak 42def0
exit $?