Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-03-03 18:28:50 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
47aee8dce036f53a6aabc34804f9e6c1808a8a5a
47aee8dc
1 parent
0784df16
add utest framework gtest
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
49 行增加
和
6 行删除
trunk/3rdparty/gtest-1.6.0.zip
trunk/3rdparty/readme.txt
trunk/auto/depends.sh
trunk/auto/options.sh
trunk/configure
trunk/3rdparty/gtest-1.6.0.zip
0 → 100644
查看文件 @
47aee8d
不能预览此文件类型
trunk/3rdparty/readme.txt
查看文件 @
47aee8d
...
...
@@ -27,6 +27,9 @@ tools/ccache-3.1.9.zip
1.st.arm.Makefile.patch
st编译脚本补丁,允许用户指定cc编译器。
gtest-1.6.0.zip
google单元测试框架。
links:
ffmpeg:
...
...
@@ -53,4 +56,7 @@ links:
openssl:
http://www.openssl.org/
http://www.openssl.org/source/openssl-1.0.1f.tar.gz
gtest:
https://code.google.com/p/googletest
https://code.google.com/p/googletest/downloads/list
...
...
trunk/auto/depends.sh
查看文件 @
47aee8d
...
...
@@ -405,3 +405,16 @@ if [ $SRS_RESEARCH = YES ]; then
(
cd
research/ffempty
&&
make
&&
mv ffempty ../../
${
SRS_OBJS
}
/research
)
ret
=
$?
;
if
[[
$ret
-ne 0
]]
;
then
echo
"build research/ffempty failed, ret=
$ret
"
;
exit
$ret
;
fi
fi
#####################################################################################
# build utest code
#####################################################################################
if
[
$SRS_UTEST
=
YES
]
;
then
mkdir -p
${
SRS_OBJS
}
/utest
(
cd
research/hls
&&
make
&&
mv ts_info ../../
${
SRS_OBJS
}
/research
)
ret
=
$?
;
if
[[
$ret
-ne 0
]]
;
then
echo
"build research/hls failed, ret=
$ret
"
;
exit
$ret
;
fi
(
cd
research/ffempty
&&
make
&&
mv ffempty ../../
${
SRS_OBJS
}
/research
)
ret
=
$?
;
if
[[
$ret
-ne 0
]]
;
then
echo
"build research/ffempty failed, ret=
$ret
"
;
exit
$ret
;
fi
fi
...
...
trunk/auto/options.sh
查看文件 @
47aee8d
...
...
@@ -16,6 +16,7 @@ SRS_SSL=RESERVED
SRS_FFMPEG
=
RESERVED
SRS_HTTP
=
RESERVED
SRS_RESEARCH
=
RESERVED
SRS_UTEST
=
RESERVED
# TODO: remove the default to yes.
SRS_HLS
=
YES
...
...
@@ -23,6 +24,7 @@ SRS_SSL=YES
SRS_FFMPEG
=
YES
SRS_HTTP
=
YES
SRS_RESEARCH
=
NO
SRS_UTEST
=
NO
#####################################################################################
# parse options
...
...
@@ -45,13 +47,15 @@ do
--with-hls
)
SRS_HLS
=
YES
;;
--with-ffmpeg
)
SRS_FFMPEG
=
YES
;;
--with-http
)
SRS_HTTP
=
YES
;;
--with-research
)
SRS_RESEARCH
=
YES
;;
--with-research
)
SRS_RESEARCH
=
YES
;;
--with-utest
)
SRS_UTEST
=
YES
;;
--without-ssl
)
SRS_SSL
=
NO
;;
--without-hls
)
SRS_HLS
=
NO
;;
--without-ffmpeg
)
SRS_FFMPEG
=
NO
;;
--without-http
)
SRS_HTTP
=
NO
;;
--without-research
)
SRS_RESEARCH
=
NO
;;
--without-research
)
SRS_RESEARCH
=
NO
;;
--without-utest
)
SRS_UTEST
=
NO
;;
*
)
echo
"
$0
: error: invalid option
\"
$option
\"
"
...
...
@@ -78,12 +82,14 @@ if [ $help = yes ]; then
srs will call the http hooks, such as: on_connect.
--with-ffmpeg enable transcoding with ffmpeg.
--with-research build the research tools.
--with-utest build the utest for srs.
--without-ssl disable rtmp complex handshake.
--without-hls disable hls, rtmp streaming only.
--without-http disable http, http hooks callback.
--without-ffmpeg disable the ffmpeg transcoding feature.
--without-research do not build the research tools.
--without-utest do not build the utest for srs.
END
exit
0
...
...
@@ -113,6 +119,10 @@ if [ $SRS_RESEARCH = RESERVED ]; then
echo
"you must specifies the research, see: ./configure --help"
;
__check_ok
=
NO
fi
if
[
$SRS_UTEST
=
RESERVED
]
;
then
echo
"you must specifies the utest, see: ./configure --help"
;
__check_ok
=
NO
fi
if
[
$__check_ok
=
NO
]
;
then
exit
1;
fi
...
...
trunk/configure
查看文件 @
47aee8d
...
...
@@ -45,11 +45,17 @@ if [ $SRS_SSL = YES ]; then
SrsLibrtmpSampleEntry
=
"ssl"
fi
# utest make entry, (cd utest; make)
SrsUtestMakeEntry
=
"@echo -e
\"\$
(YELLOW)ignore utest for it's disabled
\$
(BLACK)
\"
"
if
[
$SRS_UTEST
=
YES
]
;
then
SrsUtestMakeEntry
=
"(cd utest; make)"
fi
# makefile
echo
"generate Makefile"
SRS_MAKEFILE
=
"Makefile"
cat
<< END > ${SRS_MAKEFILE}
.PHONY: default help clean server bandwidth librtmp librtmp-sample _prepare_dir
.PHONY: default help clean server bandwidth librtmp librtmp-sample
utest
_prepare_dir
# linux shell color support.
RED="\\\\e[31m"
...
...
@@ -57,26 +63,29 @@ GREEN="\\\\e[32m"
YELLOW="\\\\e[33m"
BLACK="\\\\e[0m"
default: server bandwidth librtmp librtmp-sample
default: server bandwidth librtmp librtmp-sample
utest
@echo -e "\$(GREEN)"
@echo -e "build success:"
@echo -e " server: ./objs/srs, the srs server"
@echo -e " bandwidth: ./objs/bandwidth, the bandwidth test client"
@echo -e " librtmp: ./objs/include, ./objs/lib, the srs-librtmp library"
@echo -e " librtmp-sample: ./research/librtmp, the srs-librtmp client sample"
@echo -e " utest: ./objs/srs_utest, the utest for srs"
@echo -e "\$(BLACK)"
help:
@echo "Usage: make <help>|<clean>|<server>|<bandwidth>|<librtmp>|<librtmp-sample>"
@echo "Usage: make <help>|<clean>|<server>|<bandwidth>|<librtmp>|<librtmp-sample>
|<utest>
"
@echo " help display this help menu"
@echo " clean cleanup project"
@echo " server build the srs(simple rtmp server) over st(state-threads)"
@echo " bandwidth build the bandwidth test client tool."
@echo " librtmp build the client publish/play library."
@echo " librtmp-sample build the srs-librtmp sample"
@echo " utest build the utest for srs"
clean:
(rm -f Makefile; cd ${SRS_OBJS}; rm -rf srs bandwidth Makefile *.hpp src st_*_load research include lib)
(rm -f Makefile; cd ${SRS_OBJS}; rm -rf srs bandwidth Makefile *.hpp srs_utest)
(cd ${SRS_OBJS}; rm -rf src research include lib utest)
(cd research/librtmp; make clean)
server: _prepare_dir
...
...
@@ -96,6 +105,11 @@ librtmp-sample:
(cd research/librtmp; make ${SrsLibrtmpSampleEntry})
@echo "srs-librtmp sample build success"
utest:
@echo "build the utest for srs"
${SrsUtestMakeEntry}
@echo "utest for srs build success"
# the ./configure will generate it.
_prepare_dir:
@mkdir -p ${SRS_OBJS}
...
...
请
注册
或
登录
后发表评论