Esempio n. 1
0
 def setUp(self):
     super().setUp()
     self.testdef = os.path.join(os.path.dirname(__file__), "testdefs",
                                 "params.yaml")
     self.res_data = os.path.join(os.path.dirname(__file__), "testdefs",
                                  "result-data.txt")
     self.factory = UBootFactory()
     self.job = self.factory.create_bbb_job("sample_jobs/bbb-nfs-url.yaml")
Esempio n. 2
0
    def test_deploy_parameters(self):
        factory = UBootFactory()
        job = factory.create_bbb_job("sample_jobs/kexec.yaml")
        self.assertIsNotNone(job)

        # Check Pipeline
        description_ref = self.pipeline_reference("kexec.yaml", job=job)
        self.assertEqual(description_ref, job.pipeline.describe(False))

        # Check kexec specific options
        job.validate()
        self.assertIsInstance(job.pipeline.actions[2], TestShellRetry)
        self.assertIsInstance(job.pipeline.actions[3], BootKexecAction)
        kexec = job.pipeline.actions[3]
        self.assertIsInstance(kexec.internal_pipeline.actions[0], KexecAction)
        self.assertIsInstance(kexec.internal_pipeline.actions[1],
                              AutoLoginAction)
        self.assertIsInstance(kexec.internal_pipeline.actions[2],
                              ExpectShellSession)
        self.assertIsInstance(kexec.internal_pipeline.actions[3],
                              ExportDeviceEnvironment)
        self.assertIn("kernel", kexec.parameters)
        self.assertIn("command", kexec.parameters)
        self.assertIn("method", kexec.parameters)
        self.assertIn("dtb", kexec.parameters)
        self.assertIn("options", kexec.parameters)
        self.assertIn("kernel-config", kexec.parameters)
        self.assertTrue(kexec.valid)
        self.assertEqual(
            "/sbin/kexec --load /home/vmlinux --dtb /home/dtb --initrd /home/initrd --reuse-cmdline",
            kexec.internal_pipeline.actions[0].load_command,
        )
        self.assertEqual("/sbin/kexec -e",
                         kexec.internal_pipeline.actions[0].command)
        self.assertIsNotNone(
            kexec.internal_pipeline.actions[0].parameters["boot_message"])

        self.assertIsNotNone(kexec.internal_pipeline.actions[0].name)
        self.assertIsNotNone(kexec.internal_pipeline.actions[0].level)
        self.assertEqual(kexec.internal_pipeline.actions[0].timeout.duration,
                         45)
Esempio n. 3
0
 def setUp(self):
     super().setUp()
     factory = UBootFactory()
     self.job = factory.create_bbb_job("sample_jobs/bbb-skip-install.yaml")
Esempio n. 4
0
 def setUp(self):
     super().setUp()
     factory = UBootFactory()
     self.job = factory.create_bbb_job("sample_jobs/uboot-ramdisk.yaml")
     self.assertIsNotNone(self.job)
Esempio n. 5
0
 def setUp(self):
     super().setUp()
     factory = UBootFactory()
     self.job = factory.create_bbb_job("sample_jobs/uboot-multiple.yaml")
     self.assertIsNotNone(self.job)
     self.assertIsNone(self.job.validate())