aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-04-26 14:57:15 -0700
committerGerald Combs <gerald@wireshark.org>2016-04-26 21:58:12 +0000
commit37df3400dc13ccc2447514d5c060c635d1a85ae8 (patch)
treecdace43c80ef0f2e5faecbd5400b60a1a04257d5 /test
parent7f710ef2b54d9eeb06c35ab1bd834f2df0696024 (diff)
Test: capture_step_stdin updates.
In capture_step_stdin, print information about our test capture if we fail. Change-Id: I046f9d22b1bb2d52d96926f50379ab51e6279eb3 Reviewed-on: https://code.wireshark.org/review/15125 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'test')
-rwxr-xr-xtest/suite-capture.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/suite-capture.sh b/test/suite-capture.sh
index a60b3beeae..bac81bfb95 100755
--- a/test/suite-capture.sh
+++ b/test/suite-capture.sh
@@ -43,6 +43,17 @@ capture_test_output_print() {
done
}
+capture_test_output_capinfos() {
+ wait
+ for f in "$@"; do
+ if [[ -f "$f" ]]; then
+ $CAPINFOS "$f"
+ else
+ printf "$f not found.\n"
+ fi
+ done
+}
+
traffic_gen_ping() {
# Generate some traffic for quiet networks.
# The following will run in the background and return immediately
@@ -225,6 +236,7 @@ capture_step_stdin() {
set +xv
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
capture_test_output_print ./testout.txt ./testerr.txt ./dumpcap_debug_log.tmp
+ capture_test_output_capinfos ./testout.pcap
test_step_failed "Exit status of $DUT: $RETURNVALUE"
return
fi