Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
ed9cd826
Commit
ed9cd826
authored
Dec 29, 2017
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add run_tests.sh
parent
e11f2f51
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
build_in_travis_ci.sh
build_in_travis_ci.sh
+3
-3
CMakeLists.txt
test/CMakeLists.txt
+6
-1
run_tests.sh
test/run_tests.sh
+0
-1
No files found.
build_in_travis_ci.sh
View file @
ed9cd826
...
...
@@ -19,14 +19,14 @@ fi
if
[
"
$PURPOSE
"
=
"compile"
]
;
then
make
-j4
&&
sh tools/make_all_examples
elif
[
"
$PURPOSE
"
=
"unittest"
]
;
then
cd test
&&
sh ./run_tests.sh
&&
cd
../
cd test
&&
make
-j4
&&
sh ./run_tests.sh
&&
cd
../
else
echo
"Unknown purpose=
\"
$PURPOSE
\"
"
fi
echo
"start building by cmake"
rm
-rf
build
&&
mkdir
build
&&
cd
build
if
!
cmake
-DBRPC_DEBUG
=
OFF
-DBUILD_EXAMPLE
=
ON
-DBUILD_UNIT_TESTS
=
O
FF
..
;
then
if
!
cmake
-DBRPC_DEBUG
=
OFF
-DBUILD_EXAMPLE
=
ON
-DBUILD_UNIT_TESTS
=
O
N
..
;
then
echo
"Fail to generate Makefile by cmake"
exit
1
fi
...
...
@@ -34,7 +34,7 @@ fi
if
[
"
$PURPOSE
"
=
"compile"
]
;
then
make
-j4
elif
[
"
$PURPOSE
"
=
"unittest"
]
;
then
echo
"todo"
make
-j4
&&
cd test
&&
sh ./run_tests.sh
&&
cd
../
else
echo
"Unknown purpose=
\"
$PURPOSE
\"
"
fi
test/CMakeLists.txt
View file @
ed9cd826
...
...
@@ -19,6 +19,12 @@ find_library(GTEST_MAIN_LIB NAMES gtest_main)
set
(
CMAKE_CPP_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DBTHREAD_USE_FAST_PTHREAD_MUTEX -D__const__= -D_GNU_SOURCE -DUSE_SYMBOLIZE -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DUNIT_TEST -Dprivate=public -Dprotected=public -DBVAR_NOT_LINK_DEFAULT_VARIABLES -include
${
CMAKE_SOURCE_DIR
}
/test/sstream_workaround.h"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-O2 -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-invalid-offsetof -Wno-unused-parameter -fno-omit-frame-pointer"
)
file
(
COPY
${
CMAKE_SOURCE_DIR
}
/test/cert1.key DESTINATION
${
CMAKE_CURRENT_BINARY_DIR
}
)
file
(
COPY
${
CMAKE_SOURCE_DIR
}
/test/cert2.key DESTINATION
${
CMAKE_CURRENT_BINARY_DIR
}
)
file
(
COPY
${
CMAKE_SOURCE_DIR
}
/test/cert1.crt DESTINATION
${
CMAKE_CURRENT_BINARY_DIR
}
)
file
(
COPY
${
CMAKE_SOURCE_DIR
}
/test/cert2.crt DESTINATION
${
CMAKE_CURRENT_BINARY_DIR
}
)
file
(
COPY
${
CMAKE_SOURCE_DIR
}
/test/jsonout DESTINATION
${
CMAKE_CURRENT_BINARY_DIR
}
)
file
(
COPY
${
CMAKE_SOURCE_DIR
}
/test/run_tests.sh DESTINATION
${
CMAKE_CURRENT_BINARY_DIR
}
)
SET
(
TEST_BUTIL_SOURCES
#${CMAKE_SOURCE_DIR}/test/popen_unittest.cpp
...
...
@@ -141,4 +147,3 @@ foreach(BRPC_UT ${BRPC_UNITTESTS})
add_executable
(
${
BRPC_UT_WE
}
${
BRPC_UT
}
${
PROTO_SRCS
}
)
target_link_libraries
(
${
BRPC_UT_WE
}
brpc
${
GTEST_MAIN_LIB
}
${
GPERFTOOLS_LIBRARIES
}
${
GTEST_LIB
}
)
endforeach
()
test/run_tests.sh
View file @
ed9cd826
...
...
@@ -2,7 +2,6 @@
test_num
=
0
failed_test
=
""
rc
=
0
make
-j4
test_bins
=
"test_butil test_bvar bthread*unittest brpc*unittest"
for
test_bin
in
$test_bins
;
do
test_num
=
$((
test_num
+
1
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment