Skip to content

Commit 01bff54

Browse files
authored
make the CI happy (#1062)
Potentially some changes to TR would require math to be built again. so we don't need to run any integrated tests that depends on math before `raco setup math`
1 parent 71f9489 commit 01bff54

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ jobs:
3939
env:
4040
PLT_TR_CONTRACTS: 1
4141
- run: racket -l typed-racket-test -- --unit
42-
- run: raco setup math
43-
if: ${{ matrix.enable-contracts }}
44-
- run: racket -l typed-racket-test -- --int --excl gui-lang
42+
- run: racket -l typed-racket-test -- --int --excl gui-lang.rkt --excl for-last.rkt
4543
- run: xvfb-run racket -l typed-racket-test -- --just typed-racket-test/succeed/gui-lang.rkt
4644
if: ${{ !matrix.enable-contracts }}
4745
- run: racket -l typed-racket-test -- --opt
@@ -51,7 +49,7 @@ jobs:
5149
- run: racket -l typed-racket-test/test-docs-complete
5250
if: ${{ !matrix.enable-contracts }}
5351
- run: raco setup math
54-
if: ${{ !matrix.enable-contracts }}
52+
- run: racket -l typed-racket-test -- --just typed-racket-test/succeed/for-last.rkt
5553
- run: racket -l typed-racket-test -- --math
5654
if: ${{ !matrix.enable-contracts }}
5755
- run: racket -l typed-racket-test/historical-counterexamples

typed-racket-test/main.rkt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
(require rackunit rackunit/text-ui racket/file
44
racket/port rackunit/log
5+
racket/set
6+
racket/path
57
racket/string
68
compiler/compiler setup/setup racket/promise
79
racket/match syntax/modcode
@@ -46,14 +48,15 @@
4648

4749
(define-runtime-path src-dir ".")
4850

49-
(define (mk-tests dir test #:error [error? #f] #:exclude [excl ""] )
51+
(define (mk-tests dir test #:error [error? #f] #:exclude [excl (set)] )
5052
(lambda ()
5153
(define path (build-path src-dir dir))
5254
(define prms
5355
(for/list ([i (in-naturals)]
5456
[p (directory-list path)]
5557
#:when (scheme-file? p)
56-
#:unless (and (not (equal? excl "")) (string-contains? (path->string p) excl))
58+
#:unless (let* ([f (path->string (file-name-from-path p))])
59+
(and (not (set-empty? excl)) (set-member? excl f)))
5760
;; skip backup files
5861
#:when (not (regexp-match #rx".*~" (path->string p))))
5962
(define p* (build-path path p))
@@ -87,7 +90,7 @@
8790

8891

8992

90-
(define (int-tests [excl ""])
93+
(define (int-tests [excl (set)])
9194
(define succ-tests (mk-tests "succeed"
9295
(lambda (p thnk)
9396
(check-not-exn thnk))
@@ -99,7 +102,8 @@
99102
(with-check-info
100103
(['predicates info])
101104
(check-exn pred thnk))))
102-
#:error #t))
105+
#:error #t
106+
#:exclude excl))
103107

104108
(test-suite "Integration tests"
105109
(succ-tests)
@@ -188,7 +192,7 @@
188192
(define missed-opt? (make-parameter #f))
189193
(define bench? (make-parameter #f))
190194
(define math? (make-parameter #f))
191-
(define excl (make-parameter ""))
195+
(define excl (make-parameter (list)))
192196
(define single (make-parameter #f))
193197
(current-namespace (make-base-namespace))
194198
(command-line
@@ -203,14 +207,15 @@
203207
["--just" path "run only this test" (single (just-one path))]
204208
["--nightly" "for the nightly builds" (begin (nightly? #t) (unit? #t) (opt? #t) (missed-opt? #t) (places 1))]
205209
["--all" "run all tests" (begin (unit? #t) (int? #t) (opt? #t) (missed-opt? #t) (bench? #t) (math? #t))]
206-
["--excl" test "exclude tests" (excl test)]
207210
["-j" num "number of places to use"
208211
(let ([n (string->number num)])
209212
(places (and (integer? n) (> n 1) n)))]
210213
["--gui" "run using the gui"
211214
(if (gui-available?)
212215
(exec go)
213-
(error "GUI not available"))])
216+
(error "GUI not available"))]
217+
#:multi
218+
["--excl" test "exclude tests" (excl (set-add (excl) test))])
214219

215220
(start-workers)
216221

0 commit comments

Comments
 (0)