racket/collects/tests/planet2/test.rkt
Matthew Flatt 381d9d84d6 raco pkg: switch from "METADATA.rktd" to "info.rkt"
For now, "METADATA.rktd" is still recognized as a fallback.

Also, rewrite package source type and name inference,
make ".zip" the default format for `raco pkg create',
and many doc edits.
2012-11-30 19:09:19 -07:00

44 lines
1.1 KiB
Racket

#lang racket/base
(require (for-syntax racket/base
"util.rkt")
"shelly.rkt"
"util.rkt")
;; By making these syntax-time includes, it made it so they would be
;; rebuilt and register as real dependencies.
(define-syntax (run-tests stx)
(syntax-case stx ()
[(_ f ...)
(with-syntax
([(tests-f ...)
(for/list ([f-stx (in-list (syntax->list #'(f ...)))])
(define f (syntax->datum f-stx))
`(file ,(path->string (build-path test-directory (format "tests-~a.rkt" f)))))])
(syntax/loc stx
(run-tests*
(list (let ()
(local-require (only-in tests-f run-pkg-tests))
run-pkg-tests)
...))))]))
(define (run-tests* l)
(run-pkg-tests*
(λ ()
(shelly-case "All tests"
(for-each (λ (x) (x)) l)))))
(run-tests
"name"
"basic" "create" "install"
"network" "conflicts" "checksums"
"deps" "update"
"remove"
"locking"
"overwrite"
"config"
"planet"
"update-deps"
"update-auto"
"raco"
"main-server")