-
Notifications
You must be signed in to change notification settings - Fork 16
/
.test-script
executable file
·67 lines (54 loc) · 1.03 KB
/
.test-script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/expect
set timeout 5
spawn term/term.py -t 127.0.0.1:6666
expect "MONITOR for MIPS32 - initialized." {} timeout {exit 1}
expect ">>"
send "R\n"
expect ">>"
send "R\n"
expect ">>"
send "A\n"
send "80100000\n"
expect "one instruction per line"
expect "]"
send "addiu \$2,\$0,1\n"
expect "]"
send "addu \$3,\$2,\$2\n"
expect "]"
send "jr \$31\n"
expect "]"
send "nop\n"
expect "]"
send "\n"
expect ">>"
send "D\n"
send "80100000\n"
send "16\n"
expect -re "0x80100000: +0x24020001" {} timeout {exit 1}
expect ">>"
send "U\n"
send "80100000\n"
send "16\n"
expect ">>"
send "G\n"
send "80100000\n"
expect "elapsed time" {} timeout {exit 1}
expect ">>"
send "R\n"
expect -re "R3.+0x00000002" {} timeout {exit 1}
# TLB required
expect ">>"
send "G\n"
send "0\n"
expect "elapsed time" {} timeout {exit 1}
expect ">>"
send "T\n"
send " -1\n"
expect -re "00000_000 +00100_000 +0 +1 +1 +1" {} timeout {exit 1}
expect ">>"
send "D\n"
send "0\n"
send "16\n"
expect -re "0x00000000: +0x24020001" {} timeout {exit 1}
expect ">>"
send "Q\n"