From 80ba30eaaba6fd9c0b96d0194b1c1bbbf44a7ae6 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Tue, 19 Nov 2013 13:22:41 -0700 Subject: [PATCH] Fix PR14175 --- .../compiler-lib/compiler/commands/test.rkt | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pkgs/compiler-pkgs/compiler-lib/compiler/commands/test.rkt b/pkgs/compiler-pkgs/compiler-lib/compiler/commands/test.rkt index b43c38f8f4..036ee9d4a5 100644 --- a/pkgs/compiler-pkgs/compiler-lib/compiler/commands/test.rkt +++ b/pkgs/compiler-pkgs/compiler-lib/compiler/commands/test.rkt @@ -129,6 +129,7 @@ (module paths racket/base (require setup/link + racket/match racket/list) (struct col (name path) #:transparent) @@ -138,10 +139,14 @@ (and version? (regexp-quote (version)))) (append - (for/list ([c+p (in-list (links #:user? user? #:version-regexp version-re #:with-path? #t))]) + (for/list ([c+p + (in-list + (links #:user? user? #:version-regexp version-re #:with-path? #t))]) (col (car c+p) (cdr c+p))) - (for/list ([cp (in-list (links #:root? #t #:user? user? #:version-regexp version-re))] + (for/list ([cp + (in-list + (links #:root? #t #:user? user? #:version-regexp version-re))] #:when (directory-exists? cp) [collection (directory-list cp)] #:when (directory-exists? (build-path cp collection))) @@ -166,9 +171,15 @@ ;; This should be in Racket somewhere and return all the collection ;; paths, rather than just the first as collection-path does. (define (collection-paths c) - (for/list ([col (all-collections)] - #:when (string=? c (col-name col))) - (col-path col))) + (match-define (list-rest sc more) (map path->string (explode-path c))) + (append* + (for/list ([col (all-collections)] + #:when (string=? sc (col-name col))) + (define p (col-path col)) + (define cp (apply build-path p more)) + (if (directory-exists? cp) + (list cp) + empty)))) (provide collection-paths))