Browse Source

Set ITERATIONS to the lowest possible value ($10000) to avoid reaching individual test time limit

Pierre Muller 3 months ago
parent
commit
24ff6f76ab
2 changed files with 5 additions and 0 deletions
  1. 4 0
      tests/bench/bcase.pp
  2. 1 0
      tests/test/tcase49.pp

+ 4 - 0
tests/bench/bcase.pp

@@ -32,7 +32,11 @@ function IIf(Condition: Boolean; TrueRes, FalseRes: Integer): Integer; inline;
   end;
 
 const
+{$ifdef IN_TESTS}
+  ITERATIONS = $10000;
+{$else not IN_TESTS}
   ITERATIONS = 33554432;
+{$endif not IN_TESTS}
 
   AES_S_Box: array[Byte] of Byte = (
     $63, $7c, $77, $7b, $f2, $6b, $6f, $c5, $30, $01, $67, $2b, $fe, $d7, $ab, $76,

+ 1 - 0
tests/test/tcase49.pp

@@ -1,3 +1,4 @@
 { %OPT=-O2 }
 { this benchmark can be used also as a test case }
+{$define IN_TESTS}
 {$I ../bench/bcase.pp}