Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion liblzf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,35 @@ subpackages:
description: "liblzf headers"
pipeline:
- uses: split/dev
test:
environment:
contents:
packages:
- build-base
pipeline:
- name: Compile and run liblzf test
runs: |
# Adapted from bench.c in the liblzf source
echo '#include <assert.h>' > test.c
echo '#include <string.h>' >> test.c
echo '#include <stdlib.h>' >> test.c
echo '#include "lzf.h"' >> test.c
echo '#define DSIZE 32768' >> test.c
echo 'unsigned char data[DSIZE], data2[DSIZE*2], data3[DSIZE*2];' >> test.c
echo 'int main()' >> test.c
echo '{' >> test.c
echo ' unsigned int i, l, j;' >> test.c
echo ' for (i = 0; i < DSIZE; ++i)' >> test.c
echo ' data[i] = i + (rand() & 1);' >> test.c
echo ' l = lzf_compress (data, DSIZE, data2, DSIZE*2);' >> test.c
echo ' assert(l);' >> test.c
echo ' j = lzf_decompress (data2, l, data3, DSIZE*2);' >> test.c
echo ' assert (j == DSIZE);' >> test.c
echo ' assert (!memcmp (data, data3, DSIZE));' >> test.c
echo ' return 0;' >> test.c
echo '}' >> test.c
gcc test.c -L. -llzf -o test
./test

# No github or release-monitoring.org record, surprisingly...
update:
enabled: false