From 4af90112d0973477ef45dae8a54aeebf2d954df1 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 16 Apr 2013 08:49:22 -0600 Subject: [PATCH] pkg/lib: lock clean-up, and add `path->pkg' Make the installed-package database lock reentrant, change some functions to take the lock, and fix the documentation on when a lock is expected to be taken outside of functions. original commit: 10e53e3bf4e18d40f97213911b0b9c8bb56fd09f --- collects/compiler/commands/test.rkt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/collects/compiler/commands/test.rkt b/collects/compiler/commands/test.rkt index c42a5eabb4..381498b9ff 100644 --- a/collects/compiler/commands/test.rkt +++ b/collects/compiler/commands/test.rkt @@ -108,13 +108,10 @@ [l (for-each do-test l)])] [packages? - (unless (for*/or ([scope (in-list '(installation user shared))]) - (define pd - (parameterize ([current-pkg-scope scope]) - (with-handlers ([exn:fail? (λ (x) #f)]) - (pkg-directory e)))) - (and pd (do-test pd))) - (error 'test "Package ~e is not installed" e))] + (define pd (pkg-directory e)) + (if pd + (do-test pd) + (error 'test "Package ~e is not installed" e))] [else (do-test e)]))