From 7a5b7991c107edab3c79ec1fb88c649090b6f25b Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Thu, 7 Apr 2011 12:53:32 +0000 Subject: [PATCH] 1.0.47.12: robustify test for bug-654289 Run GC before timing the compilation, so that garbage from earlier tests doesn't get accounted here. Up the fixed leeway to 1/10th of a second -- if we have a real regression the expected blowup is several seconds or tens of seconds. Also make the error message report the times for easier eyeballing of future failures. --- tests/compiler.pure.lisp | 6 +++++- version.lisp-expr | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index c8d09ac..57191fc 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -3600,6 +3600,7 @@ ;; Test that compile-times don't explode when quoted constants ;; get big. (labels ((time-n (n) + (gc :full t) ; Let's not confuse the issue with GC (let* ((tree (make-tree (expt 10 n) nil)) (t0 (get-internal-run-time)) (f (compile nil `(lambda (x) (eq x (quote ,tree))))) @@ -3614,7 +3615,10 @@ (max-small (reduce #'max times :end 3)) (max-big (reduce #'max times :start 3))) ;; This way is hopefully fairly CPU-performance insensitive. - (assert (> (* (+ 2 max-small) 2) max-big))))) + (unless (> (+ (truncate internal-time-units-per-second 10) + (* 2 max-small)) + max-big) + (error "Bad scaling or test? ~S" times))))) (with-test (:name :bug-309063) (let ((fun (compile nil `(lambda (x) diff --git a/version.lisp-expr b/version.lisp-expr index cecdaba..9f9c427 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -20,4 +20,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.47.11" +"1.0.47.12" -- 1.7.10.4