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