binwalk: fix checks

This commit is contained in:
Evgeny Ermakov 2021-11-30 06:00:47 +11:00 committed by Duncaen
parent 1e40bf9bc7
commit a9216a5523
No known key found for this signature in database
GPG key ID: 335C1D17EC3D6E35
2 changed files with 21 additions and 2 deletions

View file

@ -0,0 +1,14 @@
https://github.com/ReFirmLabs/binwalk/issues/566
https://github.com/ReFirmLabs/binwalk/issues/569
--- a/testing/tests/test_firmware_zip.py
+++ b/testing/tests/test_firmware_zip.py
@@ -10,6 +10,8 @@
'''
expected_results = [
[0, 'Zip archive data, at least v1.0 to extract, name: dir655_revB_FW_203NA/'],
+ [51, 'Zip archive data, at least v2.0 to extract, compressed size: 6395868, uncompressed size: 6422554, name: dir655_revB_FW_203NA/DIR655B1_FW203NAB02.bin'],
+ [6395993, 'Zip archive data, at least v2.0 to extract, compressed size: 14243, uncompressed size: 61440, name: dir655_revB_FW_203NA/dir655_revB_release_notes_203NA.doc'],
[6410581, 'End of Zip archive, footer length: 22'],
]

View file

@ -3,10 +3,9 @@ pkgname=binwalk
version=2.3.3
revision=1
build_style=python3-module
pycompile_module="binwalk"
hostmakedepends="python3"
depends="python3"
checkdepends="python3-coverage python3-nose"
checkdepends="python3-coverage python3-nose tar"
short_desc="Easy tool for analyzing/reversing/extracting firmware images"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="MIT"
@ -16,6 +15,12 @@ checksum=7e32b94dc77632b51d18732b5456e2a3ef85e4521d7d4a54410e36f93859501f
post_extract() {
vsed -i -e 's;/etc/bash_completion.d/%s;%s.bash;' setup.py
if [ $(id -u) -eq 0 ]; then
# CI container has different privileges than expected in tests.
# Append " **{'run-as' : 'root'}," to "binwalk.scan(input_vector_file,".
vsed -i -e "/binwalk.scan(input_vector_file,/ s/$/ **{'run-as' : 'root'},/" testing/tests/test_*.py
fi
}
do_check() {