File tree Expand file tree Collapse file tree 2 files changed +41
-17
lines changed Expand file tree Collapse file tree 2 files changed +41
-17
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/expect -f
2
+
3
+ spawn bash -c "cd poky && source oe-init-build-env && runqemu qemuarm nographic"
4
+
5
+ set timeout 60
6
+
7
+ expect {
8
+ -re ".*login: " {
9
+ send "root\r"
10
+ }
11
+ timeout {
12
+ puts "ERROR: Login prompt not received"
13
+ exit 1
14
+ }
15
+ }
16
+
17
+ expect {
18
+ -re {root@.*# } {
19
+ # got shell prompt after login
20
+ }
21
+ timeout {
22
+ puts "ERROR: Timeout waiting for root shell prompt after login"
23
+ exit 1
24
+ }
25
+ }
26
+
27
+ send "hello-world\r"
28
+
29
+ expect {
30
+ -re {root@.*# } {
31
+ # got shell prompt after command
32
+ }
33
+ timeout {
34
+ puts "ERROR: Timeout waiting for shell prompt after command"
35
+ exit 1
36
+ }
37
+ }
38
+
39
+ # Optional: interact to keep session open
40
+ #interact
41
+
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments