mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 00:20:38 -09:00
support/testing: fix TestInitSystemNone for non-login shell
This test started failing at commit
0cad947b96
"support/testing/infra/emulator.py: fix qemu prompt detection" with the
error message
AttributeError: 'NoneType' object has no attribute 'run_command'
This is because we changed emulator.run() so that emulator.login() must
be called first. But this test skips the login and goes directly to a
shell. Use the new emulator.connect_shell() function which prepares the
shell without logging in.
Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
a1a2f498d7
commit
5ed1fab018
@@ -18,10 +18,8 @@ class TestInitSystemNone(InitSystemBase):
|
||||
if index != 0:
|
||||
self.emulator.logfile.write("==> System does not boot")
|
||||
raise SystemError("System does not boot")
|
||||
index = self.emulator.qemu.expect(["#", pexpect.TIMEOUT], timeout=60)
|
||||
if index != 0:
|
||||
self.emulator.logfile.write("==> System does not boot")
|
||||
raise SystemError("System does not boot")
|
||||
|
||||
self.emulator.connect_shell()
|
||||
|
||||
out, exit_code = self.emulator.run("sh -c 'echo $PPID'")
|
||||
self.assertEqual(exit_code, 0)
|
||||
|
||||
Reference in New Issue
Block a user