11#! /bin/sh
22
3- packetdrill=/usr/home/zeebsd/packetdrill/gtests/net/packetdrill/packetdrill
3+ packetdrill=
4+
5+ if [ -z " $packetdrill " ]
6+ then
7+ printf " Please set the value of \$ packetdrill variable to the path of packetdrill binary on your machine.\n"
8+ exit
9+ fi
410
511set blocking/blocking-accept \
612 blocking/blocking-read \
@@ -52,25 +58,34 @@ run=0
5258skipped=0
5359found=0
5460
55- printf " \nScript Name Result\n"
56- printf " ====================================================================\n"
61+ ` rm -f error.log`
62+ printf " \nScript Name Result\n"
63+ printf " ==============================================================\n"
5764for test
5865do
59- printf " %-60.60s " $test
66+ printf " %-55.55s " $test
6067 ` sleep $delay `
6168 if [ -e ${test} .pkt ]
6269 then
63- $packetdrill ${test} .pkt > /dev/null 2>&1
70+ ` rm -f temp.log`
71+ ` $packetdrill -v ${test} .pkt >> temp.log 2>&1 `
6472 result=" ` echo $? ` "
6573 found=1
6674 if [ $found = 1 ]
6775 then
6876 if [ $result = 1 ]
6977 then
78+ ` echo Test Name: ${test} >> error.log`
79+ ` echo -e " ---------------------------------------------------------" >> error.log`
80+ ` cat temp.log >> error.log`
81+ ` echo -e " " >> error.log`
7082 printf " FAILED\n"
83+ printf " \--------------------------------------------------------------\n"
7184 failed=` expr $failed + 1`
85+ set -- " $@ " $test
7286 else
7387 printf " PASSED\n"
88+ printf " \--------------------------------------------------------------\n"
7489 passed=` expr $passed + 1`
7590 fi
7691 run=` expr $run + 1`
8095 skipped=` expr $skipped + 1`
8196 fi
8297done
98+ ` rm -f temp.log`
8399
84100printf " \nSummary\n"
85101printf " ===========================\n"
@@ -88,3 +104,8 @@ printf "Number of tests run: %6d\n" $run
88104printf " Number of tests passed: %3d\n" $passed
89105printf " Number of tests failed: %3d\n" $failed
90106printf " Number of tests skipped: %2d\n" $skipped
107+ printf " \nView the log file (error.log) for details\n"
108+
109+ # printf "\nList of failed tests\n"
110+ # printf "===========================\n"
111+ # printf '%s\n' "$@"
0 commit comments