Sanity/smoke-test: update test to work on CentOS Stream
This commit is contained in:
parent
2c78c9515a
commit
a77c80605f
1 changed files with 20 additions and 18 deletions
|
|
@ -64,10 +64,10 @@ rlJournalStart
|
|||
fi
|
||||
|
||||
rlFetchSrcForInstalled $PACKAGE
|
||||
if rlIsFedora || rlIsRHEL ">=8"; then
|
||||
rlRun "dnf builddep -y $PACKAGE*"
|
||||
else
|
||||
if rlIsRHEL "<=7"; then
|
||||
rlRun "yum-builddep -y $PACKAGE*"
|
||||
else
|
||||
rlRun "dnf builddep -y $PACKAGE*"
|
||||
fi
|
||||
TOPDIR=`rpm --eval %_topdir`
|
||||
rlRun "rm -rf ${TOPDIR}/BUILD/${PACKAGE}*" 0-255
|
||||
|
|
@ -108,33 +108,35 @@ rlJournalStart
|
|||
if [ ! -d "$BUILD_DIR_PATH" ]; then
|
||||
BUILD_DIR_PATH=$(readlink -f ${TOPDIR}/BUILD/${PACKAGE}*/build)
|
||||
fi
|
||||
if rlIsFedora || rlIsRHEL ">=8"; then
|
||||
if rlIsRHEL "<=7"; then
|
||||
rlRun -s "make -C $(readlink -f ${TOPDIR}/BUILD/${PACKAGE}*) check"
|
||||
rv=$?
|
||||
else
|
||||
rlRun -s "cmake --build $BUILD_DIR_PATH --target test"
|
||||
rv=$?
|
||||
# cmake output does not contain enough information, submit verbose output log
|
||||
FILE="${BUILD_DIR_PATH}/Testing/Temporary/LastTest.log"
|
||||
rlFileSubmit $(readlink -f $FILE) test_verbose_output.log
|
||||
else
|
||||
rlRun -s "make -C $(readlink -f ${TOPDIR}/BUILD/${PACKAGE}*) check"
|
||||
rv=$?
|
||||
fi
|
||||
|
||||
# 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="${BUILD_DIR_PATH}/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/"`
|
||||
FILE="${TOPDIR}/BUILD/${PACKAGE}*/${RESULT}"
|
||||
cat $(readlink -f $FILE)
|
||||
rlBundleLogs test_outputs $(dirname $FILE)
|
||||
if grep "See tests/" $FILE; then # we need to go deeper ...
|
||||
RESULT=`grep "See tests/" $FILE | sed -e "s/See tests\(.*\)/tests\1/"`
|
||||
if rlIsRHEL "<=7"; then
|
||||
if grep "See tests/" $rlRun_LOG; then
|
||||
RESULT=`grep "See tests/" $rlRun_LOG | sed -e "s/See tests\(.*\)/tests\1/"`
|
||||
FILE="${TOPDIR}/BUILD/${PACKAGE}*/${RESULT}"
|
||||
cat $(readlink -f $FILE)
|
||||
rlBundleLogs test_outputs_deep $(dirname $FILE)
|
||||
rlBundleLogs test_outputs $(dirname $FILE)
|
||||
if grep "See tests/" $FILE; then # we need to go deeper ...
|
||||
RESULT=`grep "See tests/" $FILE | sed -e "s/See tests\(.*\)/tests\1/"`
|
||||
FILE="${TOPDIR}/BUILD/${PACKAGE}*/${RESULT}"
|
||||
cat $(readlink -f $FILE)
|
||||
rlBundleLogs test_outputs_deep $(dirname $FILE)
|
||||
fi
|
||||
fi
|
||||
else
|
||||
FILE="${BUILD_DIR_PATH}/tests"
|
||||
rlBundleLogs test_outputs_all $(readlink -f $FILE)
|
||||
fi
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue