Split the core racket tests into the "racket-test-core" pkg.

This supports running the core tests on systems which can't run
or don't want to install all the dependencies of the "racket-test"
package.

The "racket-test-core" pkg stil depends on "sandbox-lib" because
the sandbox tests live with the core tests. Hopefully I'll be able
to fix that eventually.
This commit is contained in:
Sam Tobin-Hochstadt 2014-12-14 09:03:15 -05:00
parent 01ba2500ec
commit 448213e9dc
110 changed files with 69 additions and 11 deletions

View File

@ -0,0 +1,11 @@
racket-test
Copyright (c) 2010-2014 PLT Design Inc.
This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link this package into proprietary
applications, provided you follow the rules stated in the LGPL. You
can also modify this package; if you distribute a modified version,
you must distribute it under the terms of the LGPL, which in
particular means that you must release the source code for the
modified software. See http://www.gnu.org/copyleft/lesser.html
for more information.

View File

@ -0,0 +1,11 @@
#lang info
(define collection 'multi)
;; Do not add new dependencies to this package.
;; Tests that need dependencies belong in the "racket-test" or the
;; "racket-test-extra" packages.
(define deps '("base" "sandbox-lib"))
(define pkg-desc "Minimal core version of Racket test suites")
(define pkg-authors '(eli jay matthias mflatt robby ryanc samth))

View File

@ -0,0 +1,29 @@
#lang racket/base
(require racket/tcp
racket/list
racket/match
racket/port
racket/contract)
(define (tcp-localhost-available?)
(with-handlers
([exn? (λ (x) #f)])
(define the-listener
(tcp-listen 0 5 #t))
(define-values (local-host port end-host end-port)
(tcp-addresses the-listener #t))
(thread
(λ ()
(tcp-accept the-listener)
(tcp-close the-listener)))
(tcp-connect "localhost" port)
#t))
(provide
(contract-out
[tcp-localhost-available? (-> boolean?)]))
(module+ main
(tcp-localhost-available?))
(module+ test (require (submod ".." main))) ; for raco test & drdr

View File

@ -101,9 +101,9 @@
(with-continuation-mark 'key 10 (extract-current-continuation-marks 'key))
(extract-current-continuation-marks 'key)))))
(require (lib "mzlib/unit200.rkt"))
(require (prefix-in unit: scheme/unit))
;; Hide keywords from scheme/unit.rkt:
;; ;; Hide keywords from scheme/unit.rkt:
(define import #f)
(define export #f)
(define link #f)
@ -111,10 +111,10 @@
(wcm-test '(11)
(lambda ()
(with-continuation-mark 'x 10
(invoke-unit
(unit
(import)
(export)
(unit:invoke-unit
(unit:unit
(unit:import)
(unit:export)
(with-continuation-mark 'x 11
(continuation-mark-set->list
@ -124,10 +124,10 @@
(wcm-test '(11 10)
(lambda ()
(with-continuation-mark 'x 10
(invoke-unit
(unit
(import)
(export)
(unit:invoke-unit
(unit:unit
(unit:import)
(unit:export)
(define l (with-continuation-mark 'x 11
(continuation-mark-set->list

View File

@ -536,6 +536,10 @@
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Check that various shaodwings are allowed:
(module third-provide racket/base
(provide third)
(define third (lambda (x) (car (cdr (cdr x))))))
(module subm-example-20 racket/base
(require (only-in racket/list third))
(provide first get-first second)
@ -554,7 +558,7 @@
(provide second s))
(module* third #f
(require (only-in mzlib/list third)) ; different binding than from `racket/list'
(require (only-in 'third-provide third)) ; different binding than from `racket/list'
(define t third)
(provide third t)))

Some files were not shown because too many files have changed in this diff Show More