forked from Embroidermodder/libembroidery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
emb-test.sh
executable file
·44 lines (38 loc) · 1.03 KB
/
emb-test.sh
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
#!/bin/bash
#
# Builds and runs the libembroidery_convert executable (along with the
# static and dynamic versions of the library) and runs the in-built
# test suite.
#
# This matches the GitHub Action we have set up.
function build_libembroidery () {
rm -fr build
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make
gdb --batch -ex=r --args ./embroider -test
cd -
}
function make_doc () {
man -Tpdf ./doc/embroider.1 >./doc/embroider.pdf
}
function embedded_compatibility_report () {
echo "SYMBOL USAGE" > embedded.txt
for s in `nm -j build/embroider`
do
echo $s >> embedded.txt
grep $s *.c *.h | wc >> embedded.txt
done
echo "SPACE PER SYMBOL" >> embedded.txt
nm -S --size-sort build/libembroidery_static.a >> embedded.txt
echo "TOTAL SPACE USAGE" >> embedded.txt
strip build/libembroidery.so
strip build/libembroidery_static.a
strip build/embroider
du -h build/libembroidery.so >> embedded.txt
du -h build/libembroidery_static.a >> embedded.txt
du -h build/embroider >> embedded.txt
}
build_libembroidery
embedded_compatibility_report