Renaming files

This commit is contained in:
Jay McCarthy 2010-11-10 09:09:22 -07:00
parent 4a4d929ca8
commit 7a2005811e
35 changed files with 142 additions and 161 deletions

View File

@ -1,7 +1,7 @@
This is the implementation of DrDr.
It currently only runs on a single machine that is set up in an intricate way.
-- In particular, config.ss mentions many of those details
-- In particular, config.rkt mentions many of those details
-- Also, static/data must be a link to a data directory (/opt/plt/data)
It uses a few of my PLaneT packages and some other ones as well.

View File

@ -1,20 +1,20 @@
#lang scheme
(require scheme/file
"diff.ss"
"scm.ss"
"list-count.ss"
"notify.ss"
"cache.ss"
"dirstruct.ss"
"status.ss"
"metadata.ss"
"path-utils.ss"
"rendering.ss")
(provide (all-from-out "rendering.ss"))
"diff.rkt"
"scm.rkt"
"list-count.rkt"
"notify.rkt"
"cache.rkt"
"dirstruct.rkt"
"status.rkt"
"metadata.rkt"
"path-utils.rkt"
"rendering.rkt")
(provide (all-from-out "rendering.rkt"))
; Email
(require net/sendmail
"formats.ss")
"formats.rkt")
(define list@
(match-lambda

View File

@ -1,6 +1,6 @@
#lang scheme
(require "path-utils.ss"
"archive.ss"
(require "path-utils.rkt"
"archive.rkt"
tests/eli-tester)
(define archive
@ -17,7 +17,7 @@
(archive-extract-file archive (build-path (current-directory) "test")) =error> #rx"not in the archive"
(archive-extract-file archive (build-path (current-directory) "static")) =error> #rx"not a file"
(archive-extract-file "archive-test.ss" (build-path (current-directory) "archive-test.ss")) =error> #rx"not a valid archive"
(archive-extract-file "archive-test.rkt" (build-path (current-directory) "archive-test.rkt")) =error> #rx"not a valid archive"
(directory-list->directory-list* (archive-directory-list archive (current-directory)))
=> (directory-list* (current-directory))
@ -27,6 +27,6 @@
(archive-directory-exists? archive (build-path (current-directory) "unknown")) => #f
(archive-directory-exists? archive (build-path (current-directory) "archive-test.ss")) => #f
(archive-directory-exists? archive (build-path (current-directory) "archive-test.rkt")) => #f
)

View File

@ -1,5 +1,5 @@
#lang scheme
(require "path-utils.ss")
(require "path-utils.rkt")
(define (value->bytes v)
(with-output-to-bytes (lambda () (write v))))

View File

@ -1,5 +1,5 @@
#lang scheme
(require "path-utils.ss")
(require "path-utils.rkt")
; (symbols 'always 'cache 'no-cache)
(define cache/file-mode (make-parameter 'cache))
@ -30,8 +30,8 @@
(current-seconds)))
(void))
(require "archive.ss"
"dirstruct.ss")
(require "archive.rkt"
"dirstruct.rkt")
(define (consult-archive pth)
(define rev (path->revision pth))

View File

@ -1,7 +1,7 @@
#lang scheme
(require "path-utils.ss"
"run-collect.ss"
"replay.ss"
(require "path-utils.rkt"
"run-collect.rkt"
"replay.rkt"
scheme/runtime-path
scheme/system)

View File

@ -1,9 +1,9 @@
#lang scheme
(require "cache.ss"
"dirstruct.ss"
"scm.ss"
"monitor-scm.ss")
(require "cache.rkt"
"dirstruct.rkt"
"scm.rkt"
"monitor-scm.rkt")
(plt-directory "/opt/plt")
(drdr-directory "/opt/svn/drdr")

View File

@ -1,5 +1,5 @@
#lang scheme
(require "status.ss")
(require "status.rkt")
(define (timing? bs)
(regexp-match #px#"cpu time: \\d+ real time: \\d+ gc time: \\d+" bs))

View File

@ -1,12 +1,12 @@
#lang scheme
(require scheme/system
"dirstruct.ss"
"status.ss"
(except-in "diff.ss"
"dirstruct.rkt"
"status.rkt"
(except-in "diff.rkt"
log-different?)
"path-utils.ss"
"cache.ss"
"config.ss")
"path-utils.rkt"
"cache.rkt"
"config.rkt")
(define event-print
(match-lambda

View File

@ -1,5 +1,5 @@
#lang scheme
(require "path-utils.ss")
(require "path-utils.rkt")
(define number-of-cpus
(make-parameter 1))

View File

@ -2,7 +2,7 @@
export PLTSTDERR="info"
PLTROOT="/opt/plt/plt"
LOGS="/opt/plt/logs"
MZ="$PLTROOT/bin/mzscheme"
MZ="$PLTROOT/bin/racket"
DRDR="/opt/svn/drdr"
cd "$DRDR"
@ -19,9 +19,9 @@ kill_all() {
run_loop () { # <basename> <kill?>
while true; do
echo "$1: compiling"
"$PLTROOT/bin/mzc" -k "$1.ss"
"$PLTROOT/bin/raco" make -k "$1.rkt"
echo "$1: running"
"$MZ" -t "$1.ss" 2>&1 >> "$LOGS/$1.log" &
"$MZ" -t "$1.rkt" 2>&1 >> "$LOGS/$1.log" &
echo "$!" > "$LOGS/$1.pid"
wait "$!"
echo "$1: died"

View File

@ -1,8 +1,8 @@
#lang scheme
(require scheme/system
"config.ss"
"path-utils.ss"
"dirstruct.ss")
"config.rkt"
"path-utils.rkt"
"dirstruct.rkt")
(define rebaser
(rebase-path (plt-data-directory) "/data"))
@ -14,7 +14,7 @@
(path->string
(build-path (plt-directory) "plt" "bin" "mred-text"))
"-t"
(path->string (build-path (drdr-directory) "graphs" "build-graph.ss"))
(path->string (build-path (drdr-directory) "graphs" "build-graph.rkt"))
"--"
"-l" (string-append "http://drdr.racket-lang.org/~a/" (path->string* filename)) ; XXX
"--image-loc" "/graph-images/"

View File

@ -1,13 +1,13 @@
- build the global .png files with a recent svn build:
mred-text mk-img.ss
mred-text mk-img.rkt
This will dump some png files in the current directory. Put them in
some global place on the server
- to build a script for a particular page, do this:
mred-text build-graph.ss -l http://drdr.racket-lang.org/~a/collects/path/to/file.scm \
mred-text build-graph.rkt -l http://drdr.racket-lang.org/~a/collects/path/to/file.scm \
--image-loc /static/data/graph-images/ \
file_scm.timing \
file_scm_png_file_prefix \
@ -16,7 +16,7 @@
The -l flag is optional, without it clicking on the images won't go
anywhere; with it, clicking will go to the corresponding revision.
The --image-loc flag gives a url path to the directory containing
the images from the mk-img.ss setp. The other three args are the
the images from the mk-img.rkt setp. The other three args are the
timing data file, a prefix for the png files that generated for the
graphs, and the output html (which is a <div> ... </div>).

View File

@ -1,7 +1,7 @@
#lang scheme/gui
(require xml)
(require "constants.ss")
(require "constants.rkt")
;; example data:
;; http://drdr.racket-lang.org/data/collects/tests/mzscheme/benchmarks/common/earley_ss.timing
@ -62,7 +62,7 @@
url-path
"specify the path to the image files for html generation (not just to the dir; to the file itself)"
(unless (regexp-match #rx"/$" url-path)
(error 'build-graph.ss "expected the image-loc to end with a /, got ~a" url-path))
(error 'build-graph.rkt "expected the image-loc to end with a /, got ~a" url-path))
(set! image-loc url-path)]
#:args (input-file image-filename-prefix image-url-prefix html-file)
(values input-file image-filename-prefix image-url-prefix html-file)))
@ -113,7 +113,7 @@
",")
(list "]")))))
;; this build ex2.ss out of ex.ss
;; this build ex2.rkt out of ex.rkt
;; adjust : raw-line -> raw-line
(define adjust
(let ([seen-time #f])

View File

@ -1,7 +1,7 @@
#lang scheme/gui
(require 2htdp/image
"constants.ss")
"constants.rkt")
;; make dot.png
(let* ([bm (make-object bitmap% 1 1)]
@ -26,7 +26,7 @@
[bdc (make-object bitmap-dc% bm)])
(unless (= w before-and-after-image-width)
(error 'mk-img.ss "expected ~a image's width to be ~a, got ~a"
(error 'mk-img.rkt "expected ~a image's width to be ~a, got ~a"
filename
before-and-after-image-width
w))

View File

@ -1,19 +1,19 @@
#lang racket
(require racket/runtime-path
racket/date
"list-count.ss"
"scm.ss"
"formats.ss"
"cache.ss"
"metadata.ss"
"analyze.ss"
"rendering.ss"
"plt-build.ss"
"status.ss"
"replay.ss"
"notify.ss"
"path-utils.ss"
"dirstruct.ss")
"list-count.rkt"
"scm.rkt"
"formats.rkt"
"cache.rkt"
"metadata.rkt"
"analyze.rkt"
"rendering.rkt"
"plt-build.rkt"
"status.rkt"
"replay.rkt"
"notify.rkt"
"path-utils.rkt"
"dirstruct.rkt")
(build? #f)

View File

@ -1,19 +0,0 @@
#!/bin/bash
export PLTSTDERR=info
PLTROOT=/opt/plt/plt
LOGS=/opt/plt/logs
MZ=${PLTROOT}/bin/mzscheme
DRDR=/opt/svn/drdr
cd ${DRDR}
while true ; do
${PLTROOT}/bin/mzc -k render.ss
nohup ${MZ} -t render.ss 2>&1 >> ${LOGS}/render.log
done &
while true ; do
${PLTROOT}/bin/mzc -k main.ss
nohup ${MZ} -t main.ss 2>&1 >> ${LOGS}/drdr.log
killall -9 Xvfb mzscheme mred-text
done &

View File

@ -1,16 +1,16 @@
#lang scheme
(require scheme/system
"dirstruct.ss"
"analyze.ss"
"monitor-scm.ss"
"notify.ss"
"retry.ss"
"config.ss"
"plt-build.ss"
"scm.ss"
"cache.ss"
"path-utils.ss")
"dirstruct.rkt"
"analyze.rkt"
"monitor-scm.rkt"
"notify.rkt"
"retry.rkt"
"config.rkt"
"plt-build.rkt"
"scm.rkt"
"cache.rkt"
"path-utils.rkt")
(init-revisions!)
(define cur-rev (newest-revision))
@ -37,7 +37,7 @@
(path->string
(build-path (plt-directory) "plt" "bin" "mzscheme"))
"-t"
(path->string (build-path (drdr-directory) "time.ss"))
(path->string (build-path (drdr-directory) "time.rkt"))
"--"
"-r" (number->string cur-rev))))
@ -49,7 +49,7 @@
(path->string
(build-path (plt-directory) "plt" "bin" "mzscheme"))
"-t"
(path->string (build-path (drdr-directory) "make-archive.ss"))
(path->string (build-path (drdr-directory) "make-archive.rkt"))
"--"
"--many" (number->string 100))))))

View File

@ -1,9 +1,9 @@
#lang scheme
(require scheme/system
"config.ss"
"archive.ss"
"path-utils.ss"
"dirstruct.ss")
"config.rkt"
"archive.rkt"
"path-utils.rkt"
"dirstruct.rkt")
(define (archive-directory pth)
(define tmp (path-add-suffix pth #".bak"))

View File

@ -1,7 +1,7 @@
#lang scheme
(require "path-utils.ss"
"dirstruct.ss"
"scm.ss")
(require "path-utils.rkt"
"dirstruct.rkt"
"scm.rkt")
(define PROP:command-line "drdr:command-line")
(define PROP:timeout "drdr:timeout")
@ -60,7 +60,7 @@
(define props:get-prop
(hash-ref! props-cache rev
(lambda ()
(define tmp-file (make-temporary-file "props~a.ss" #f (current-temporary-directory)))
(define tmp-file (make-temporary-file "props~a.rkt" #f (current-temporary-directory)))
(and
; Checkout the props file
(scm-export-file

View File

@ -2,7 +2,7 @@
(require xml
net/url
tests/web-server/util
"scm.ss")
"scm.rkt")
(define drdr-url
(string->url "http://drdr.racket-lang.org"))

View File

@ -1,6 +1,6 @@
#lang scheme
(require "scm.ss"
"retry.ss")
(require "scm.rkt"
"retry.rkt")
(define current-monitoring-interval-seconds
(make-parameter 60))

View File

@ -2,15 +2,15 @@
(require scheme/file
scheme/runtime-path
(planet jaymccarthy/job-queue)
"metadata.ss"
"run-collect.ss"
"cache.ss"
"dirstruct.ss"
"replay.ss"
"notify.ss"
"path-utils.ss"
"sema.ss"
"scm.ss")
"metadata.rkt"
"run-collect.rkt"
"cache.rkt"
"dirstruct.rkt"
"replay.rkt"
"notify.rkt"
"path-utils.rkt"
"sema.rkt"
"scm.rkt")
(define current-env (make-parameter (make-immutable-hash empty)))
(define-syntax-rule (with-env ([env-expr val-expr] ...) expr ...)
@ -240,9 +240,9 @@
(run/collect/wait/log
#:timeout (current-subprocess-timeout-seconds)
#:env (current-env)
(build-path log-dir "src" "build" "set-browser.ss")
(build-path log-dir "src" "build" "set-browser.rkt")
racket-path
(list "-t" (path->string* (build-path (drdr-directory) "set-browser.ss"))))
(list "-t" (path->string* (build-path (drdr-directory) "set-browser.rkt"))))
; And go
(notify! "Starting testing")
(test-directory collects-pth top-sema)

View File

@ -2,20 +2,20 @@
(require scheme/date
scheme/runtime-path
xml
"config.ss"
"diff.ss"
"list-count.ss"
"cache.ss"
(except-in "dirstruct.ss"
"config.rkt"
"diff.rkt"
"list-count.rkt"
"cache.rkt"
(except-in "dirstruct.rkt"
revision-trunk-dir)
"status.ss"
"monitor-scm.ss"
(only-in "metadata.ss"
"status.rkt"
"monitor-scm.rkt"
(only-in "metadata.rkt"
PROP:command-line
PROP:timeout)
"formats.ss"
"path-utils.ss"
"analyze.ss")
"formats.rkt"
"path-utils.rkt"
"analyze.rkt")
(define (base-path pth)
(define rev (current-rev))
@ -575,7 +575,7 @@
(require web-server/servlet-env
web-server/http
web-server/dispatch
"scm.ss")
"scm.rkt")
(define how-many-revs 45)
(define (show-revisions req)
(define builds-pth (plt-build-directory))

View File

@ -1,5 +1,5 @@
#lang scheme
(require "list-count.ss")
(require "list-count.rkt")
(define-struct rendering (start end duration timeout? unclean-exit? stderr? responsible changed?) #:prefab)

View File

@ -1,7 +1,7 @@
#lang scheme
(require "replay.ss"
"cache.ss"
"status.ss")
(require "replay.rkt"
"cache.rkt"
"status.rkt")
; XXX Rewrite to work with logs in dbm

View File

@ -1,7 +1,7 @@
#lang scheme
(require (prefix-in scheme: scheme)
"formats.ss"
"status.ss")
"formats.rkt"
"status.rkt")
(define replay-event
(match-lambda

View File

@ -1,5 +1,5 @@
#lang scheme
(require "notify.ss")
(require "notify.rkt")
(define-syntax-rule (retry-until-success msg expr ...)
(retry-until-success* msg (lambda () expr ...)))

View File

@ -1,5 +1,5 @@
#lang scheme
(require "status.ss")
(require "status.rkt")
(define (rewrite-status #:rewrite rewrite-string s)
(match s

View File

@ -1,9 +1,9 @@
#lang scheme
(require "status.ss"
"notify.ss"
"rewriting.ss"
"dirstruct.ss"
"cache.ss")
(require "status.rkt"
"notify.rkt"
"rewriting.rkt"
"dirstruct.rkt"
"cache.rkt")
(define (command+args+env->command+args
#:env env

View File

@ -1,11 +1,11 @@
#lang scheme
(require "svn.ss"
"path-utils.ss"
"dirstruct.ss"
(require "svn.rkt"
"path-utils.rkt"
"dirstruct.rkt"
net/url
scheme/system)
(provide
(all-from-out "svn.ss"))
(all-from-out "svn.rkt"))
(define git-path (make-parameter "/opt/local/bin/git"))
(provide/contract

View File

@ -1,6 +1,6 @@
#lang racket
(require "../run-collect.ss"
"../status.ss"
(require "../run-collect.rkt"
"../status.rkt"
racket/runtime-path
tests/eli-tester)

View File

@ -1,9 +1,9 @@
#lang scheme
(require "config.ss"
"dirstruct.ss"
"cache.ss"
"path-utils.ss"
"status.ss")
(require "config.rkt"
"dirstruct.rkt"
"cache.rkt"
"path-utils.rkt"
"status.rkt")
(define revision #f)

View File

@ -1,12 +1,12 @@
#lang scheme
(require (planet jaymccarthy/job-queue)
scheme/system
(prefix-in graph-one: "graph.ss")
"config.ss"
"notify.ss"
"dirstruct.ss"
"sema.ss"
"cache.ss")
(prefix-in graph-one: "graph.rkt")
"config.rkt"
"notify.rkt"
"dirstruct.rkt"
"sema.rkt"
"cache.rkt")
(define test-workers (make-job-queue (number-of-cpus)))
@ -41,7 +41,7 @@
(path->string
(build-path (plt-directory) "plt" "bin" "mzscheme"))
"-t"
(path->string (build-path (drdr-directory) "time-file.ss"))
(path->string (build-path (drdr-directory) "time-file.rkt"))
"--"
(append
(if history?

View File

@ -1,6 +1,6 @@
#lang scheme
(require (planet jaymccarthy/dbm)
"wrap-dict.ss")
"wrap-dict.rkt")
(define (read-string s)
(with-input-from-string s read))