Merge lp:~jibel/utah/fixed_iso_validation_test_vmlinuz into lp:utah

Proposed by Jean-Baptiste Lallement
Status: Merged
Approved by: Para Siva
Approved revision: 1050
Merged at revision: 1050
Proposed branch: lp:~jibel/utah/fixed_iso_validation_test_vmlinuz
Merge into: lp:utah
Diff against target: 26 lines (+9/-1)
1 file modified
utah/isotest/iso_static_validation.py (+9/-1)
To merge this branch: bzr merge lp:~jibel/utah/fixed_iso_validation_test_vmlinuz
Reviewer Review Type Date Requested Status
Para Siva (community) Approve
Review via email: mp+226793@code.launchpad.net

Commit message

On trusty 'file' returns a different signature for the kernel than other release. This patch addresses this special case.

Description of the change

On trusty 'file' returns a different signature for the kernel than other release. This patch addresses this special case.

To post a comment you must log in.
Revision history for this message
Para Siva (psivaa) wrote :

Thanks for working on it jibel

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'utah/isotest/iso_static_validation.py'
2--- utah/isotest/iso_static_validation.py 2013-06-21 15:59:24 +0000
3+++ utah/isotest/iso_static_validation.py 2014-07-15 09:54:29 +0000
4@@ -382,13 +382,21 @@
5 logging.debug('Extract kernel image from the iso')
6 path = iso.kernelpath()
7 vmlinuz_path = self.iso.extract(path, self.temp_dir)
8+
9+ # In Trusty the type returned by file for the kernel is different from
10+ # other releases
11+ host_release = subprocess.check_output(['lsb_release', '-sc'])
12+ kernel_string = 'Linux kernel'
13+ if 'trusty' in host_release:
14+ kernel_string = 'x86 boot sector'
15+
16 cmd = ['file', vmlinuz_path]
17 output = subprocess.Popen(cmd, stdout=subprocess.PIPE,
18 stderr=subprocess.PIPE)
19 (stdout, stderr) = output.communicate()
20 logging.debug('Check if vmlinuz present in the iso is a Linux kernel')
21 self.assertEqual(stderr, '')
22- self.assertIn('Linux kernel', stdout)
23+ self.assertIn(kernel_string, stdout)
24
25 @unittest.skipUnless(ubiquity_image or
26 (st_variant == 'server' and st_release > 'precise'),

Subscribers

People subscribed via source and target branches