Just try brute force for packers.rkt instead.

This commit is contained in:
Sam Tobin-Hochstadt 2020-04-01 16:46:47 -04:00
parent 9c92189c82
commit dbaf9a8860

View File

@ -17,7 +17,6 @@
(if (regexp-match? (car p) permissions) (bitwise-ior n (cadr p)) n)))) (if (regexp-match? (car p) permissions) (bitwise-ior n (cadr p)) n))))
(define (diff src dest check-attributes?) (define (diff src dest check-attributes?)
(printf "src: ~s dest: ~s\n" src dest)
(define (compare-attributes p1 p2) (define (compare-attributes p1 p2)
(or (not check-attributes?) (or (not check-attributes?)
(and (or (and (eq? check-attributes? 'file) (and (or (and (eq? check-attributes? 'file)
@ -32,10 +31,11 @@
#f)) #f))
(equal? (file-or-directory-permissions p1) (equal? (file-or-directory-permissions p1)
(file-or-directory-permissions p2))))) (file-or-directory-permissions p2)))))
;; sometimes seconds are off by 2 ;; sometimes seconds are off by 4
(define (fuzzy-= a b) (define (fuzzy-= a b)
(or (= a b) (or (= a b)
(= 2 (abs (- a b))))) (= 2 (abs (- a b)))
(= 4 (abs (- a b)))))
(define (round-date s) (define (round-date s)
(if (eq? check-attributes? 'file) (if (eq? check-attributes? 'file)
;; granularity of ".zip" file dates is 2 seconds(!) ;; granularity of ".zip" file dates is 2 seconds(!)
@ -73,7 +73,6 @@
#:file-name [f2 "f2"] #:file-name [f2 "f2"]
#:links? [links? #f] #:links? [links? #f]
#:filter-path? [filter-path? #f]) #:filter-path? [filter-path? #f])
(printf "running zip-tests: ~s ~s ~s\n" zip unzip timestamps?)
(make-directory* ex1) (make-directory* ex1)
(make-file (build-path ex1 "f1")) (make-file (build-path ex1 "f1"))
(make-file (build-path ex1 f2)) (make-file (build-path ex1 f2))
@ -142,7 +141,8 @@
#:path-filter (lambda (p) #:path-filter (lambda (p)
(define-values (base name dir?) (split-path p)) (define-values (base name dir?) (split-path p))
(not (regexp-match? #rx"skip" name))))) (not (regexp-match? #rx"skip" name)))))
untar #t #:filter-path? #t)) untar #t #:filter-path? #t)
)
(delete-directory/files work-dir) (delete-directory/files work-dir)