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"))
|
||||
|
||||
(define test-omit-paths
|
||||
'("tests/planet/cmdline-tool.rkt"
|
||||
"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"))
|
||||
'("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
|
||||
planet/config
|
||||
net/url)
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
racket/port
|
||||
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
|
||||
'(("info.rkt"
|
||||
#<<--
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
#lang scheme/base
|
||||
|
||||
(require planet/util
|
||||
scheme/runtime-path
|
||||
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 (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)
|
||||
(define-runtime-path me "run-all.rkt")
|
||||
|
||||
(define ran-tests '())
|
||||
|
||||
(dynamic-wind
|
||||
void
|
||||
(λ ()
|
||||
(for ([test (in-list (sort (directory-list (path-only me))
|
||||
string<=?
|
||||
#:key (λ (x) (format "~s" x))))])
|
||||
(when (file-exists? (build-path (path-only me) test))
|
||||
(when (regexp-match #rx"rkt$" (path->string test))
|
||||
(unless (equal? (file-name-from-path me)
|
||||
test)
|
||||
(flush-output)
|
||||
(printf "============================================================\nrunning ~a\n"
|
||||
test)
|
||||
(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)))
|
||||
|
||||
(module test racket/base
|
||||
(require racket/path)
|
||||
(module config info
|
||||
(define timeout 500))
|
||||
|
||||
(require racket/runtime-path)
|
||||
(define-runtime-path me "run-all.rkt")
|
||||
|
||||
(define ran-tests '())
|
||||
|
||||
(dynamic-wind
|
||||
void
|
||||
(λ ()
|
||||
(for ([test (in-list (sort (directory-list (path-only me))
|
||||
string<=?
|
||||
#:key (λ (x) (format "~s" x))))])
|
||||
(when (file-exists? (build-path (path-only me) test))
|
||||
(when (regexp-match #rx"rkt$" (path->string test))
|
||||
(unless (equal? (file-name-from-path me)
|
||||
test)
|
||||
(flush-output)
|
||||
(printf "============================================================\nrunning ~a\n"
|
||||
test)
|
||||
(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
|
||||
(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)
|
||||
|
||||
|
||||
(define raco (build-path (find-console-bin-dir)
|
||||
(if (eq? 'windows (system-type))
|
||||
"raco.exe"
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
rackunit
|
||||
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 (install-one package-spec key)
|
||||
|
@ -73,7 +77,8 @@
|
|||
(λ (return)
|
||||
(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")
|
||||
(install-one package-spec 'seq1)
|
||||
(define test-connection-dir (find-test-connection-dir package-spec))
|
||||
|
@ -106,6 +111,3 @@
|
|||
(check-equal? (get-docs-build-count)
|
||||
6))
|
||||
|
||||
(module+ test
|
||||
(module config info
|
||||
(define timeout 1000)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user