Changeset 2998
- Timestamp:
- Jun 2, 2012 12:02:39 PM (12 months ago)
- File:
-
- 1 edited
-
cpu/x86/pc/olpc/via/mfgtest.fth (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cpu/x86/pc/olpc/via/mfgtest.fth
r2920 r2998 32 32 33 33 0 value pass? 34 0 value overall-fail? 35 0 value stop? 34 36 35 37 : mfg-wait-return ( -- ) … … 53 55 ??cr ." Selftest failed. Return code = " .d cr 54 56 mfg-color-red sq-border! 55 false to pass? 57 false to pass? true to overall-fail? 56 58 red-screen 57 59 flush-keyboard … … 63 65 mfg-color-green sq-border! 64 66 true to pass? 65 d# 2000 hold-message drop67 d# 2000 hold-message if true to stop? then 66 68 then 67 69 else 68 70 ??cr ." Selftest failed due to abort" cr 69 71 mfg-color-red sq-border! 70 false to pass? 72 false to pass? true to overall-fail? 71 73 red-screen 72 74 flush-keyboard … … 96 98 ; 97 99 98 : all-tests-passed( -- )100 : overall ( -- ) 99 101 restore-scroller-bg 100 102 clear-screen 101 ." All automatic tests passed successfully." cr cr cr 102 green-screen 103 overall-fail? if 104 ." Some tests failed." cr cr cr 105 red-screen 106 else 107 ." All automatic tests passed successfully." cr cr cr 108 green-screen 109 then 103 110 wait-return 104 111 cursor-off scroller-off gui-alerts refresh … … 141 148 142 149 : play-item ( -- ) \ Interactive autorun of all tests 150 false to overall-fail? 151 false to stop? 143 152 #mfgcols #mfgtests + #mfgcols ?do 144 153 i set-current-sq … … 148 157 loop 149 158 run-menu-item 150 pass? 0= ifunloop exit then159 stop? if unloop exit then 151 160 loop 152 all-tests-passed 153 ; 154 155 : quit-item ( -- ) menu-done ; 161 0 3 rc>sq set-current-sq \ quit-item 162 overall 163 ; 164 165 false value quit? 166 : quit-item ( -- ) true to quit? menu-done ; 156 167 157 168 : init-menu ( -- ) … … 197 208 ; 198 209 199 : autorun-from-gamekey ( -- )200 default-selection set-current-sqrefresh210 : pause-to-interact 211 refresh 201 212 (cr kill-line 202 213 0 d# 30 do … … 206 217 drop ( ) 207 218 menu-interact ( ) 219 true to quit? 208 220 unloop exit ( -- ) 209 221 then ( ) 210 222 d# 100 ms ( ) 211 223 -1 +loop 224 ; 225 226 : autorun-from-gamekey ( -- ) 227 false to quit? 228 default-selection set-current-sq 229 pause-to-interact 230 quit? if exit then 212 231 play-item 213 ; 232 stop? if menu-interact exit then 233 quit? if exit then 234 0 3 rc>sq set-current-sq \ quit-item 235 pause-to-interact 236 ; 237 214 238 : gamekey-auto-menu ( -- ) 215 239 ['] run-menu behavior >r
Note: See TracChangeset
for help on using the changeset viewer.
