diff --git a/pkgs/racket-pkgs/racket-test/tests/pkg/test.rkt b/pkgs/racket-pkgs/racket-test/tests/pkg/test.rkt index bf18c471f4..4a5385cf80 100644 --- a/pkgs/racket-pkgs/racket-test/tests/pkg/test.rkt +++ b/pkgs/racket-pkgs/racket-test/tests/pkg/test.rkt @@ -29,14 +29,6 @@ (shelly-case "All tests" (for-each (λ (x) (x)) l))))) -(let ([v (getenv "PLT_PKG_NOSETUP")]) - (unless (and v (not (string=? v ""))) - (error "Set the PLT_PKG_NOSETUP environment variable before running these tests\n"))) - -(unless (equal? "user\n" (with-output-to-string - (lambda () (pkg-config-command #:installation #t "default-scope")))) - (error "Run this test suite with `user' default package scope")) - (run-tests "name" "basic" "create" "install" "permissions" diff --git a/pkgs/racket-pkgs/racket-test/tests/pkg/util.rkt b/pkgs/racket-pkgs/racket-test/tests/pkg/util.rkt index 994ae537cd..d47d413326 100644 --- a/pkgs/racket-pkgs/racket-test/tests/pkg/util.rkt +++ b/pkgs/racket-pkgs/racket-test/tests/pkg/util.rkt @@ -21,7 +21,7 @@ (and (file-exists? p) p)) -(define (with-fake-installation* t) +(define (with-fake-installation* t #:default-scope [default-scope "installation"]) (define tmp-dir (make-temporary-file ".racket.fake-installation~a" 'directory (find-system-path 'temp-dir))) @@ -41,7 +41,7 @@ "test" 'default-scope - "installation" + default-scope ;; Find existing links and packages from the ;; old configuration: @@ -150,10 +150,15 @@ (run-pkg-tests* run-pkg-tests)))))])) (define (run-pkg-tests* t) + (putenv "PLT_PKG_NOSETUP" "y") (with-servers - (with-fake-root - (parameterize ([current-directory test-directory]) - (t))))) + (with-fake-installation* + #:default-scope "user" + (lambda () + (shelly-case "setup info cache" $ "raco setup -nDKxiI --no-foreign-libs") + (with-fake-root + (parameterize ([current-directory test-directory]) + (t))))))) (define-syntax-rule (shelly-install** message pkg rm-pkg (pre ...) (more ...)) (with-fake-root