Sanity/smoke-test: find openscap build directory name because it can vary

This commit is contained in:
Milan Lysonek 2020-11-30 15:06:46 +01:00
commit cd55c6e3d0

View file

@ -95,8 +95,9 @@ rlJournalStart
rlPhaseStartTest "Run upstream test suite against installed $PACKAGE"
rlRun "export OSCAP_FULL_VALIDATION=1"
rlRun "export CUSTOM_OSCAP=$(which oscap)"
BUILD_DIR="$(rpm --eval %{_vpath_builddir})"
if rlIsFedora || rlIsRHEL ">=8"; then
rlRun -s "cmake --build $(readlink -f ${TOPDIR}/BUILD/${PACKAGE}*/build) --target test"
rlRun -s "cmake --build $(readlink -f ${TOPDIR}/BUILD/${PACKAGE}*/${BUILD_DIR}) --target test"
rv=$?
# cmake output does not contain enough information, submit verbose output log
FILE="$TOPDIR/BUILD/openscap*/build/Testing/Temporary/LastTest.log"
@ -109,7 +110,7 @@ rlJournalStart
# if we got error, submit file with result of particular test for easier debugging
if [ $rv -ne 0 ]; then
if rlIsFedora || rlIsRHEL ">=8"; then
FILE="${TOPDIR}/BUILD/${PACKAGE}*/build/tests"
FILE="${TOPDIR}/BUILD/${PACKAGE}*/${BUILD_DIR}/tests"
rlBundleLogs test_outputs_all $(readlink -f $FILE)
elif grep "See tests/" $rlRun_LOG; then
RESULT=`grep "See tests/" $rlRun_LOG | sed -e "s/See tests\(.*\)/tests\1/"`