Skip to content

Commit aed9f67

Browse files
author
Cupertino Miranda
committed
tests/acceptance: ARC: Add linux boot testing.
Just an acceptance test with ARC Linux booting. Signed-off-by: Cupertino Miranda <cmiranda@synopsys.com>
1 parent f96dc50 commit aed9f67

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

tests/acceptance/boot_linux_console.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,26 @@ def test_mips_malta(self):
138138
console_pattern = 'Kernel command line: %s' % kernel_command_line
139139
self.wait_for_console_pattern(console_pattern)
140140

141+
def test_mips_malta(self):
142+
"""
143+
:avocado: tags=arch:arc
144+
"""
145+
deb_url = ('http://snapshot.debian.org/archive/debian/'
146+
'20130217T032700Z/pool/main/l/linux-2.6/'
147+
'linux-image-2.6.32-5-4kc-malta_2.6.32-48_mips.deb')
148+
deb_hash = 'a8cfc28ad8f45f54811fc6cf74fc43ffcfe0ba04'
149+
deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
150+
kernel_path = self.extract_from_deb(deb_path,
151+
'/boot/vmlinux-archs')
152+
153+
self.vm.set_console()
154+
kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
155+
self.vm.add_args('-kernel', kernel_path,
156+
'-append', kernel_command_line)
157+
self.vm.launch()
158+
console_pattern = 'Kernel command line: %s' % kernel_command_line
159+
self.wait_for_console_pattern(console_pattern)
160+
141161
def test_mips64el_malta(self):
142162
"""
143163
This test requires the ar tool to extract "data.tar.gz" from
@@ -1004,6 +1024,17 @@ def test_alpha_clipper(self):
10041024
console_pattern = 'Kernel command line: %s' % kernel_command_line
10051025
self.wait_for_console_pattern(console_pattern)
10061026

1027+
def do_test_arc(self, kernel_name, console=0):
1028+
tar_url = ('https://github.com/cupertinomiranda/arc-qemu-resources/archive/master.tar.gz')
1029+
file_path = self.fetch_asset(tar_url)
1030+
archive.extract(file_path, self.workdir)
1031+
1032+
self.vm.set_console(console_index=console)
1033+
self.vm.add_args('-kernel',
1034+
self.workdir + '/' + kernel_name)
1035+
self.vm.launch()
1036+
self.wait_for_console_pattern('QEMU advent calendar')
1037+
10071038
def test_m68k_q800(self):
10081039
"""
10091040
:avocado: tags=arch:m68k
@@ -1124,3 +1155,27 @@ def test_xtensa_lx60(self):
11241155
tar_hash = '49e88d9933742f0164b60839886c9739cb7a0d34'
11251156
self.vm.add_args('-cpu', 'dc233c')
11261157
self.do_test_advcal_2018('02', tar_hash, 'santas-sleigh-ride.elf')
1158+
1159+
timeout = 240
1160+
def test_arc_virt(self):
1161+
"""
1162+
:avocado: tags=arch:arc
1163+
:avocado: tags=machine:virt
1164+
"""
1165+
1166+
tar_url = ('https://github.com/cupertinomiranda/'
1167+
'arc-qemu-resources/archive/master.tar.gz')
1168+
file_path = self.fetch_asset(tar_url)
1169+
archive.extract(file_path, self.workdir)
1170+
1171+
kernel_path = self.workdir + '/arc-qemu-resources-master/vmlinux_archs'
1172+
1173+
self.vm.set_console()
1174+
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE)
1175+
self.vm.add_args('-kernel', kernel_path)
1176+
self.vm.add_args('-device', 'virtio-net-device,netdev=net0')
1177+
self.vm.add_args('-netdev', 'user,id=net0,hostfwd=tcp::5558-:21,hostfwd=tcp::5557-:23')
1178+
self.vm.launch()
1179+
1180+
console_pattern = 'Welcome to Buildroot'
1181+
self.wait_for_console_pattern(console_pattern)

0 commit comments

Comments
 (0)