3 # if failed-summary.log is not empty, exit status = 1
4 if [ -s "${HS_ROOT}/summary/failed-summary.log" ]
6 if [ -n "${WORKSPACE}" ]
8 echo -n "Copying docker logs..."
9 dirs=$(jq -r '.[0] | .SpecReports[] | select(.State == "failed") | .LeafNodeText' ${HS_ROOT}/summary/report.json)
10 for dirName in $dirs; do
11 logDir=/tmp/hs-test/$dirName
12 if [ -d "$logDir" ]; then
13 mkdir -p ${WORKSPACE}/archives/summary
14 cp -r $logDir ${WORKSPACE}/archives/summary/
19 echo -n "Copying failed test logs into build log archive directory (${WORKSPACE}/archives)... "
20 mkdir -p ${WORKSPACE}/archives/summary
21 cp -a ${HS_ROOT}/summary/* ${WORKSPACE}/archives/summary
24 echo -n "Compressing files in ${WORKSPACE}/archives from test runs... "
25 cd ${WORKSPACE}/archives
26 find . -type f \( -name "*.json" -o -name "*.log" \) -exec gzip {} \;
30 echo "Not compressing files in temporary directories from test runs."
32 echo "*************************** SUMMARY ***************************"
33 cat "${HS_ROOT}/summary/failed-summary.log"