A TTL(Tera Term Language) script used for automatic reboot test
Tera Term Language Dictionary
AutoReboot.ttl
Tera Term language files to localize the menu and the message are as follows. If you want to add a new language, please download the provided `English.lng' file and translate it with your language. Also, e-mail the translated file to us. If you want to comment on this web site, e-mail us at ttssh2-contactlists.osdn.me. Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube. Tera is a tonal language, distinguishing high, mid and low tone. Tone is not indicated orthographically since no minimal trios exist; minimal pairs can be distinguished by context. The first publication in Tera was Labar Mbarkandu nu Yohanna Bula Ki, a translation of the Gospel of John, which established an orthographic system. In Tera Term I use the Serial Port to send commands to the board in order to log in and run certain settings that I want. Instead of typing these commands each time I test a board I want to create a program that sends these commands without the requirement to type them again and again each time.
Putty
; TTL Script used for automatic reboot test |
username = 'root' |
password = 'root' |
usernamePrompt = 'login' |
passwordPrompt = 'Password' |
oopsPrompt = 'Oops' |
panicPrompt = 'Kernel panic' |
maxLoop = 1000 |
gettime now '%Y/%m/%d-%H:%M:%S'#13#10 |
sprintf2 startTime 'AutoReboot started at %s' now |
gettime logfile 'AutoReboot-test-log-%Y%m%d-%H%M%S.txt' |
logopen logfile 000000 |
logwrite startTime |
for i 1 maxLoop |
wait usernamePrompt oopsPrompt panicPrompt |
if result = 0 then |
gettime now '%Y/%m/%d-%H:%M:%S' |
sprintf2 tempTime 'Exception: Timeout at %s after %d times reboot'#13#10 now i |
logwrite tempTime |
elseif result = 1 then |
sendln username |
wait passwordPrompt |
sendln password |
elseif result = 2 then |
gettime now '%Y/%m/%d-%H:%M:%S' |
sprintf2 tempTime 'Exception: Oops at %s after %d times reboot'#13#10 now i |
logwrite tempTime |
logclose |
exit |
elseif result = 3 then |
gettime now '%Y/%m/%d-%H:%M:%S' |
sprintf2 tempTime 'Exception: Kernel panic at %s after %d times reboot'#13#10 now i |
logwrite tempTime |
logclose |
exit |
else |
logwrite 'Unknown Error'#13#10 |
endif |
sendln |
gettime now '%Y/%m/%d-%H:%M:%S' |
sprintf2 rebootTime 'AutoReboot %d times at %s'#13#10 i now |
dispstr rebootTime |
logwrite rebootTime |
sendln |
sendln 'reboot' |
next |
gettime now '%Y/%m/%d-%H:%M:%S' |
sprintf2 stopTime 'AutoReboot stopped at %s after %d times reboot'#13#10 now i |
logwrite stopTime |
logclose |
Tera Term Language Examples
Tera Term Language Definition
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment