Browse code

Fix print of test log when unit test fails (bb #1838).

It was printing the wrong logfile (the one from the successful run).

Török Edvin authored on 2010/03/31 21:36:23
Showing 1 changed files
... ...
@@ -267,10 +267,16 @@ test_clamd1() {
267 267
 	scan_failed clamdscan-multiscan.log "clamd did not detect all testfiles correctly in multiscan mode!"
268 268
     fi
269 269
     if test "$NFILES" -ne "0$NINFECTED_FDPASS"; then
270
-	scan_failed clamdscan-multiscan.log "clamd did not detect all testfiles correctly in fdpass mode!"
270
+	scan_failed clamdscan-fdpass.log "clamd did not detect all testfiles correctly in fdpass mode!"
271 271
     fi
272 272
     if test "$NFILES" -ne "0$NINFECTED_MULTI_FDPASS"; then
273
-	scan_failed clamdscan-multiscan.log "clamd did not detect all testfiles correctly in fdpass+multiscan mode!"
273
+	scan_failed clamdscan-multiscan-fdpass.log "clamd did not detect all testfiles correctly in fdpass+multiscan mode!"
274
+    fi
275
+    if test "$NFILES" -ne "0$NINFECTED_STREAM"; then
276
+	scan_failed clamdscan-stream.log "clamd did not detect all testfiles correctly in stream mode!"
277
+    fi
278
+    if test "$NFILES" -ne "0$NINFECTED_MULTI_STREAM"; then
279
+	scan_failed clamdscan-multiscan-stream.log "clamd did not detect all testfiles correctly in multiscan+stream mode!"
274 280
     fi
275 281
     # Test HeuristicScanPrecedence off feature
276 282
     run_clamdscan ../clam-phish-exe