From 7b9bf6285f0cf3cba8755c89c17df89f4ae00b25 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Wed, 20 May 2020 16:07:47 -0400 Subject: [PATCH] More verbose error output for deterministic-zo test. --- pkgs/racket-test/tests/racket/deterministic-zo.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/racket-test/tests/racket/deterministic-zo.rkt b/pkgs/racket-test/tests/racket/deterministic-zo.rkt index 0b588bf910..3a8fabf132 100644 --- a/pkgs/racket-test/tests/racket/deterministic-zo.rkt +++ b/pkgs/racket-test/tests/racket/deterministic-zo.rkt @@ -34,14 +34,14 @@ (unless (equal? c1 c2) (call-with-output-file* "/tmp/c1" #:exists 'truncate (lambda (o) (write-bytes c1 o))) (call-with-output-file* "/tmp/c2" #:exists 'truncate (lambda (o) (write-bytes c2 o))) - (error "failed")) + (error 'check-file "failed: ~s ~s ~s ~s" dir collects-dir sub-dir f)) (define zo (get-compilation-bytecode-file (build-path dir f) #:modes (use-compiled-file-paths))) (when (file-exists? zo) (define c3 (file->bytes zo)) (unless (equal? c3 c1) (call-with-output-file* "/tmp/c1" #:exists 'truncate (lambda (o) (write-bytes c1 o))) (call-with-output-file* "/tmp/c2" #:exists 'truncate (lambda (o) (write-bytes c3 o))) - (error "failed relative to built")))) + (error 'check-file "failed relative to built: ~s ~s ~s ~s ~s" dir collects-dir sub-dir f zo)))) (define (check dir [collects-dir dir] [sub-dir 'same] #:limit [limit +inf.0]) (for/fold ([limit limit]) ([f (in-list (directory-list dir))]