From 1d6c943114ea15e8a12fe1aaf3df603d57f5bd08 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Wed, 12 May 2010 14:04:05 -0600 Subject: [PATCH] Adding drdr:random? --- collects/meta/drdr/analyze.ss | 5 ++++- collects/meta/drdr/metadata.ss | 6 ++++++ collects/meta/props | 18 ++++++++++++++---- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/collects/meta/drdr/analyze.ss b/collects/meta/drdr/analyze.ss index f29cf3ba6c..766cd993b0 100644 --- a/collects/meta/drdr/analyze.ss +++ b/collects/meta/drdr/analyze.ss @@ -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" diff --git a/collects/meta/drdr/metadata.ss b/collects/meta/drdr/metadata.ss index 2f9d2de4a8..498e6fa99a 100644 --- a/collects/meta/drdr/metadata.ss +++ b/collects/meta/drdr/metadata.ss @@ -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 diff --git a/collects/meta/props b/collects/meta/props index 5f8f0581b6..0744bbec58 100755 --- a/collects/meta/props +++ b/collects/meta/props @@ -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"