Hi,
I happened to notice that indeed, the problem as described is still occurring.
If I understand the problem, we don't actually want 'accurate' rounding when the percentage of failure gets small...?
We don't want to get the impression that all tests passed (100%) in combination with seeing a failure.
I am wondering if a forced adjustment of the percentage would be acceptable?
I am thinking of the following adjustment to ../functionTests/harness/GenerateReport.java:
-----------------------------------------------------
@@ -187,7 +187,13 @@
NumRun = NumPass+NumFail;
NumSkip = CountLines (skipFileName);
PercentPass = (int)Math.ceil(100* ((double)NumPass/(double)NumRun));
+ // use brute force to not get 100% pass if there's even 1 failure.
NumRun = NumPass+NumFail;
NumSkip = CountLines (skipFileName);
PercentPass = (int)Math.ceil(100* ((double)NumPass/(double)NumRun));
+ // use brute force to not get 100% pass if there's even 1 failure.
+ if ((PercentPass == 100) && (NumFail != 0))
+ PercentPass = 99;
PercentFail = (int)Math.floor(100* ((double)NumFail/(double)NumRun));
+ // use brute force to not get 0% fail if there's even 1 failure.
+ PercentPass = 99;
PercentFail = (int)Math.floor(100* ((double)NumFail/(double)NumRun));
+ // use brute force to not get 0% fail if there's even 1 failure.
+ if ((PercentFail == 0) && (NumFail != 0))
+ PercentFail = 1;
}
+ PercentFail = 1;
}
------------------------------------------------------
If something like this would be ok, I can make a patch for it...
