mirror of
https://libwebsockets.org/repo/libwebsockets
synced 2024-11-21 08:37:52 +00:00
5b74d7108b
1) Introduce LWS_WITH_GCOV to build with gcc / clang coverage instrumentation. $ cd build $ make clean && rm -f `find . -name "*.gcno" -o -name "*.gcda"` && make -j16 && sudo make install && sudo /usr/local/bin/libwebsockets-test-server -s ... $ gcov `find . -name *.c.gcno | grep -v test-apps` -b | sed "/\.h.\$/,/^$/d" The above are available in two helper scripts - scripts/build-gcov.sh - scripts/gcov.sh 2) CMake defaults changed: - LWS_WITH_ZIP_FOPS: OFF - LWS_WITH_RANGES: OFF - LWS_WITHOUT_EXTENSIONS: ON - LWS_WITH_ZLIB: OFF New CMake controls that default-OFF: - LWS_WITH_GENHASH - LWS_WITH_GENRSA these are implied by LWS_WITH_JWS (which is implied by LWS_WITH_ACME) 3) rename ./lib/tls/XXX/server.c and client.c to XXX-server.c / XXX-client.c. This is because gcov dumps its results using the .c filename part only, the copies overwrite each other if there are different .c files in the tree with the same filename part. 4) Add onetime test-client mode and test to ./test-apps/attack.sh 5) Add gcov howto in READMEs/README.build.md using attack.sh
4 lines
86 B
Bash
Executable File
4 lines
86 B
Bash
Executable File
#!/bin/sh
|
|
|
|
gcov `find . -name *.c.gcno | grep -v test-apps` -b | sed "/\.h.\$/,/^$/d"
|