Explorar o código

BUG: If at least one test fails, the percent cannot be greater than 99

Andy Cedilnik %!s(int64=22) %!d(string=hai) anos
pai
achega
c1ba581da4
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      Source/cmCTest.cxx

+ 4 - 0
Source/cmCTest.cxx

@@ -2132,6 +2132,10 @@ int cmCTest::TestDirectory(bool memcheck)
       }
 
     float percent = float(passed.size()) * 100.0f / total;
+    if ( failed.size() > 0 &&  percent > 99)
+      {
+      percent = 99;
+      }
     fprintf(stderr,"\n%.0f%% tests passed, %i tests failed out of %i\n",
             percent, int(failed.size()), total);