blob: 7f57db181dd8b618731b429b8d11957b12cd2fab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/bash
cat_failed ()
{
if ! test -d "$1"; then
echo ERROR dumping the failing test logs.
echo
echo Give valid directory to start crawling.
echo Example ./cat_failed.sh dir/
echo
return 1
fi
for trs in $(find "${1}" -name "*.trs") ; do
if head -q -n1 < ${trs} | grep -q FAIL; then
filename_log=$(echo ${trs}|sed -e 's/trs$/log/')
echo
echo "== DUMPING LOGS =="
echo
cat ${filename_log}
fi
done
return 0
}
|