aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/tatt_functions.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/templates/tatt_functions.sh b/templates/tatt_functions.sh
index b7e4e05..92db9ba 100644
--- a/templates/tatt_functions.sh
+++ b/templates/tatt_functions.sh
@@ -28,11 +28,17 @@ function tatt_pkg_error
fi
CP=${1#=}
- BUILDLOG=/var/tmp/portage/${CP}/temp/build.log
+ BUILDDIR=/var/tmp/portage/${CP}
+ BUILDLOG=${BUILDDIR}/temp/build.log
if [[ -n "${TATT_BUILDLOGDIR}" && -s "${BUILDLOG}" ]]; then
LOGNAME=$(mktemp -p "${TATT_BUILDLOGDIR}" "${CP/\//_}_${TATT_TEST_TYPE}_XXXXX")
mv "${BUILDLOG}" "${LOGNAME}"
echo " log has been saved as ${LOGNAME}" >> "${TATT_REPORTFILE}"
+ TESTLOGS=($(find ${BUILDDIR}/work -name test-suite.log -o -name testsuite.log -o -name LastTest.log))
+ if [ ${#TESTLOGS[@]} -gt 0 ]; then
+ tar cf ${LOGNAME}.tar ${TESTLOGS[@]}
+ echo " testsuite logs have been saved as ${LOGNAME}.tar" >> "${TATT_REPORTFILE}"
+ fi
fi
}