test/py: Improve check for mksquashfs version
authorMarek Behún <marek.behun@nic.cz>
Thu, 22 Jul 2021 20:52:05 +0000 (22:52 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 29 Jul 2021 00:46:34 +0000 (20:46 -0400)
commit89795ef3b6b2d12cffb840a98ee374d2e806aa64
treeee50f6d86aea7c9e3f76ca901be42ca925d46261
parentff7852d5442ab48c71cce69e19bac3d6a5183496
test/py: Improve check for mksquashfs version

Some builds of squashfs-tools append version string with "-git" or
similar. The float() conversion will fail in this case.

Improve the code to only convert to float() the string before the '-'
character.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joao Marcos Costa <jmcosta944@gmail.com>
test/py/tests/test_fs/test_squashfs/sqfs_common.py