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

Merge ST, support utest and coverage by gtest.

This commit is contained in:
winlin 2021-03-03 10:26:30 +08:00
parent 3bb1b673c5
commit 7d12c3641a
11 changed files with 444 additions and 3 deletions

View file

@ -98,6 +98,9 @@ TARGETS = aix-debug aix-optimized \
solaris-debug solaris-optimized \
solaris-64-debug solaris-64-optimized
UTEST_TARGETS = darwin-debug-utest linux-debug-utest \
darwin-debug-gcov linux-debug-gcov
#
# Platform specifics
#
@ -282,12 +285,21 @@ endif
#
# make EXTRA_CFLAGS=-UMD_HAVE_EPOLL <target>
#
# or to enable sendmmsg(2) support:
#
# make EXTRA_CFLAGS="-DMD_HAVE_SENDMMSG -D_GNU_SOURCE"
#
# or to enable stats for ST:
#
# make EXTRA_CFLAGS=-DDEBUG_STATS
#
# or enable the coverage for utest:
# make UTEST_FLAGS="-fprofile-arcs -ftest-coverage"
#
##########################
CFLAGS += $(DEFINES) $(OTHER_FLAGS) $(EXTRA_CFLAGS)
CFLAGS += $(UTEST_FLAGS)
OBJS = $(TARGETDIR)/sched.o \
$(TARGETDIR)/stk.o \
@ -347,6 +359,8 @@ unknown:
@echo
@for target in $(TARGETS); do echo $$target; done
@echo
@for target in $(UTEST_TARGETS); do echo $$target; done
@echo
st.pc: st.pc.in
sed "s/@VERSION@/${VERSION}/g" < $< > $@
@ -479,5 +493,23 @@ solaris-64-debug:
solaris-64-optimized:
$(MAKE) OS="SOLARIS_64" BUILD="OPT"
darwin-debug-utest:
@echo "Build utest for state-threads"
$(MAKE) OS="DARWIN" BUILD="DBG"
cd utest && $(MAKE)
linux-debug-utest:
@echo "Build utest for state-threads"
$(MAKE) OS="LINUX" BUILD="DBG"
cd utest && $(MAKE)
darwin-debug-gcov:
@echo "Build utest with gcov for state-threads"
$(MAKE) OS="DARWIN" BUILD="DBG" UTEST_FLAGS="-fprofile-arcs -ftest-coverage" STATIC_ONLY=yes
cd utest && $(MAKE) UTEST_FLAGS="-fprofile-arcs -ftest-coverage"
linux-debug-gcov:
@echo "Build utest with gcov for state-threads"
$(MAKE) OS="LINUX" BUILD="DBG" UTEST_FLAGS="-fprofile-arcs -ftest-coverage" STATIC_ONLY=yes
cd utest && $(MAKE) UTEST_FLAGS="-fprofile-arcs -ftest-coverage"
##########################