From a11eff3e2e410807bfa93d91edab9b677204019c Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Thu, 12 Jul 2012 19:12:05 -0700 Subject: [PATCH] tests: Shorten a few of the most time-consuming tests when FAST=nonnull. --- tests/runtime/test-char-set.scm | 15 +++++++++++---- tests/runtime/test-hash-table.scm | 5 ++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/runtime/test-char-set.scm b/tests/runtime/test-char-set.scm index 7cda005fd..3bcd57f9e 100644 --- a/tests/runtime/test-char-set.scm +++ b/tests/runtime/test-char-set.scm @@ -374,7 +374,14 @@ USA. (n+1-generator 2-generator)) (define interesting-svls - (cons (list) - (append! (1-generator interesting-points) - (2-generator interesting-points) - (3-generator interesting-points)))) \ No newline at end of file + (if (let ((v (get-environment-variable "FAST"))) + (or (eq? v #f) (string-null? v))) + (begin + (warn "To avoid long runtimes, export FAST=y.") + (cons (list) + (append! (1-generator interesting-points) + (2-generator interesting-points) + (3-generator interesting-points)))) + (begin + (cons (list) + (1-generator interesting-points))))) \ No newline at end of file diff --git a/tests/runtime/test-hash-table.scm b/tests/runtime/test-hash-table.scm index 5160f54ba..e29cd8aec 100644 --- a/tests/runtime/test-hash-table.scm +++ b/tests/runtime/test-hash-table.scm @@ -177,7 +177,10 @@ USA. ;;;; Correctness Tests (define (check implementation) - (let ((n #x1000)) + (let ((n (if (let ((v (get-environment-variable "FAST"))) + (or (eq? v #f) (string-null? v))) + #x1000 + #x100))) (do ((i 0 (+ i 1))) ((= i #x100)) (let* ((key-radix (+ 1 (random-integer n))) (insert-fraction (random-real)) -- 2.25.1