1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Build: Change make utest for test

This commit is contained in:
winlin 2021-12-02 20:15:28 +08:00
parent 4d10a453f6
commit bc063945f1
6 changed files with 5 additions and 50 deletions

View file

@ -1,7 +1,7 @@
#!/bin/bash
# In .circleci/config.yml, generate *.gcno with
# ./configure --gcov --without-research --without-librtmp && make
# ./configure --gcov --without-research --without-librtmp && make utest
# and generate *.gcda by
# ./objs/srs_utest

View file

@ -1,33 +0,0 @@
#!/bin/bash
MODULES=""
if [[ $# -gt 0 ]]; then
for module in $@; do
module=$(basename $module)
if [[ $module == "src" ]]; then
MODULES="objs/src"
break
fi
MODULES="$MODULES objs/src/$module"
done
fi
if [[ $MODULES == "" ]]; then
MODULES="objs/src"
fi
IS_LINUX=yes
uname -s|grep Darwin >/dev/null && IS_DARWIN=yes && IS_LINUX=no
echo "IS_LINUX: $IS_LINUX, IS_DARWIN: $IS_DARWIN"
echo "Clean gcda files"
find objs -name *.gcda |xargs rm -f
echo "Build and run utest"
make -j10 && ./objs/srs_utest
echo "Generating coverage at $MODULES"
mkdir -p ./objs/coverage &&
gcovr -r src --html --html-details -o ./objs/coverage/srs.html $MODULES &&
echo "Coverage report at ./objs/coverage/srs.html" &&
open ./objs/coverage/srs.html