
The "props" file still has * ".rkt" `drdr:timeout` entries, needed until DrDr uses submodules and "info.rkt" files; although timeout information has been put in submodules for `raco test`, DrDr uses `raco test` in a way that does not enable timeouts, so that DrDr can implement timeouts itself (and record when a test times out) * ".rkt" `drdr:random #t` entries; not sure what to do with these, yet * ".rkt" `responsible` entries; not sure what to do with these, yet * ".rktl" `drdr:command-line #f` entries, needed until all ".rktl" files are disabled in DrDr The following files were previously disabled for DrDr testing, but were intentionally left as enabled with these changes: pkgs/racket-pkgs/racket-test/tests/pkg/shelly.rkt pkgs/racket-pkgs/racket-test/tests/pkg/util.rkt pkgs/racket-pkgs/racket-test/tests/pkg/info.rkt pkgs/racket-pkgs/racket-test/tests/pkg/basic-index.rkt pkgs/racket-pkgs/racket-test/tests/racket/link.rkt pkgs/racket-pkgs/racket-test/tests/racket/embed-in-c.rkt pkgs/racket-pkgs/racket-doc/ffi/examples/use-c-printf.rkt pkgs/racket-pkgs/racket-doc/ffi/examples/c-printf.rkt pkgs/parser-tools-pkgs/parser-tools-lib/parser-tools/private-lex/error-tests.rkt pkgs/mysterx/mysterx.rkt pkgs/mysterx/main.rkt pkgs/games/gobblet/test-model.rkt pkgs/games/gobblet/test-explore.rkt pkgs/games/gobblet/robot.rkt pkgs/games/gobblet/check.rkt pkgs/db-pkgs/db-lib/db/private/odbc/main.rkt pkgs/db-pkgs/db-lib/db/private/odbc/ffi.rkt pkgs/db-pkgs/db-lib/db/private/odbc/dbsystem.rkt pkgs/db-pkgs/db-lib/db/private/odbc/connection.rkt pkgs/distributed-places-pkgs/distributed-places-lib/racket/place/distributed/examples/hello-world.rkt pkgs/redex-pkgs/redex-lib/redex/private/compiler/match.rkt pkgs/redex-pkgs/redex-lib/redex/private/compiler/match.rkt pkgs/htdp-pkgs/htdp-test/2htdp/utest/balls.rkt pkgs/gui-pkgs/gui-test/framework/tests/test-suite-utils.rkt pkgs/games/paint-by-numbers/raw-problems/size-calculation.rkt pkgs/db-pkgs/db-lib/db/odbc.rkt pkgs/compatibility-pkgs/compatibility-lib/mzlib/traceld.rkt pkgs/cext-lib/dynext/private/stdio.rkt pkgs/db-pkgs/db-lib/db/odbc.rkt racket/collects/ffi/unsafe/objc.rkt racket/collects/ffi/objc.rkt pkgs/racket-pkgs/racket-test/tests/pkg/tests-db.rkt pkgs/racket-pkgs/racket-test/tests/pkg/test-docs.rkt pkgs/racket-pkgs/racket-test/tests/pkg/test-catalogs-api.rkt pkgs/gui-pkg-manager-pkgs/gui-pkg-manager-lib/pkg/gui/main.rkt pkgs/redex-pkgs/redex-lib/redex/private/compiler/redextomatrix.rkt pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/base-special-env.rkt pkgs/planet-pkgs/planet-test/tests/planet/version.rkt pkgs/planet-pkgs/planet-test/tests/planet/test-docs-complete.rkt pkgs/planet-pkgs/planet-test/tests/planet/lang.rkt pkgs/planet-pkgs/planet-test/tests/planet/docs-build.rkt pkgs/drracket-pkgs/drracket-test/tests/drracket/follow-log.rkt pkgs/drracket-pkgs/drracket/drracket/private/dock-icon.rkt pkgs/drracket-pkgs/drracket-test/tests/drracket/tool-lib-and-sig.rkt
100 lines
3.8 KiB
Racket
100 lines
3.8 KiB
Racket
#lang scheme/base
|
|
(require scheme/cmdline
|
|
raco/command-name
|
|
setup/pack
|
|
setup/getinfo
|
|
compiler/distribute)
|
|
|
|
(define verbose (make-parameter #f))
|
|
|
|
(define collection? (make-parameter #f))
|
|
|
|
(define default-plt-name "archive")
|
|
|
|
(define plt-name (make-parameter default-plt-name))
|
|
(define plt-files-replace (make-parameter #f))
|
|
(define plt-files-plt-relative? (make-parameter #f))
|
|
(define plt-files-plt-home-relative? (make-parameter #f))
|
|
(define plt-force-install-dir? (make-parameter #f))
|
|
(define plt-setup-collections (make-parameter null))
|
|
(define plt-include-compiled (make-parameter #f))
|
|
|
|
(define mzc-symbol (string->symbol (short-program+command-name)))
|
|
|
|
(define-values (plt-output source-files)
|
|
(command-line
|
|
#:program (short-program+command-name)
|
|
#:once-each
|
|
[("--collect") "<path>s specify collections instead of files/dirs"
|
|
(collection? #t)]
|
|
[("--plt-name") name "Set the printed <name> describing the archive"
|
|
(plt-name name)]
|
|
[("--replace") "Files in archive replace existing files when unpacked"
|
|
(plt-files-replace #t)]
|
|
[("--at-plt") "Files/dirs in archive are relative to user's add-ons directory"
|
|
(plt-files-plt-relative? #t)]
|
|
#:once-any
|
|
[("--all-users") "Files/dirs in archive go to PLT installation if writable"
|
|
(plt-files-plt-home-relative? #t)]
|
|
[("--force-all-users") "Files/dirs forced to PLT installation"
|
|
(plt-files-plt-home-relative? #t) (plt-force-install-dir? #t)]
|
|
#:once-each
|
|
[("--include-compiled") "Include \"compiled\" subdirectories in the archive"
|
|
(plt-include-compiled #t)]
|
|
#:multi
|
|
[("++setup") collect "Setup <collect> after the archive is unpacked"
|
|
(plt-setup-collections (append (plt-setup-collections) (list collect)))]
|
|
#:once-each
|
|
[("-v") "Verbose mode"
|
|
(verbose #t)]
|
|
#:args (dest-file . path)
|
|
(values dest-file path)))
|
|
|
|
(if (not (collection?))
|
|
;; Files and directories
|
|
(begin
|
|
(for ([fd source-files])
|
|
(unless (relative-path? fd)
|
|
(error mzc-symbol
|
|
"file/directory is not relative to the current directory: \"~a\""
|
|
fd)))
|
|
(pack-plt plt-output
|
|
(plt-name)
|
|
source-files
|
|
#:collections (map list (plt-setup-collections))
|
|
#:file-mode (if (plt-files-replace) 'file-replace 'file)
|
|
#:plt-relative? (or (plt-files-plt-relative?)
|
|
(plt-files-plt-home-relative?))
|
|
#:at-plt-home? (plt-files-plt-home-relative?)
|
|
#:test-plt-dirs (if (or (plt-force-install-dir?)
|
|
(not (plt-files-plt-home-relative?)))
|
|
#f
|
|
'("collects" "doc" "include" "lib"))
|
|
#:requires
|
|
null)
|
|
(when (verbose)
|
|
(printf " [output to \"~a\"]\n" plt-output)))
|
|
;; Collection
|
|
(begin
|
|
(pack-collections-plt
|
|
plt-output
|
|
(if (eq? default-plt-name (plt-name)) #f (plt-name))
|
|
(map (lambda (sf)
|
|
(let loop ([sf sf])
|
|
(let ([m (regexp-match "^([^/]*)/(.*)$" sf)])
|
|
(if m (cons (cadr m) (loop (caddr m))) (list sf)))))
|
|
source-files)
|
|
#:replace? (plt-files-replace)
|
|
#:extra-setup-collections (map list (plt-setup-collections))
|
|
#:file-filter (if (plt-include-compiled)
|
|
(lambda (path)
|
|
(or (regexp-match #rx#"compiled$" (path->bytes path))
|
|
(std-filter path)))
|
|
std-filter)
|
|
#:at-plt-home? (plt-files-plt-home-relative?)
|
|
#:test-plt-collects? (not (plt-force-install-dir?)))
|
|
(when (verbose)
|
|
(printf " [output to \"~a\"]\n" plt-output))))
|
|
|
|
(module test racket/base)
|