diff options
author | Karsten Tausche <karsten@fairphone.com> | 2018-04-03 15:59:26 +0200 |
---|---|---|
committer | Neil Williams <neil.williams@linaro.org> | 2018-04-03 14:40:01 +0000 |
commit | 8f0d5a94f1f17624d3e61b13ed999b248255b0d8 (patch) | |
tree | 1221e60e31d3e7f593e5a6adc8df1a04ab9e3d82 /lava_scheduler_app/tests/test_pipeline.py | |
parent | 13758edc7cf3a6ffeafa31a14662d47546b48f48 (diff) |
Pass LXC/fastboot parameters to all jobs in split_multinode_yaml
reboot_to_fastboot was not handled before, so that Android devices would
always reboot to fastboot after test runs, even if this parameter was
set to false in the job submission.
lava-lxc protocol metadata was only populated for the first job of each
role. This change passes the data to all job instances, so that multiple
jobs per role can be created.
Change-Id: I5a89d748468e8b85224c2c60be8c8016b203b648
Diffstat (limited to 'lava_scheduler_app/tests/test_pipeline.py')
-rw-r--r-- | lava_scheduler_app/tests/test_pipeline.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lava_scheduler_app/tests/test_pipeline.py b/lava_scheduler_app/tests/test_pipeline.py index b240ff17f..75d0d3afb 100644 --- a/lava_scheduler_app/tests/test_pipeline.py +++ b/lava_scheduler_app/tests/test_pipeline.py @@ -747,6 +747,27 @@ class TestYamlMultinode(TestCaseWithFactory): else: self.fail('Unrecognised role: %s' % role) + def test_multinode_nexus4(self): + submission = yaml.load(open( + os.path.join(os.path.dirname(__file__), 'sample_jobs', 'nexus4_multinode.yaml'), 'r')) + target_group = 'arbitrary-group-id' # for unit tests only + + jobs = split_multinode_yaml(submission, target_group) + device_protocol_data = { + 'lava-lxc': { + 'name': 'lxc-nexus4', 'template': 'debian', 'release': 'sid', + 'distribution': 'debian'} + } + for role, _ in jobs.items(): + if role == 'device': + for job in jobs[role]: + self.assertIn('lava-lxc', job['protocols']) + self.assertEqual(job['protocols']['lava-lxc'], device_protocol_data['lava-lxc']) + self.assertIn('reboot_to_fastboot', job) + self.assertEqual(job['reboot_to_fastboot'], False) + else: + self.fail('Unrecognised role: %s' % role) + def test_multinode_protocols(self): user = self.factory.make_user() device_type = self.factory.make_device_type() |