-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathe0.tcl
49 lines (34 loc) · 760 Bytes
/
e0.tcl
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
#!/usr/bin/expect
set timeout 10
expect_after {
timeout {
puts "----> timeout <----\r"
exit
}
}
spawn qemu-system-x86_64 -nographic --serial mon:stdio -hdc kernel/kernel.img -hdd fat439/user.img
expect "shell> "
send "ls\r"
expect "shell> "
send "echo This is cool\r"
expect "shell> "
send " echo I know how to handle spaces \r"
expect "shell> "
send "cat f1.txt\r"
expect "shell> "
send " f1.txt\r"
expect "shell> "
send "cat f1.txt f2.txt\r"
expect "shell> "
send "f2.txt f1.txt\r"
expect "shell> "
send "cat f1.txt f2.txt f1.txt f2.txt\r"
expect "shell> "
send "gcc\r"
expect "shell> "
send "cat notThere\r"
expect "shell> "
send "shutdown\r"
expect "*** System Shutdown ***\r"
send \001
send "x"