]> code.ossystems Code Review - openembedded-core.git/commitdiff
insane: display names instead of ELF machine numbers
authorRoss Burton <ross.burton@intel.com>
Tue, 11 Oct 2016 12:19:44 +0000 (13:19 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 11 Oct 2016 21:17:48 +0000 (22:17 +0100)
The 'arch' QA test currently simply outputs the ELF machine field as a number
which isn't helpful.  Display this as a human-readable name to make it clearer
to the user what the problem is.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/insane.bbclass

index b347638d7252ab52367ba1cc819ed37c5d966e8f..17c92843911dbe87be4ddca8d1dac213095e6c3f 100644 (file)
@@ -543,8 +543,8 @@ def package_qa_check_arch(path,name,d, elf, messages):
     # Check the architecture and endiannes of the binary
     if not ((machine == elf.machine()) or \
         ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
-        package_qa_add_message(messages, "arch", "Architecture did not match (%d to %d) on %s" % \
-                 (machine, elf.machine(), package_qa_clean_path(path,d)))
+        package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \
+                 (oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path,d)))
     elif not ((bits == elf.abiSize()) or  \
         ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
         package_qa_add_message(messages, "arch", "Bit size did not match (%d to %d) %s on %s" % \