aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-06-07 10:12:51 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-06-07 10:12:51 -0700
commit20abfa85d57e796ab5fdf744643c7d3de08ae454 (patch)
tree453ff19a00aa4c62bf9bdc97aadbdc166a2902fa
parent523ed62b3c68ef4dc04fb2918ae8b1b2f8e2bce1 (diff)
allow building only in test runner
-rwxr-xr-xtests/runner.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 5e8cbeea..9214ae2d 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -13146,6 +13146,9 @@ elif 'benchmark' in str(sys.argv):
class benchmark(RunnerCore):
def print_stats(self, times, native_times, last=False, reps=TEST_REPS):
+ if reps == 0:
+ print '(no reps)'
+ return
mean = sum(times)/len(times)
squared_times = map(lambda x: x*x, times)
mean_of_squared = sum(squared_times)/len(times)