Commit 789ae043 authored by Thomas Mahe's avatar Thomas Mahe Committed by Philippe Mazet
Browse files

Tests : remove deprecated imx8m device type

parent 5aeea7af
{% extends 'imx8m-common.jinja2' %}
{% set root_device = root_device | default('/dev/ttymxc1') %}
{% set baud_rate = baud_rate|default('115200') %}
{% set kernel_args = kernel_args | default("earlycon=ec_imx6q,0x30890000") %}
{% set console_device = console_device|default('ttymcx1') %}
{% set booti_kernel_addr = booti_kernel_addr | default('0x40480000') %}
{% set booti_ramdisk_addr = booti_ramdisk_addr | default('0x44000000') %}
{% set booti_dtb_addr = booti_dtb_addr | default('0x43000000') %}
{% set bootz_kernel_addr = booti_kernel_addr %}
{% set bootz_ramdisk_addr = booti_ramdisk_addr %}
{% set bootz_dtb_addr = booti_dtb_addr %}
{% set bootm_kernel_addr = bootz_kernel_addr %}
{% set bootm_ramdisk_addr = bootz_ramdisk_addr %}
{% set bootm_dtb_addr = bootz_dtb_addr %}
{% extends 'imx8m-common.jinja2' %}
{% set root_device = root_device | default('/dev/ttymxc0') %}
{% set baud_rate = baud_rate|default('115200') %}
{% set kernel_args = kernel_args | default("earlycon=ec_imx6q,0x30860000") %}
{% set console_device = console_device|default('ttymxc0') %}
{% set booti_kernel_addr = booti_kernel_addr | default('0x80080000') %}
{% set booti_ramdisk_addr = booti_ramdisk_addr | default('0x84000000') %}
{% set booti_dtb_addr = booti_dtb_addr | default('0x83000000') %}
{% set bootz_kernel_addr = booti_kernel_addr %}
{% set bootz_ramdisk_addr = booti_ramdisk_addr %}
{% set bootz_dtb_addr = booti_dtb_addr %}
{% set bootm_kernel_addr = bootz_kernel_addr %}
{% set bootm_ramdisk_addr = bootz_ramdisk_addr %}
{% set bootm_dtb_addr = bootz_dtb_addr %}
......@@ -610,10 +610,12 @@ class TestFastbootDeploy(StdoutTestCase):
self.assertEqual([], lxc_cmd_prefix(job))
def test_fastboot_boot_commands(self):
job = self.factory.create_job("imx8m-01.jinja2", "sample_jobs/imx8m.yaml")
job = self.factory.create_job(
"imx8mq-evk-01.jinja2", "sample_jobs/imx8mq-evk.yaml"
)
boot = [
action for action in job.pipeline.actions if action.name == "fastboot-boot"
][0]
self.assertIn("commands", boot.parameters)
self.assertEqual("130651d6f060954b", job.device["fastboot_serial_number"])
self.assertEqual("191c51d6f060954b", job.device["fastboot_serial_number"])
self.assertIsInstance(boot.parameters["commands"], list)
......@@ -657,11 +657,13 @@ class TestUbootAction(StdoutTestCase):
@unittest.skipIf(infrastructure_error("lxc-start"), "lxc-start not installed")
def test_imx8m(self):
job = self.factory.create_job("imx8m-01.jinja2", "sample_jobs/imx8m.yaml")
job = self.factory.create_job(
"imx8mq-evk-01.jinja2", "sample_jobs/imx8mq-evk.yaml"
)
self.assertIsNotNone(job)
job.validate()
self.assertEqual(job.pipeline.errors, [])
description_ref = self.pipeline_reference("imx8m.yaml", job=job)
description_ref = self.pipeline_reference("imx8mq-evk.yaml", job=job)
self.assertEqual(description_ref, job.pipeline.describe(False))
deploy = [
action
......
{% extends 'imx8m.jinja2' %}
{# USB C cable in Cambrionix port 7 #}
{% set fastboot_serial_number = '130651d6f060954b' %}
{% set adb_serial_number = fastboot_serial_number %}
{% set connection_list = ['uart0'] %}
{% set connection_tags = {'uart0': ['primary', 'telnet']} %}
{% set connection_commands = {'uart0': 'telnet azrael 2030'} %}
{% set soft_reset_command = 'fastboot -u -s ' + fastboot_serial_number + ' reboot' %}
{% set hard_reset_command = [
'/usr/bin/pduclient --daemon calvin --hostname pdu2 --command off --port 01',
'/home/neil/code/lava-lab/shared/lab-scripts/usb_hub_control -u 7 -p 4000 -m off',
'sleep 20',
'/home/neil/code/lava-lab/shared/lab-scripts/usb_hub_control -u 7 -p 4000 -m sync',
'/usr/bin/pduclient --daemon calvin --hostname pdu2 --command on --port 01'] %}
{% set power_off_command = '/usr/bin/pduclient --daemon calvin --hostname pdu2 --command off --port 01' %}
{% set power_on_command = '/usr/bin/pduclient --daemon calvin --hostname pdu2 --command on --port 01' %}
{% set adb_command = 'adb -s ' + fastboot_serial_number %}
{% set fastboot_command = 'fastboot -u -s ' + fastboot_serial_number %}
{% set device_info = [{'board_id': fastboot_serial_number}] %}
{% set fastboot_options = ['-i', '0x0525'] %}
......@@ -460,7 +460,7 @@ class TestUbootTemplates(BaseTemplate.BaseTemplateCases):
if not check:
self.fail("Unable to find setenv nfsargs")
def test_imx8m_template(self):
def test_imx8mq_evk_template(self):
fastboot_cmd_order = [
"bootloader",
"bootloader_a",
......@@ -485,7 +485,7 @@ class TestUbootTemplates(BaseTemplate.BaseTemplateCases):
"recovery",
]
rendered = self.render_device_dictionary_file("imx8m-01.jinja2")
rendered = self.render_device_dictionary_file("imx8mq-evk-01.jinja2")
template_dict = yaml_safe_load(rendered)
self.assertIsNotNone(template_dict)
self.assertIn("error-messages", template_dict["constants"]["u-boot"])
......@@ -497,7 +497,7 @@ class TestUbootTemplates(BaseTemplate.BaseTemplateCases):
)
context = {"bootloader_prompt": "=>"}
rendered = self.render_device_dictionary_file("imx8m-01.jinja2", context)
rendered = self.render_device_dictionary_file("imx8mq-evk-01.jinja2", context)
template_dict = yaml_safe_load(rendered)
self.assertIsNotNone(template_dict)
self.assertIn("error-messages", template_dict["constants"]["u-boot"])
......@@ -514,7 +514,7 @@ class TestUbootTemplates(BaseTemplate.BaseTemplateCases):
# test overwriting kernel args
checked = False
context = {"console_device": "ttyUSB1"}
rendered = self.render_device_dictionary_file("imx8m-01.jinja2", context)
rendered = self.render_device_dictionary_file("imx8mq-evk-01.jinja2", context)
template_dict = yaml_safe_load(rendered)
commands = template_dict["actions"]["boot"]["methods"]["u-boot"]["ramdisk"][
"commands"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment