app/test: support resources archived by tar
authorJan Viktorin <viktorin@rehivetech.com>
Mon, 13 Jun 2016 15:07:40 +0000 (17:07 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 13 Jun 2016 18:57:06 +0000 (20:57 +0200)
commit66819e6c11d86f3549018d057b46f094d92e8638
tree03fdd56ee0cb0c2e9813658b77810912e51b7155
parent115cc1150d51550e1b469d41569716aa3f7abc36
app/test: support resources archived by tar

When a more complex resource (a file hierarchy) is needed, packing
every single file as a single resource would be very ineffective. For
that purpose, it is possible to pack the files into a tar archive,
extract it before test from the resource and finally clean up all the
created files.

This patch introduces functions resource_untar and resource_rm_by_tar
to perform those tasks. An example of using those functions is included
as a test.

A new dependency is required to build the app/test: libarchive.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
app/test/Makefile
app/test/resource.c
app/test/resource.h
app/test/test_resource.c