6 class TestDropbear(infra.basetest.BRTest):
7 config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
9 BR2_TARGET_GENERIC_ROOT_PASSWD="testpwd"
10 BR2_SYSTEM_DHCP="eth0"
11 BR2_PACKAGE_DROPBEAR=y
12 BR2_TARGET_ROOTFS_CPIO=y
13 # BR2_TARGET_ROOTFS_TAR is not set
17 img = os.path.join(self.builddir, "images", "rootfs.cpio")
18 self.emulator.boot(arch="armv5",
20 options=["-initrd", img,
22 "-net", "user,hostfwd=tcp::2222-:22"])
23 self.emulator.login("testpwd")
24 cmd = "netstat -ltn 2>/dev/null | grep 0.0.0.0:22"
25 _, exit_code = self.emulator.run(cmd)
26 self.assertEqual(exit_code, 0)
27 # Would be useful to try to login through SSH here, through
28 # localhost:2222, though it is not easy to pass the ssh
29 # password on the command line.