File tree Expand file tree Collapse file tree 9 files changed +32
-25
lines changed Expand file tree Collapse file tree 9 files changed +32
-25
lines changed Original file line number Diff line number Diff line change 399
399
(module+ test
400
400
(require rackunit rackunit-abbrevs ipoe/private/util/check-print)
401
401
402
+ (define CI? (getenv "CI " ))
403
+
402
404
(test-case "arg-error "
403
405
(check-equal?
404
406
(arg-error 'FOO 'BAR 'BAZ )
433
435
(define o* (options-init-for-test))
434
436
435
437
(define-syntax-rule (with-db-test e)
436
- (when o*
438
+ (when ( and o* (not CI?))
437
439
(parameterize-from-hash o* (lambda ()
438
440
(parameterize ([*verbose* #t ]
439
441
[*interactive?* #f ]
Original file line number Diff line number Diff line change 173
173
(module+ test
174
174
(require rackunit rackunit-abbrevs ipoe/private/util/check-print)
175
175
176
- (define CI? (equal? " true " ( getenv "CI " ) ))
176
+ (define CI? (getenv "CI " ))
177
177
178
178
(test-case "get-username "
179
179
(check-apply* (lambda (k1 k2)
216
216
(void)))
217
217
218
218
(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 " )))))))
223
224
224
225
#; (test-case "psql-create-user, success "
225
226
(parameterize-from-hash (options-init)
Original file line number Diff line number Diff line change 814
814
815
815
;; -------------------------------------------------------------------
816
816
817
- (define CI? (equal? " true " ( getenv "CI " ) ))
817
+ (define CI? (getenv "CI " ))
818
818
819
819
(define o* (options-init-for-test))
820
820
821
821
(define-syntax-rule (with-db-test e)
822
- (when o*
822
+ (when ( and o* (not CI?))
823
823
(parameterize-from-hash o* (lambda ()
824
824
(parameterize ([*verbose* #t ])
825
825
(with-ipoe-db #:commit? #f
828
828
(lambda () e)))))))
829
829
830
830
(define-syntax-rule (with-online-test e)
831
- (when o*
831
+ (when ( and o* (not CI?))
832
832
(parameterize-from-hash o* (lambda ()
833
833
(parameterize ([*interactive?* #f ])
834
834
(with-ipoe-db #:commit? #f #:online-only? #t
Original file line number Diff line number Diff line change 350
350
(only-in racket/list last)
351
351
(only-in racket/file file->lines))
352
352
353
- (define CI? (equal? " true " ( getenv "CI " ) ))
353
+ (define CI? (getenv "CI " ))
354
354
355
355
(test-case "almost-option? "
356
356
(check-true* almost-option?
422
422
(check-equal? (options-get opt 'grammarcheck? ) #f )))
423
423
424
424
(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))
435
435
436
436
(define-syntax-rule (refresh-file f str ... )
437
437
(with-output-to-file f #:exists 'replace
Original file line number Diff line number Diff line change 261
261
(only-in racket/string string-split)
262
262
)
263
263
264
- (define CI? (equal? " true " ( getenv "CI " ) ))
264
+ (define CI? (getenv "CI " ))
265
265
266
266
;; -- check-duplicate
267
267
;; Always void if first arg is #f
Original file line number Diff line number Diff line change 295
295
296
296
(define o* (options-init-for-test))
297
297
298
+ (define CI? (getenv "CI " ))
299
+
298
300
(define-syntax-rule (with-db-test e ... )
299
- (when o*
301
+ (when ( and o* (not CI?))
300
302
(parameterize-from-hash o* (lambda ()
301
303
(parameterize ([*interactive?* #f ])
302
304
(with-ipoe-db #:user (*user*)
Original file line number Diff line number Diff line change 66
66
67
67
(define o* (options-init-for-test))
68
68
69
+ (define CI? (getenv "CI " ))
70
+
69
71
(define-syntax-rule (with-db-test e)
70
- (when o*
72
+ (when ( and o* (not CI?))
71
73
(parameterize-from-hash o*
72
74
(lambda ()
73
75
(parameterize ([*interactive?* #f ])
Original file line number Diff line number Diff line change 112
112
(module+ test
113
113
(require rackunit rackunit-abbrevs)
114
114
115
- (define CI? (equal? " true " ( getenv "CI " ) ))
115
+ (define CI? (getenv "CI " ))
116
116
117
117
(test-case "rhyme?:almost-rhyme? "
118
118
(when (not CI?)
Original file line number Diff line number Diff line change 273
273
274
274
(define not-a-word "hguwisdvzodxv " )
275
275
276
- (define CI? (equal? " true " ( getenv "CI " ) ))
276
+ (define CI? (getenv "CI " ))
277
277
278
278
(when (not CI?)
279
279
(with-handlers ((exn:fail:network? (lambda (ex) (log-ipoe-scrape-warning "network error, skipping test " ))))
You can’t perform that action at this time.
0 commit comments