Esempio n. 1
0
    def test_deploy_parameters(self):
        factory = Factory()
        job = factory.create_bbb_job('sample_jobs/kexec.yaml')
        self.assertIsNotNone(job)

        # Check Pipeline
        description_ref = pipeline_reference('kexec.yaml')
        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.assertEqual(kexec.internal_pipeline.actions[0].timeout.duration,
                         45)
Esempio n. 2
0
    def test_deploy_parameters(self):
        factory = Factory()
        job = factory.create_bbb_job('sample_jobs/kexec.yaml')
        self.assertIsNotNone(job)

        # Check Pipeline
        description_ref = pipeline_reference('kexec.yaml')
        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.assertEqual(kexec.internal_pipeline.actions[0].timeout.duration, 45)
Esempio n. 3
0
 def setUp(self):
     factory = Factory()
     self.job = factory.create_bbb_job('sample_jobs/uboot-multiple.yaml')
     self.assertIsNotNone(self.job)
     self.assertIsNone(self.job.validate())
     self.assertEqual(self.job.device['device_type'], 'beaglebone-black')
Esempio n. 4
0
 def setUp(self):
     super(TestConstants, self).setUp()
     factory = Factory()
     self.job = factory.create_bbb_job('sample_jobs/uboot-ramdisk.yaml', mkdtemp())
     self.assertIsNotNone(self.job)
Esempio n. 5
0
 def setUp(self):
     super(TestDefinitions, self).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')
     factory = BBBFactory()
     self.job = factory.create_bbb_job("sample_jobs/bbb-nfs-url.yaml")
Esempio n. 6
0
 def setUp(self):
     super(TestSkipInstall, self).setUp()
     factory = BBBFactory()
     self.job = factory.create_bbb_job("sample_jobs/bbb-skip-install.yaml")
Esempio n. 7
0
 def setUp(self):
     super(TestDefinitions, self).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')
     factory = BBBFactory()
     self.job = factory.create_bbb_job("sample_jobs/bbb-nfs-url.yaml")
Esempio n. 8
0
 def setUp(self):
     super(TestSkipInstall, self).setUp()
     factory = BBBFactory()
     self.job = factory.create_bbb_job("sample_jobs/bbb-skip-install.yaml")
Esempio n. 9
0
 def setUp(self):
     factory = Factory()
     self.job = factory.create_bbb_job('sample_jobs/uboot-multiple.yaml')
     self.assertIsNotNone(self.job)
     self.assertIsNone(self.job.validate())
     self.assertEqual(self.job.device['device_type'], 'beaglebone-black')