From 5e9535b3a59e95e69c640a9f8fcc10635ebe299a Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 21 Feb 2021 12:58:18 -0700 Subject: [PATCH] fix test to work with ".zo" via compiled-file-roots --- pkgs/racket-test-core/tests/racket/cm.rktl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/racket-test-core/tests/racket/cm.rktl b/pkgs/racket-test-core/tests/racket/cm.rktl index 92b0d86ea1..e6c6f7aca9 100644 --- a/pkgs/racket-test-core/tests/racket/cm.rktl +++ b/pkgs/racket-test-core/tests/racket/cm.rktl @@ -190,9 +190,14 @@ ;; ---------------------------------------- ;; test `file-stamp-in-paths' -(test (file-or-directory-modify-seconds (build-path (path-only (collection-file-path "zip.rkt" "file")) - compiled-dir - "zip_rkt.zo")) +(test (file-or-directory-modify-seconds + (let ([dir (path-only (collection-file-path "zip.rkt" "file"))]) + (for/or ([root (in-list (current-compiled-file-roots))]) + (define file (if (relative-path? root) + (build-path dir root compiled-dir "zip_rkt.zo") + (build-path (reroot-path dir root) compiled-dir "zip_rkt.zo"))) + (and (file-exists? file) + file)))) car (file-stamp-in-collection (collection-file-path "zip.rkt" "file")))