Change 13340 by jhi@alpha on 2001/11/28 13:45:00

        Subject: [PATCH: perl@13324] arithmetic fix for skipped tests on VMS      
        From: [EMAIL PROTECTED]
        Date: Wed, 28 Nov 2001 07:51:26 -0500
        Message-ID: <[EMAIL PROTECTED]>    

Affected files ...

.... //depot/perl/vms/test.com#41 edit

Differences ...

==== //depot/perl/vms/test.com#41 (text) ====
Index: perl/vms/test.com
--- perl/vms/test.com.~1~       Wed Nov 28 07:00:05 2001
+++ perl/vms/test.com   Wed Nov 28 07:00:05 2001
@@ -2,7 +2,7 @@
 $!
 $!  Version 1.1   4-Dec-1995
 $!  Charles Bailey  [EMAIL PROTECTED]
-$
+$!
 $!  A little basic setup
 $   On Error Then Goto wrapup
 $   olddef = F$Environment("Default")
@@ -20,7 +20,7 @@
 $       EndIf
 $   EndIf
 $   Set Message /NoFacility/NoSeverity/NoIdentification/NoText
-$
+$!
 $   exe = ".Exe"
 $   If p1.nes."" Then exe = p1
 $   If F$Extract(0,1,exe) .nes. "."
@@ -94,7 +94,7 @@
 $   Link/NoMap/NoTrace/Exe=Echo.Exe Echo.Obj;
 $   Delete/Log/NoConfirm Echo.Obj;*
 $   echo == "$" + F$Parse("Echo.Exe")
-$
+$!
 $!  And do it
 $   Show Process/Accounting
 $   testdir = "Directory/NoHead/NoTrail/Column=1"
@@ -152,6 +152,7 @@
 
 $bad = 0;
 $good = 0;
+$extra_skip = 0;
 $total = @ARGV;
 while ($test = shift) {
     if ($test =~ /^$/) {
@@ -236,6 +237,7 @@
        } else {
            print "${te}skipping test on this platform\n";
            $files -= 1;
+           $extra_skip = $extra_skip + 1;
        }
     } else {
        $next += 1;
@@ -255,11 +257,21 @@
        die "FAILED--no tests were run for some reason.\n";
     }
 } else {
-    $pct = sprintf("%.2f", $good / $total * 100);
+    # $pct = sprintf("%.2f", $good / $total * 100);
+    $gtotal = $total - $extra_skip;
+    if ($gtotal <= 0) { $gtotal = $total; }
+    $pct = sprintf("%.2f", $good / $gtotal * 100);
     if ($bad == 1) {
        warn "Failed 1 test, $pct% okay.\n";
-    } else {
-       warn "Failed $bad/$total tests, $pct% okay.\n";
+   } else {
+         if ($extra_skip > 0) {
+            warn "Total tests: $total, Passed $good, Skipped $extra_skip.\n";
+            warn "Failed $bad/$gtotal tests, $pct% okay.\n";
+         }
+         else {
+            warn "Total tests: $total, Passed $good.\n";
+            warn "Failed $bad/$gtotal tests, $pct% okay.\n";
+         }
     }
 }
 ($user,$sys,$cuser,$csys) = times;
End of Patch.

Reply via email to