Skip to content
Snippets Groups Projects
Commit 74a59a8f authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

uImage: adapt test output to file-5.41

File-5.40->5.41 upgrade brought uImage printing change
which removed 0x prefixes in a few places:
  https://github.com/file/file/commit/905ca555b0e2bdcf9d2985bcc7c1c22e2229b088

This caused test faiure:
  E       AssertionError: assert '@@ -1 +1 @@\... 0XC63C4A06\n' == '@@ -1 +1 @@\... 0xC63C4A06\n'
  E         Skipping 127 identical leading characters in diff, use -v to show
  E         - Address: 0x00000000, Entry Point: 0x00000000, Header CRC: 0xF87AD200, Data CRC: 0x347161A5
  E         ?          --                       --                       ^                     ^
  E         + Address: 00000000, Entry Point: 00000000, Header CRC: 0XF87AD200, Data CRC: 0X347161A5
  E         ?                                                        ^                     ^

The change adds new variant of expected output.
parent 8cbe1ab6
No related branches found
No related tags found
1 merge request!90uImage: adapt test output to file-5.41
......@@ -98,8 +98,13 @@ def nested_differences(uboot_cpio1, uboot_cpio2):
def test_file_differences(differences):
# file-5.41 slightly changed output format by dropping leading 0x.
expected_diff_pre_5_41 = get_data("uimage_expected_diff_pre_5_41")
expected_diff = get_data("uimage_expected_diff")
assert differences[0].unified_diff == expected_diff
assert differences[0].unified_diff in (
expected_diff,
expected_diff_pre_5_41,
)
@skip_unless_tools_exist("cpio")
......
@@ -1 +1 @@
-u-boot legacy uImage, , Linux/PowerPC, RAMDisk Image (Not compressed), 1024 bytes, Fri Nov 27 19:49:00 2020, Load Address: 0x00000000, Entry Point: 0x00000000, Header CRC: 0xF87AD200, Data CRC: 0x347161A5
+u-boot legacy uImage, , Linux/PowerPC, RAMDisk Image (Not compressed), 1024 bytes, Fri Nov 27 19:49:24 2020, Load Address: 0x00000000, Entry Point: 0x00000000, Header CRC: 0xE86686F7, Data CRC: 0xC63C4A06
-u-boot legacy uImage, , Linux/PowerPC, RAMDisk Image (Not compressed), 1024 bytes, Fri Nov 27 19:49:00 2020, Load Address: 00000000, Entry Point: 00000000, Header CRC: 0XF87AD200, Data CRC: 0X347161A5
+u-boot legacy uImage, , Linux/PowerPC, RAMDisk Image (Not compressed), 1024 bytes, Fri Nov 27 19:49:24 2020, Load Address: 00000000, Entry Point: 00000000, Header CRC: 0XE86686F7, Data CRC: 0XC63C4A06
@@ -1 +1 @@
-u-boot legacy uImage, , Linux/PowerPC, RAMDisk Image (Not compressed), 1024 bytes, Fri Nov 27 19:49:00 2020, Load Address: 0x00000000, Entry Point: 0x00000000, Header CRC: 0xF87AD200, Data CRC: 0x347161A5
+u-boot legacy uImage, , Linux/PowerPC, RAMDisk Image (Not compressed), 1024 bytes, Fri Nov 27 19:49:24 2020, Load Address: 0x00000000, Entry Point: 0x00000000, Header CRC: 0xE86686F7, Data CRC: 0xC63C4A06
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment