-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathMakefile.am
More file actions
143 lines (107 loc) · 5.19 KB
/
Makefile.am
File metadata and controls
143 lines (107 loc) · 5.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#
# @configure_input@
#
SUBDIRS = include src converters tools python
DIST_SUBDIRS = $(SUBDIRS)
# Keep image fixtures in release archives for converter test coverage.
DIST_IMAGE_FILES = $(shell cd $(srcdir) && find images -type f -print)
# Keep converter regression PoCs referenced from converters/test_impl.
DIST_TEST_FIXTURES = \
tests/issue/166/poc \
tests/issue/167/poc \
tests/issue/200/POC_img2sixel_heap_buffer_overflow \
tests/issue/220/poc1_gif_oob.gif \
tests/issue/220/poc2_sixel_dcs_signed_integer_overflow.sixel \
tests/issue/220/poc3_encoder_integer_overflow.gif \
tests/issue/220/poc5_encode_integer_overflow.gif \
tests/issue/220/poc6_quant_integer_overflow_8x8.png
EXTRA_DIST = LICENSE LICENSE.images LICENSE.mesa LICENSE.pngsuite \
LICENSE.pnmcolormap LICENSE.sdump LICENSE.sixel LICENSE.stb \
$(DIST_IMAGE_FILES) \
$(DIST_TEST_FIXTURES)
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
srcdir = @srcdir@
VPATH = @srcdir@
# pkgconfig
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = $(builddir)/libsixel.pc
CLEANFILES = $(builddir)/package.json \
$(builddir)/valgrind.log \
$(builddir)/test.log \
$(builddir)/unittest.log
all-am:
cp $(builddir)/package.json.in $(builddir)/package.json
check-am:
dist-windows: dist-zip
mkdir -p @PACKAGE_NAME@-@PACKAGE_VERSION@/bin-windows
cp converters/*.exe @PACKAGE_NAME@-@PACKAGE_VERSION@/bin-windows/
zip -u @PACKAGE_NAME@-@PACKAGE_VERSION@.zip @PACKAGE_NAME@-@PACKAGE_VERSION@/bin-windows/*.exe
mv -v @PACKAGE_NAME@-@PACKAGE_VERSION@.zip \
lib@PACKAGE_NAME@-@PACKAGE_VERSION@-$$(./config.status --config|tr \ \\n|grep ^--host|cut -f2 -d=).zip
dist-windows-i686-vexe:
tools/vexe --host=i686-w64-mingw32 debian dist-windows
docker ps -a --filter ancestor=libsixel-debian --format '{{.ID}}' | xargs -I{} docker cp {}:/tmp/libsixel/lib@PACKAGE_NAME@-@PACKAGE_VERSION@-i686-w64-mingw32.zip .
dist-windows-x86_64-vexe:
tools/vexe --host=x86_64-w64-mingw32 debian dist-windows
docker ps -a --filter ancestor=libsixel-debian --format '{{.ID}}' | xargs -I{} docker cp {}:/tmp/libsixel/lib@PACKAGE_NAME@-@PACKAGE_VERSION@-x86_64-w64-mingw32.zip .
unittest: all
cd $(srcdir)/src && $(MAKE) unittest 2>&1 |tee $(builddir)/unittest.log
test: all
cd src && $(MAKE) unittest 2>&1 |tee $(builddir)/test.log
cd converters && $(MAKE) test 2>&1 |tee -a $(builddir)/test.log
winetest: all
cd converters && $(MAKE) winetest
valgrind: all
valgrind --leak-check=full --show-reachable=no --error-limit=no img2sixel images/snake.jpg -dfs 2>&1 \
| grep ^== \
| tee $(builddir)/valgrind.log
grep "All heap blocks were freed" $(builddir)/valgrind.log || \
grep "definitely lost: 0 bytes in 0 blocks" valgrind.log
grep "All heap blocks were freed" $(builddir)/valgrind.log || \
grep "indirectly lost: 0 bytes in 0 blocks" valgrind.log
coveralls:
coveralls -e config.h -e stb_image.h -e stb_image_write.h -e examples -e include -e perl -e php -e ruby -e wic
coveralls-dryrun: test
coveralls -e config.h -e stb_image.h -e stb_image_write.h -e examples -e include -e perl -e php -e ruby -e wic --dryrun
issue-131:
converters/img2sixel --high-color tests/issue/131/2020-01-30-img2sixel.gif
issue-136:
converters/img2sixel -8 tests/issue/136/poc
issue-150:
converters/img2sixel -i tests/issue/150/poc -o tmp.sixel
issue-156:
converters/img2sixel -o ./a.sixel -7 -p 1 -C 5 -d stucki -E size -i tests/issue/156/poc -o tmp.sixel
issue-156-vexe:
AFL_USE_ASAN=1 CC=clang CFLAGS="-fsanitize=address -O0 -g" tools/vexe --disable-shared ubuntu issue-156
issue-163:
converters/img2sixel tests/issue/163/poc0
issue-163-vexe:
AFL_USE_ASAN=1 CC=clang CFLAGS="-fsanitize=address -O0 -g" tools/vexe --disable-shared ubuntu issue-163
issue-165:
converters/img2sixel tests/issue/165/poc
issue-165-vexe:
tools/vexe --without-png ubuntu issue-165
issue-166:
converters/img2sixel ../tests/issue/166/poc -w128 ; test $$? = 255 -o $$? = 127
issue-166-vexe:
tools/vexe --platform=amd64 ubuntu issue-166
issue-167:
converters/img2sixel ../tests/issue/167/poc -h128 ; test $$? = 255 -o $$? = 127
issue-167-vexe:
tools/vexe --platform=amd64 ubuntu issue-167
issue-200:
converters/img2sixel --7bit-mode -8 --invert --palette-type=auto --verbose tests/issue/200/POC_img2sixel_heap_buffer_overflow -o /dev/null
issue-207: all
converters/img2sixel -h 50% -r lanczos3 -w 300px tests/issue/207/poc; test $$? = 255 -o $$? = 127
issue-207-vexe:
CC=clang CFLAGS="-fsanitize=address -O0 -g -fno-omit-frame-pointer" tools/vexe ubuntu issue-207
issue-220:
converters/img2sixel -B '#000000' tests/issue/220/poc1_gif_oob.gif -o /dev/null
converters/sixel2png -i tests/issue/220/poc2_sixel_dcs_signed_integer_overflow.sixel -o /dev/null; test $$? = 255 -o $$? = 127
converters/img2sixel -h 1890177820 -e -I -C 637555838 -S -o /dev/null tests/issue/220/poc3_encoder_integer_overflow.gif; test $$? = 255 -o $$? = 127
converters/img2sixel -S -o /dev/null tests/issue/220/poc5_encode_integer_overflow.gif
converters/img2sixel -p4 -C 2147483647 -o /dev/null tests/issue/220/poc6_quant_integer_overflow_8x8.png; test $$? = 255 -o $$? = 127
libsixel-libsixel-issue-73:
converters/img2sixel tests/issue/libsixel-libsixel/73/stbi_1561_poc.bin
libsixel-libsixel-issue-51:
converters/img2sixel tests/issue/libsixel-libsixel/51/stbi_1561_poc\ 2.bin