3 export R=$(realpath $(dirname $0)/..)
4 export PATH="$R/bin:$R/scripts:$PATH"
8 lcov -c -i -d $R/bin -o $R/lcov-out.info
11 if [[ -z "$NOVALGRIND" ]]; then
26 echo "*******************************************************************"
28 echo "*******************************************************************"
29 lcov -c -i -d $R/bin -o $R/fake.info
33 lcov -c -d $R/bin -o $R/tmp.info
34 mv $R/lcov-out.info $R/previous.info
35 lcov -a $R/tmp.info -a $R/previous.info -o $R/lcov-out.info
36 rm $R/previous.info $R/fake.info $R/tmp.info
55 export AFB_LDPATHS=/tmp/ldpaths
56 export AFB_TRACEAPI=no
58 ##########################################################
59 # test to check options
60 ##########################################################
61 mk $R/bin/afb-daemon-cov --help
63 mk $R/bin/afb-daemon-cov --version
65 mk $R/bin/afb-daemon-cov --no-httpd --fake-option
67 mk $R/bin/afb-daemon-cov --daemon --session-max
69 mk $R/bin/afb-daemon-cov --ws-client fake --session-max toto
71 mk $R/bin/afb-daemon-cov --foreground --port -55
73 mk $R/bin/afb-daemon-cov --foreground --port 9999999
75 mk $R/bin/afb-daemon-cov --no-ldpath --traceapi fake
77 mk $R/bin/afb-daemon-cov --traceditf all --tracesvc all --log error,alarm
79 mk $R/bin/afb-daemon-cov --call noapi/noverb:false
81 mk $R/bin/afb-daemon-cov --call not-a-call
83 LISTEN_FDNAMES=toto,demat LISTEN_FDS=5
84 typeset -x LISTEN_FDNAMES LISTEN_FDS
85 mk $R/bin/afb-daemon-cov --no-ldpath --binding $R/bin/demat.so --ws-server sd:demat --call "demat/exit:0"
86 typeset +x LISTEN_FDNAMES LISTEN_FDS
88 mk $R/bin/afb-daemon-cov --weak-ldpaths $R/ldpath/weak --binding $R/bin/demat.so --ws-server sd:demat --call "demat/exit:0"
90 AFB_DEBUG_BREAK=zero,one,two,main-start AFB_DEBUG_WAIT="here I am,main-args"
91 typeset -x AFB_DEBUG_BREAK AFB_DEBUG_WAIT
92 mkdbgwait $R/bin/afb-daemon-cov --rootdir $R/i-will-never-exist
93 typeset +x AFB_DEBUG_BREAK AFB_DEBUG_WAIT
95 mk $R/bin/afb-daemon-cov --workdir=/etc/you/should/not/be/able/to/create/me
97 mk $R/bin/afb-daemon-cov --exec $R/it-doesn-t-exist
99 ##########################################################
101 ##########################################################
102 mk $R/bin/test-apiset
104 mk $R/bin/test-session
106 mk $R/bin/test-wrap-json
108 ##########################################################
109 # true life test: run parts as direct client
110 ##########################################################
113 --log-file=$R/valgrind.out \
114 --trace-children=no \
117 --show-leak-kinds=all \
119 $R/bin/afb-daemon-cov \
130 --log error,warning,notice,info,debug,critical,alert-error,warning,notice,info,debug,critical,alert+error,warning,notice,info,debug,critical,alert \
137 --alias /icons:$R/www \
144 --ldpaths $R/ldpath/strong \
145 --binding $R/bin/demat.so \
146 --auto-api $R/apis/auto \
156 --set hello/key:a-kind-of-text \
157 --call demat/ping:true \
158 --call hello/ping:false \
159 --ws-server unix:$R/apis/ws/hello \
160 --ws-server unix:$R/apis/ws/salut \
161 --exec $R/scripts/run-parts.sh @p @t
163 ##########################################################
164 # true life test: run parts as in-direct client
165 ##########################################################
168 --log-file=$R/valgrind.out \
169 --trace-children=no \
172 --show-leak-kinds=all \
174 $R/bin/afb-daemon-cov \
179 --alias /icons:$R/www \
183 --ldpaths $R/ldpath/strong \
184 --binding $R/bin/demat.so \
185 --auto-api $R/apis/auto \
187 --ws-server unix:$R/apis/ws/hello \
188 --ws-server unix:$R/apis/ws/salut \
189 --ws-server localhost:9595/salut \
191 $R/bin/afb-daemon-nocov \
192 --auto-api $R/apis/auto \
193 --auto-api $R/apis/ws \
194 --ws-client localhost:@p/salut2 \
195 $R/scripts/run-parts.sh @@p @@t