]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - test/run-stp-tests.sh
Preserve job files for 5 minutes.
[thirdparty/cups.git] / test / run-stp-tests.sh
index 641e03b7807e44f53a87048a5ea4b0863654efe9..aac9909e4cbc1e08c8aa0f4ebc71bdcb0486bbc8 100755 (executable)
@@ -231,7 +231,7 @@ echo ""
 
 case "$usevalgrind" in
        Y* | y*)
-               VALGRIND="valgrind --tool=memcheck --log-file=$BASE/log/valgrind.%p --error-limit=no --leak-check=yes --trace-children=yes --read-var-info=yes"
+               VALGRIND="valgrind --tool=memcheck --log-file=$BASE/log/valgrind.%p --error-limit=no --leak-check=yes --trace-children=yes"
                if test `uname` = Darwin; then
                        VALGRIND="$VALGRIND --dsymutil=yes"
                fi
@@ -335,13 +335,30 @@ ln -s $root/filter/rastertoepson $BASE/bin/filter
 ln -s $root/filter/rastertohp $BASE/bin/filter
 ln -s $root/filter/rastertolabel $BASE/bin/filter
 ln -s $root/filter/rastertopwg $BASE/bin/filter
+cat >$BASE/share/banners/standard <<EOF
+           ==== Cover Page ====
 
-ln -s $root/data/classified $BASE/share/banners
-ln -s $root/data/confidential $BASE/share/banners
-ln -s $root/data/secret $BASE/share/banners
-ln -s $root/data/standard $BASE/share/banners
-ln -s $root/data/topsecret $BASE/share/banners
-ln -s $root/data/unclassified $BASE/share/banners
+
+      Job: {?printer-name}-{?job-id}
+    Owner: {?job-originating-user-name}
+     Name: {?job-name}
+    Pages: {?job-impressions}
+
+
+           ==== Cover Page ====
+EOF
+cat >$BASE/share/banners/classified <<EOF
+           ==== Classified - Do Not Disclose ====
+
+
+      Job: {?printer-name}-{?job-id}
+    Owner: {?job-originating-user-name}
+     Name: {?job-name}
+    Pages: {?job-impressions}
+
+
+           ==== Classified - Do Not Disclose ====
+EOF
 ln -s $root/data $BASE/share
 ln -s $root/ppdc/sample.drv $BASE/share/drv
 ln -s $root/conf/mime.types $BASE/share/mime
@@ -472,7 +489,7 @@ AccessLogLevel actions
 LogLevel $loglevel
 LogTimeFormat usecs
 PreserveJobHistory Yes
-PreserveJobFiles No
+PreserveJobFiles 5m
 <Policy default>
 <Limit All>
 Order Allow,Deny
@@ -623,8 +640,7 @@ echo "    $VALGRIND ../scheduler/cupsd -c $BASE/cupsd.conf -f >$BASE/log/debug_l
 echo ""
 
 if test `uname` = Darwin -a "x$VALGRIND" = x; then
-       DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib
-       ../scheduler/cupsd -c $BASE/cupsd.conf -f >$BASE/log/debug_log 2>&1 &
+       DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib MallocStackLogging=1 ../scheduler/cupsd -c $BASE/cupsd.conf -f >$BASE/log/debug_log 2>&1 &
 else
        $VALGRIND ../scheduler/cupsd -c $BASE/cupsd.conf -f >$BASE/log/debug_log 2>&1 &
 fi
@@ -695,7 +711,7 @@ done
 #
 
 date=`date "+%Y-%m-%d"`
-strfile=$BASE/cups-str-2.0-$date-$user.html
+strfile=$BASE/cups-str-2.1-$date-$user.html
 
 rm -f $strfile
 cat str-header.html >$strfile
@@ -767,6 +783,13 @@ for file in 5*.sh; do
        fi
 done
 
+#
+# Log all allocations made by the scheduler...
+#
+if test `uname` = Darwin -a "x$VALGRIND" = x; then
+       malloc_history $cupsd -callTree -showContent >$BASE/log/malloc_log 2>&1
+fi
+
 #
 # Restart the server...
 #
@@ -778,12 +801,12 @@ echo "\"5.10-restart\":" >>$strfile
 kill -HUP $cupsd
 
 while true; do
+       sleep 10
+
        running=`../systemv/lpstat -r 2>/dev/null`
        if test "x$running" = "xscheduler is running"; then
                break
        fi
-
-       sleep 10
 done
 
 description="`lpstat -l -p Test1 | grep Description | sed -e '1,$s/^[^:]*: //g'`"
@@ -869,7 +892,7 @@ fi
 
 # Requests logged
 count=`wc -l $BASE/log/access_log | awk '{print $1}'`
-expected=`expr 37 + 18 + 28 + $pjobs \* 8 + $pprinters \* $pjobs \* 4`
+expected=`expr 37 + 18 + 29 + $pjobs \* 8 + $pprinters \* $pjobs \* 4`
 if test $count != $expected; then
        echo "FAIL: $count requests logged, expected $expected."
        echo "<P>FAIL: $count requests logged, expected $expected.</P>" >>$strfile