aboutsummaryrefslogtreecommitdiffstats
path: root/tools/randpkt-test.sh
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-10-09 20:47:22 +0000
committerGerald Combs <gerald@wireshark.org>2012-10-09 20:47:22 +0000
commitff32bd8000125728c2d6e892d9a896708754fa6d (patch)
treefa311763b8a4e25ecf82819a4ac90becc547f24c /tools/randpkt-test.sh
parentcdd0915addfc4f84fc3470671a693be2741a1bd7 (diff)
If our error output is huge (> 5 MB) trim out the middle of the file.
The recent loop bugs have generated output that's too large to attach to Bugzilla. svn path=/trunk/; revision=45437
Diffstat (limited to 'tools/randpkt-test.sh')
-rwxr-xr-xtools/randpkt-test.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/randpkt-test.sh b/tools/randpkt-test.sh
index e62df6d2ea..ea87135706 100755
--- a/tools/randpkt-test.sh
+++ b/tools/randpkt-test.sh
@@ -89,6 +89,15 @@ function exit_error() {
echo -e "Processing failed. Capture info follows:\n"
echo " Input file: $CF"
+ ERR_SIZE=$(du -sk $TMP_DIR/$ERR_FILE | awk '{ print $1 }')
+ if [ $ERR_SIZE -ge 5000 ] ; then
+ mv $TMP_DIR/$ERR_FILE $TMP_DIR/${ERR_FILE}.full
+ head -n 2000 $TMP_DIR/${ERR_FILE}.full > $TMP_DIR/$ERR_FILE
+ echo -e "\n\n[ Output removed ]\n\n" >> $TMP_DIR/$ERR_FILE
+ tail -n 2000 $TMP_DIR/${ERR_FILE}.full >> $TMP_DIR/$ERR_FILE
+ rm -f $TMP_DIR/${ERR_FILE}.full
+ fi
+
if [ -d .svn ] ; then
echo -e "\nSubversion revision" >> $TMP_DIR/$ERR_FILE
svn log -l 1 >> $TMP_DIR/$ERR_FILE