fix raco exe test

Fix the decision about whether "mzlib" will be found by only
setting the collection path in an executable. The old test
made sense only with the pre-repo-split organization.
This commit is contained in:
Matthew Flatt 2015-02-27 13:27:53 -07:00
parent 515b31ff44
commit b5ab2b66d6

View File

@ -5,7 +5,8 @@
racket/system racket/system
racket/port racket/port
launcher launcher
compiler/distribute) compiler/distribute
(only-in pkg/lib installed-pkg-names))
(define (test expect f/label . args) (define (test expect f/label . args)
(define r (apply (if (procedure? f/label) (define r (apply (if (procedure? f/label)
@ -385,8 +386,7 @@
(path->string (build-path (collection-path "tests" "compiler" "embed") prog))) (path->string (build-path (collection-path "tests" "compiler" "embed") prog)))
(try-exe (mk-dest mred?) "This is 6\n#t\n" mred?) (try-exe (mk-dest mred?) "This is 6\n#t\n" mred?)
;; Or, it's found if we set the collection path and the config path (where the latter ;; Or, it's found if we set the collection path:
;; finds links for packages):
(printf ">>set coll path\n") (printf ">>set coll path\n")
(system* mzc (system* mzc
(if mred? "--gui-exe" "--exe") (if mred? "--gui-exe" "--exe")
@ -428,10 +428,11 @@
(check-collection-path "embed-me6.rkt" "mzlib/etc.rkt" (check-collection-path "embed-me6.rkt" "mzlib/etc.rkt"
;; "mzlib" is found via the "collects" path ;; "mzlib" is found via the "collects" path
;; if it is accessible via the default ;; if it is accessible via the default
;; collection-links configuration: ;; collection-links configuration, which is
(file-exists? (build-path ;; essentially the same as being in installation
(find-collects-dir) ;; scope:
"../share/pkgs/compatibility-lib/mzlib/etc.rkt"))) (member "compatibility-lib"
(installed-pkg-names #:scope 'installation)))
(void))) (void)))