Adding --deps
This commit is contained in:
parent
62b17db270
commit
5662ed8e99
|
@ -972,6 +972,21 @@
|
||||||
s))
|
s))
|
||||||
n)
|
n)
|
||||||
|
|
||||||
|
(define check-pkg-deps? #f)
|
||||||
|
(define (maybe-expand-package-deps l)
|
||||||
|
(cond
|
||||||
|
[(and packages? check-pkg-deps?)
|
||||||
|
(hash-keys
|
||||||
|
(for/fold ([h (hash)]) ([p (in-list l)])
|
||||||
|
(define-values (sum _ deps)
|
||||||
|
(get-pkg-content (pkg-desc p 'name p #f #f)
|
||||||
|
#:extract-info extract-pkg-dependencies
|
||||||
|
#:use-cache? #t))
|
||||||
|
(for/fold ([h h]) ([d (in-list (cons p deps))])
|
||||||
|
(hash-set h d #t))))]
|
||||||
|
[else
|
||||||
|
l]))
|
||||||
|
|
||||||
(command-line
|
(command-line
|
||||||
#:program (short-program+command-name)
|
#:program (short-program+command-name)
|
||||||
#:once-any
|
#:once-any
|
||||||
|
@ -1059,6 +1074,9 @@
|
||||||
[("--check-stderr" "-e")
|
[("--check-stderr" "-e")
|
||||||
"Treat stderr output as a test failure"
|
"Treat stderr output as a test failure"
|
||||||
(set! check-stderr? #t)]
|
(set! check-stderr? #t)]
|
||||||
|
[("--deps")
|
||||||
|
"If treating arguments as packages, also test dependencies"
|
||||||
|
(set! check-pkg-deps? #t)]
|
||||||
#:multi
|
#:multi
|
||||||
[("++ignore-stderr") pattern
|
[("++ignore-stderr") pattern
|
||||||
"Ignore stderr output that matches #px\"<pattern>\""
|
"Ignore stderr output that matches #px\"<pattern>\""
|
||||||
|
@ -1074,8 +1092,11 @@
|
||||||
[("--table" "-t")
|
[("--table" "-t")
|
||||||
"Print a summary table"
|
"Print a summary table"
|
||||||
(set! table? #t)]
|
(set! table? #t)]
|
||||||
#:args file-or-directory
|
#:args file-or-directory-or-collects-or-pkgs
|
||||||
(begin (unless (= 1 (length file-or-directory))
|
(let ()
|
||||||
|
(define file-or-directory
|
||||||
|
(maybe-expand-package-deps file-or-directory-or-collects-or-pkgs))
|
||||||
|
(unless (= 1 (length file-or-directory))
|
||||||
(set! single-file? #f))
|
(set! single-file? #f))
|
||||||
(when (and (eq? configure-runtime 'default)
|
(when (and (eq? configure-runtime 'default)
|
||||||
(or (and (not single-file?)
|
(or (and (not single-file?)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user