From 94a5b02886e9aa155d06f675ac7fe6405bf16627 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 3 Jun 2014 09:55:48 +0100 Subject: [PATCH] raco test: continue when checking for submodules fails --- .../compiler-lib/compiler/commands/test.rkt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/compiler-pkgs/compiler-lib/compiler/commands/test.rkt b/pkgs/compiler-pkgs/compiler-lib/compiler/commands/test.rkt index 3e2ef53751..9c4a04bd6a 100644 --- a/pkgs/compiler-pkgs/compiler-lib/compiler/commands/test.rkt +++ b/pkgs/compiler-pkgs/compiler-lib/compiler/commands/test.rkt @@ -572,9 +572,19 @@ (cond [(and did-one? first-avail?) #f] - [(module-declared? mod #t) - (set! did-one? #t) - (test-this-module mod #t)] + [(with-handlers ([exn:fail? + (lambda (exn) + ;; If there's an error, then try running + ;; this submodule to let the error show. + ;; Log a warning, just in case. + (log-warning "submodule load failed: ~s" + (exn-message exn)) + 'error)]) + (and (module-declared? mod #t) + 'ok)) + => (lambda (mode) + (set! did-one? #t) + (test-this-module mod (eq? mode 'ok)))] [else (set! something-wasnt-declared? #t) #f]))