move planet test specifications into the test files and out of info.rkt
and also minor rackety
This commit is contained in:
parent
856bf24d1c
commit
d7970d37ce
|
@ -14,11 +14,4 @@
|
||||||
"scribble-lib"))
|
"scribble-lib"))
|
||||||
|
|
||||||
(define test-omit-paths
|
(define test-omit-paths
|
||||||
'("tests/planet/cmdline-tool.rkt"
|
'("tests/planet/examples"))
|
||||||
"tests/planet/docs-build.rkt"
|
|
||||||
"tests/planet/lang.rkt"
|
|
||||||
"tests/planet/submod.rkt"
|
|
||||||
"tests/planet/test-docs-complete.rkt"
|
|
||||||
"tests/planet/thread-safe-resolver.rkt"
|
|
||||||
"tests/planet/version.rkt"
|
|
||||||
"tests/planet/examples"))
|
|
||||||
|
|
|
@ -7,6 +7,10 @@ using 'system' to call out to the tool and then reading its results, etc.
|
||||||
|
|
||||||
|#
|
|#
|
||||||
|
|
||||||
|
;; do nothing via 'raco test' because run-all.rkt runs this test
|
||||||
|
;; and that way we can guarantee they run sequentially in drdr
|
||||||
|
(module test racket/base)
|
||||||
|
|
||||||
(require racket/system
|
(require racket/system
|
||||||
planet/config
|
planet/config
|
||||||
net/url)
|
net/url)
|
||||||
|
|
|
@ -4,6 +4,11 @@
|
||||||
racket/port
|
racket/port
|
||||||
planet/util)
|
planet/util)
|
||||||
|
|
||||||
|
;; do nothing via 'raco test' because run-all.rkt runs this test
|
||||||
|
;; and that way we can guarantee they run sequentially in drdr
|
||||||
|
(module test racket/base)
|
||||||
|
|
||||||
|
|
||||||
(define files
|
(define files
|
||||||
'(("info.rkt"
|
'(("info.rkt"
|
||||||
#<<--
|
#<<--
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
#lang scheme/base
|
#lang scheme/base
|
||||||
|
|
||||||
(require planet/util
|
(require planet/util
|
||||||
scheme/runtime-path
|
scheme/runtime-path
|
||||||
tests/eli-tester)
|
tests/eli-tester)
|
||||||
|
|
||||||
|
;; do nothing via 'raco test' because run-all.rkt runs this test
|
||||||
|
;; and that way we can guarantee they run sequentially in drdr
|
||||||
|
(module test racket/base)
|
||||||
|
|
||||||
(define-runtime-path here ".")
|
(define-runtime-path here ".")
|
||||||
(define (in-here path) (path->string (build-path here path)))
|
(define (in-here path) (path->string (build-path here path)))
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang racket
|
#lang racket/base
|
||||||
|
|
||||||
#|
|
#|
|
||||||
|
|
||||||
|
@ -8,28 +8,32 @@ in parallel
|
||||||
|
|
||||||
|#
|
|#
|
||||||
|
|
||||||
(require racket/runtime-path)
|
(module test racket/base
|
||||||
(define-runtime-path me "run-all.rkt")
|
(require racket/path)
|
||||||
|
(module config info
|
||||||
(define ran-tests '())
|
(define timeout 500))
|
||||||
|
|
||||||
(dynamic-wind
|
(require racket/runtime-path)
|
||||||
void
|
(define-runtime-path me "run-all.rkt")
|
||||||
(λ ()
|
|
||||||
(for ([test (in-list (sort (directory-list (path-only me))
|
(define ran-tests '())
|
||||||
string<=?
|
|
||||||
#:key (λ (x) (format "~s" x))))])
|
(dynamic-wind
|
||||||
(when (file-exists? (build-path (path-only me) test))
|
void
|
||||||
(when (regexp-match #rx"rkt$" (path->string test))
|
(λ ()
|
||||||
(unless (equal? (file-name-from-path me)
|
(for ([test (in-list (sort (directory-list (path-only me))
|
||||||
test)
|
string<=?
|
||||||
(flush-output)
|
#:key (λ (x) (format "~s" x))))])
|
||||||
(printf "============================================================\nrunning ~a\n"
|
(when (file-exists? (build-path (path-only me) test))
|
||||||
test)
|
(when (regexp-match #rx"rkt$" (path->string test))
|
||||||
(dynamic-require (build-path (path-only me) test) #f)
|
(unless (equal? (file-name-from-path me)
|
||||||
(printf "finished ~a\n\n"
|
test)
|
||||||
test)
|
(flush-output)
|
||||||
(set! ran-tests (cons test ran-tests)))))))
|
(printf "============================================================\nrunning ~a\n"
|
||||||
(λ ()
|
test)
|
||||||
(printf "\nran: ~a\n" ran-tests)))
|
(dynamic-require (build-path (path-only me) test) #f)
|
||||||
|
(printf "finished ~a\n\n"
|
||||||
|
test)
|
||||||
|
(set! ran-tests (cons test ran-tests)))))))
|
||||||
|
(λ ()
|
||||||
|
(printf "\nran: ~a\n" ran-tests))))
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
#lang racket
|
#lang racket
|
||||||
(require setup/dirs)
|
(require setup/dirs)
|
||||||
|
|
||||||
|
;; do nothing via 'raco test' because run-all.rkt runs this test
|
||||||
|
;; and that way we can guarantee they run sequentially in drdr
|
||||||
(module test racket/base)
|
(module test racket/base)
|
||||||
|
|
||||||
|
|
||||||
(define raco (build-path (find-console-bin-dir)
|
(define raco (build-path (find-console-bin-dir)
|
||||||
(if (eq? 'windows (system-type))
|
(if (eq? 'windows (system-type))
|
||||||
"raco.exe"
|
"raco.exe"
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
rackunit
|
rackunit
|
||||||
racket/port)
|
racket/port)
|
||||||
|
|
||||||
|
;; do nothing via 'raco test' because run-all.rkt runs this test
|
||||||
|
;; and that way we can guarantee they run sequentially in drdr
|
||||||
|
(module test racket/base)
|
||||||
|
|
||||||
(define debug? #t)
|
(define debug? #t)
|
||||||
|
|
||||||
(define (install-one package-spec key)
|
(define (install-one package-spec key)
|
||||||
|
@ -73,7 +77,8 @@
|
||||||
(λ (return)
|
(λ (return)
|
||||||
(channel-put return num))))))))
|
(channel-put return num))))))))
|
||||||
|
|
||||||
(let ([package-spec '(planet "test-connection-mzscheme.scm" ("planet" "test-connection.plt" 1 (= 0)))])
|
(let ([package-spec '(planet "test-connection-mzscheme.scm"
|
||||||
|
("planet" "test-connection.plt" 1 (= 0)))])
|
||||||
(printf "installing for the first time\n")
|
(printf "installing for the first time\n")
|
||||||
(install-one package-spec 'seq1)
|
(install-one package-spec 'seq1)
|
||||||
(define test-connection-dir (find-test-connection-dir package-spec))
|
(define test-connection-dir (find-test-connection-dir package-spec))
|
||||||
|
@ -106,6 +111,3 @@
|
||||||
(check-equal? (get-docs-build-count)
|
(check-equal? (get-docs-build-count)
|
||||||
6))
|
6))
|
||||||
|
|
||||||
(module+ test
|
|
||||||
(module config info
|
|
||||||
(define timeout 1000)))
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user