Skip to content

Commit a4b4462

Browse files
committed
disable more tests for pkg-build
1 parent afdbc3b commit a4b4462

File tree

9 files changed

+32
-25
lines changed

9 files changed

+32
-25
lines changed

ipoe/private/command/dbshell.rkt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,8 @@
399399
(module+ test
400400
(require rackunit rackunit-abbrevs ipoe/private/util/check-print)
401401

402+
(define CI? (getenv "CI"))
403+
402404
(test-case "arg-error"
403405
(check-equal?
404406
(arg-error 'FOO 'BAR 'BAZ)
@@ -433,7 +435,7 @@
433435
(define o* (options-init-for-test))
434436

435437
(define-syntax-rule (with-db-test e)
436-
(when o*
438+
(when (and o* (not CI?))
437439
(parameterize-from-hash o* (lambda ()
438440
(parameterize ([*verbose* #t]
439441
[*interactive?* #f]

ipoe/private/command/init.rkt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
(module+ test
174174
(require rackunit rackunit-abbrevs ipoe/private/util/check-print)
175175

176-
(define CI? (equal? "true" (getenv "CI")))
176+
(define CI? (getenv "CI"))
177177

178178
(test-case "get-username"
179179
(check-apply* (lambda (k1 k2)
@@ -216,10 +216,11 @@
216216
(void)))
217217

218218
(test-case "psql-create-user, failure"
219-
(check-exn #rx"ipoe:init"
220-
(lambda ()
221-
(check-print (list #rx"^Checking that user")
222-
(lambda () (psql-create-user "FAKE-USER"))))))
219+
(unless CI?
220+
(check-exn #rx"ipoe:init"
221+
(lambda ()
222+
(check-print (list #rx"^Checking that user")
223+
(lambda () (psql-create-user "FAKE-USER")))))))
223224

224225
#;(test-case "psql-create-user, success"
225226
(parameterize-from-hash (options-init)

ipoe/private/db.rkt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -814,12 +814,12 @@
814814

815815
;; -------------------------------------------------------------------
816816

817-
(define CI? (equal? "true" (getenv "CI")))
817+
(define CI? (getenv "CI"))
818818

819819
(define o* (options-init-for-test))
820820

821821
(define-syntax-rule (with-db-test e)
822-
(when o*
822+
(when (and o* (not CI?))
823823
(parameterize-from-hash o* (lambda ()
824824
(parameterize ([*verbose* #t])
825825
(with-ipoe-db #:commit? #f
@@ -828,7 +828,7 @@
828828
(lambda () e)))))))
829829

830830
(define-syntax-rule (with-online-test e)
831-
(when o*
831+
(when (and o* (not CI?))
832832
(parameterize-from-hash o* (lambda ()
833833
(parameterize ([*interactive?* #f])
834834
(with-ipoe-db #:commit? #f #:online-only? #t

ipoe/private/parameters.rkt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
(only-in racket/list last)
351351
(only-in racket/file file->lines))
352352

353-
(define CI? (equal? "true" (getenv "CI")))
353+
(define CI? (getenv "CI"))
354354

355355
(test-case "almost-option?"
356356
(check-true* almost-option?
@@ -422,16 +422,16 @@
422422
(check-equal? (options-get opt 'grammarcheck?) #f)))
423423

424424
(test-case "options-set-from-file"
425-
(define (gen-tmpfile fname)
426-
(define s (symbol->string (gensym)))
427-
(define full-path
428-
(string-append (path->string (find-system-path 'temp-dir))
429-
"/"
430-
(or fname s)))
431-
432-
(if (file-exists? full-path)
433-
(gen-tmpfile (string-append fname s))
434-
full-path))
425+
(define (gen-tmpfile fname)
426+
(define s (symbol->string (gensym)))
427+
(define full-path
428+
(string-append (path->string (find-system-path 'temp-dir))
429+
"/"
430+
(or fname s)))
431+
432+
(if (file-exists? full-path)
433+
(gen-tmpfile (string-append fname s))
434+
full-path))
435435

436436
(define-syntax-rule (refresh-file f str ...)
437437
(with-output-to-file f #:exists 'replace

ipoe/private/poem/form.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
(only-in racket/string string-split)
262262
)
263263

264-
(define CI? (equal? "true" (getenv "CI")))
264+
(define CI? (getenv "CI"))
265265

266266
;; -- check-duplicate
267267
;; Always void if first arg is #f

ipoe/private/poem/rhymecheck.rkt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,10 @@
295295

296296
(define o* (options-init-for-test))
297297

298+
(define CI? (getenv "CI"))
299+
298300
(define-syntax-rule (with-db-test e ...)
299-
(when o*
301+
(when (and o* (not CI?))
300302
(parameterize-from-hash o* (lambda ()
301303
(parameterize ([*interactive?* #f])
302304
(with-ipoe-db #:user (*user*)

ipoe/private/poem/spellcheck.rkt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@
6666

6767
(define o* (options-init-for-test))
6868

69+
(define CI? (getenv "CI"))
70+
6971
(define-syntax-rule (with-db-test e)
70-
(when o*
72+
(when (and o* (not CI?))
7173
(parameterize-from-hash o*
7274
(lambda ()
7375
(parameterize ([*interactive?* #f])

ipoe/private/scrape/scrape-rhymes.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
(module+ test
113113
(require rackunit rackunit-abbrevs)
114114

115-
(define CI? (equal? "true" (getenv "CI")))
115+
(define CI? (getenv "CI"))
116116

117117
(test-case "rhyme?:almost-rhyme?"
118118
(when (not CI?)

ipoe/private/scrape/scrape-words.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273

274274
(define not-a-word "hguwisdvzodxv")
275275

276-
(define CI? (equal? "true" (getenv "CI")))
276+
(define CI? (getenv "CI"))
277277

278278
(when (not CI?)
279279
(with-handlers ((exn:fail:network? (lambda (ex) (log-ipoe-scrape-warning "network error, skipping test"))))

0 commit comments

Comments
 (0)