tests: Save debug log to a file and clean up stdout status
This makes it easier to figure out what failed and allows builbot to integrate multiple logs and state information about the test cases. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
25a8f9e316
commit
c548fb27c8
2 changed files with 23 additions and 4 deletions
|
@ -6,8 +6,10 @@ umask 0002
|
|||
if [ "x$1" = "xconcurrent-valgrind" ]; then
|
||||
./start-p2p-concurrent.sh valgrind
|
||||
DATE=`ls -1tr logs | tail -1 | cut -f1 -d-`
|
||||
rm logs/last-debug
|
||||
for i in autogo discovery grpform; do
|
||||
./run-tests.py -e logs/$DATE-failed-$i -f test_p2p_$i.py || errors=1
|
||||
./run-tests.py -l logs/$DATE-run-$i -e logs/$DATE-failed-$i -f test_p2p_$i.py || errors=1
|
||||
cat logs/$DATE-run-$i >> logs/last-debug
|
||||
done
|
||||
./stop-wifi.sh valgrind
|
||||
failures=`grep "ERROR SUMMARY" logs/$DATE-valgrind-* | grep -v " 0 errors" | wc -l`
|
||||
|
@ -22,8 +24,10 @@ if [ "x$1" = "xconcurrent-valgrind" ]; then
|
|||
elif [ "x$1" = "xconcurrent" ]; then
|
||||
./start-p2p-concurrent.sh
|
||||
DATE=`ls -1tr logs | tail -1 | cut -f1 -d-`
|
||||
rm logs/last-debug
|
||||
for i in autogo discovery grpform; do
|
||||
./run-tests.py -e logs/$DATE-failed-$i -f test_p2p_$i.py || errors=1
|
||||
./run-tests.py -l logs/$DATE-run-$i -e logs/$DATE-failed-$i -f test_p2p_$i.py || errors=1
|
||||
cat logs/$DATE-run-$i >> logs/last-debug
|
||||
done
|
||||
./stop-wifi.sh
|
||||
if [ $errors -gt 0 ]; then
|
||||
|
@ -33,7 +37,8 @@ elif [ "x$1" = "xconcurrent" ]; then
|
|||
elif [ "x$1" = "xvalgrind" ]; then
|
||||
./start.sh valgrind
|
||||
DATE=`ls -1tr logs | tail -1 | cut -f1 -d-`
|
||||
./run-tests.py -e logs/$DATE-failed || errors=1
|
||||
./run-tests.py -l logs/$DATE-run -e logs/$DATE-failed || errors=1
|
||||
cat logs/$DATE-run > logs/last-debug
|
||||
./stop-wifi.sh valgrind
|
||||
failures=`grep "ERROR SUMMARY" logs/$DATE-valgrind-* | grep -v " 0 errors" | wc -l`
|
||||
if [ $failures -gt 0 ]; then
|
||||
|
@ -47,7 +52,8 @@ elif [ "x$1" = "xvalgrind" ]; then
|
|||
else
|
||||
./start.sh
|
||||
DATE=`ls -1tr logs | tail -1 | cut -f1 -d-`
|
||||
./run-tests.py -e logs/$DATE-failed || errors=1
|
||||
./run-tests.py -l logs/$DATE-run -e logs/$DATE-failed || errors=1
|
||||
cat logs/$DATE-run > logs/last-debug
|
||||
./stop-wifi.sh
|
||||
if [ $errors -gt 0 ]; then
|
||||
tar czf /tmp/hwsim-tests-$DATE-FAILED.tar.gz logs/$DATE*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue