tests: Add lib/lzma-test test case
Files used by this test are in: tests/data/lib/lzma-test/
file.bin - files with uncompressed data
file.lzma.bin - files with LZMA-compressed data from file.bin
How to prepare compressed file:
util/cbfs-compression-tool compress file.bin /tmp/file.lzma.bin lzma
dd if=/tmp/file.lzma.bin of=file.lzma.bin skip=8 ibs=1
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: Id75e0b41991382d4c391b031862106de58eacdf7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57555
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
diff --git a/tests/Makefile.inc b/tests/Makefile.inc
index 982f42b..6397e9b 100644
--- a/tests/Makefile.inc
+++ b/tests/Makefile.inc
@@ -141,7 +141,8 @@
$($(1)-objs): TEST_CFLAGS += -I$$(dir $$($(1)-config-file)) \
-D__$$(shell echo $$($(1)-stage) | tr '[:lower:]' '[:upper:]')__ \
- -D__TEST_NAME__=\"$(subst /,_,$(1))\"
+ -D__TEST_NAME__=\"$(subst /,_,$(1))\" \
+ -D__TEST_DATA_DIR__=\"$(testsrc)/data\"
# Give us a way to distinguish between coreboot source files and test files in code.
$($(1)-srcobjs): TEST_CFLAGS += -D__TEST_SRCOBJ__