Adding drdr:random?

This commit is contained in:
Jay McCarthy 2010-05-12 14:04:05 -06:00
parent 4f17ec419e
commit 1d6c943114
3 changed files with 24 additions and 5 deletions

View File

@ -145,7 +145,10 @@
diff
(for*/or ([(r ht) (in-hash diff)]
[(id ps) (in-hash ht)])
(and (not (empty? ps))
(and (for/or ([p (in-list ps)])
; XXX This squelch should be disabled if the committer changed this file
; XXX But even then it can lead to problems
(not (path-random? (build-path (revision-trunk-dir cur-rev) p))))
(not (symbol=? id 'changes))))))
(unless (andmap zero? nums)
(send-mail-message "drdr@plt-scheme.org"

View File

@ -33,11 +33,17 @@
(define (path-responsible a-path)
(get-prop a-path 'responsible #:as-string? #t))
; XXX Document on help page
; XXX Use in computing "changes?"
(define (path-random? a-path)
(get-prop a-path 'drdr:random?))
(provide/contract
[PROP:command-line string?]
[PROP:timeout string?]
[path-responsible (path-string? . -> . (or/c string? false/c))]
[path-command-line (path-string? . -> . (or/c (listof string?) false/c))]
[path-random? (path-string? . -> . boolean?)]
[path-timeout (path-string? . -> . (or/c exact-nonnegative-integer? false/c))])
;;; Property lookup

View File

@ -484,7 +484,17 @@ path/s is either such a string or a list of them.
(if (regexp-match? #rx"^ *[0-9]+ *$" str)
(string->number str)
(error "expecting an integer")))
number->string)))
number->string)
;; --------------------
(make-prop
'drdr:random?
"is file output random?"
(lambda (str)
(if (regexp-match? #rx"^(yes|no)$" str)
(string=? "yes" str)
(error "expecting yes or no")))
(lambda (b)
(if b "yes" "no")))))
;; read the arguments here, so just requiring this file verifies the data
(read-props)
@ -1335,9 +1345,9 @@ path/s is either such a string or a list of them.
"collects/tests/drracket/language-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600
"collects/tests/drracket/module-lang-test-utils.rkt" drdr:command-line "mred-text -t ~s"
"collects/tests/drracket/module-lang-test.rkt" drdr:command-line "mred ~s" drdr:timeout 120
"collects/tests/drracket/randomly-click-language-dialog.rkt" drdr:command-line "mzc ~s"
"collects/tests/drracket/randomly-click-preferences.rkt" drdr:command-line "mzc ~s"
"collects/tests/drracket/randomly-click.rkt" drdr:command-line ""
"collects/tests/drracket/randomly-click-language-dialog.rkt" drdr:command-line "mzc ~s" drdr:random? #t
"collects/tests/drracket/randomly-click-preferences.rkt" drdr:command-line "mzc ~s" drdr:random? #t
"collects/tests/drracket/randomly-click.rkt" drdr:command-line "" drdr:random? #t
"collects/tests/drracket/repl-test.rkt" drdr:command-line "mred ~s" drdr:timeout 600
"collects/tests/drracket/sample-solutions-one-window.rkt" drdr:command-line "mred-text -t ~s"
"collects/tests/drracket/save-teaching-lang-file.rkt" drdr:command-line "mred ~s"