summaryrefslogtreecommitdiff
path: root/test/py/tests/test_fs/test_squashfs/test_sqfs_load.py
AgeCommit message (Collapse)AuthorFilesLines
2021-07-05test/py: rewrite sqfsload command test suiteJoao Marcos Costa1-30/+138
The previous strategy to know if a file was correctly loaded was to check for how many bytes were read and compare it against the file's original size. Since this is not a good solution, replace it by comparing the checksum of the loaded bytes against the original file's checksum. Add more test cases: files at a sub-directory and non-existent file. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> [on sandbox] Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com>
2020-08-24test/py: Add tests for LZO and ZSTDJoao Marcos Costa1-14/+26
Improve SquashFS tests architecture. Add 'Compression' class. LZO algorithm may crash if the file is fragmented, so the fragments are disabled when testing LZO. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
2020-08-10test/py: fix SquashFS testsJoao Marcos Costa1-4/+5
Use "cons.config.build_dir" instead of writing to the source directory (read-only). This will fix the test failures in Azure. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
2020-08-08test/py: Add tests for the SquashFS commandsJoao Marcos Costa1-0/+33
Add Python scripts to test 'ls' and 'load' commands. The scripts generate a SquashFS image and clean the directory after the assertions, or if an exception is raised. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>