Skip to content

Commit f6f370e

Browse files
committed
fixes for errortrace-startup.rkt test
1 parent 1277d05 commit f6f370e

1 file changed

Lines changed: 26 additions & 5 deletions

File tree

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
11
#lang racket/base
2-
(require "private/drracket-test-util.rkt")
2+
(require "private/drracket-test-util.rkt"
3+
racket/gui/base
4+
racket/class)
35

4-
(void (putenv "PLTDRDEBUG" "yes"))
6+
#|
57
6-
(fire-up-drracket-and-run-tests
7-
(λ ()
8-
(wait-for-drracket-frame)))
8+
this file cannot use anything except racket/gui/base
9+
and things that it depends on during the thunk passed
10+
to `fire-up-drracket-and-run-tests` or else errortrace
11+
seems to get confused. I'm not sure exactly why
12+
13+
|#
14+
15+
(void (putenv "PLTDRDEBUG" "yes")
16+
(putenv "PLTNOTOOLS" "yes"))
17+
18+
(parameterize ([current-namespace (make-gui-namespace)])
19+
(fire-up-drracket-and-run-tests
20+
(λ ()
21+
(define (drracket-frame? frame)
22+
(method-in-interface? 'get-execute-button (object-interface frame)))
23+
(define (wait-for-drracket-frame-pred)
24+
(define actives (get-top-level-windows))
25+
(for/or ([active (in-list actives)])
26+
(and active
27+
(method-in-interface? 'get-execute-button (object-interface active))
28+
active)))
29+
(poll-until wait-for-drracket-frame-pred 400))))

0 commit comments

Comments
 (0)