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
6b83a5d8
Commit
6b83a5d8
authored
Sep 30, 2018
by
gejun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only turn on O2 for baidu_time_test.cpp to speed up compilation of UT
parent
89ec1d22
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
Makefile
test/Makefile
+5
-1
baidu_time_unittest.cpp
test/baidu_time_unittest.cpp
+1
-1
brpc_hpack_unittest.cpp
test/brpc_hpack_unittest.cpp
+0
-4
No files found.
test/Makefile
View file @
6b83a5d8
...
...
@@ -2,7 +2,7 @@ NEED_GPERFTOOLS=1
NEED_GTEST
=
1
include
../config.mk
CPPFLAGS
+=
-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
sstream_workaround.h
CXXFLAGS
=
$(CPPFLAGS)
-
O2
-
pipe
-Wall
-W
-fPIC
-fstrict-aliasing
-Wno-invalid-offsetof
-Wno-unused-parameter
-fno-omit-frame-pointer
-std
=
c++0x
CXXFLAGS
=
$(CPPFLAGS)
-pipe
-Wall
-W
-fPIC
-fstrict-aliasing
-Wno-invalid-offsetof
-Wno-unused-parameter
-fno-omit-frame-pointer
-std
=
c++0x
#required by butil/crc32.cc to boost performance for 10x
ifeq
($(shell
test
$(GCC_VERSION)
-ge
40400;
echo
$$?),0)
...
...
@@ -200,6 +200,10 @@ endif
@
echo
"Generating
$@
"
@
$(PROTOC)
--cpp_out
=
.
--proto_path
=
.
--proto_path
=
../src
--proto_path
=
$(PROTOBUF_HDR)
$<
baidu_time_unittest.o
:
baidu_time_unittest.cpp | libbrpc.dbg.a
@
echo
"Compiling
$@
"
@
$(CXX)
-c
$(HDRPATHS)
-O2
$(CXXFLAGS)
$<
-o
$@
%.o
:
%.cpp | libbrpc.dbg.a
@
echo
"Compiling
$@
"
@
$(CXX)
-c
$(HDRPATHS)
$(CXXFLAGS)
$<
-o
$@
...
...
test/baidu_time_unittest.cpp
View file @
6b83a5d8
...
...
@@ -198,4 +198,4 @@ TEST(BaiduTimeTest, timer_auto_start) {
printf
(
"Cost %"
PRId64
"us
\n
"
,
t
.
u_elapsed
());
}
}
}
// namespace
test/brpc_hpack_unittest.cpp
View file @
6b83a5d8
...
...
@@ -12,10 +12,6 @@ class HPackTest : public testing::Test {
// Copied test cases from example of rfc7541
TEST_F
(
HPackTest
,
header_with_indexing
)
{
char
c
=
128
;
uint8_t
c2
=
c
;
printf
(
"%u %u %d %d
\n
"
,
(
uint32_t
)
c
,
(
uint32_t
)
c2
,
(
int
)
c
,
(
int
)
c2
);
brpc
::
HPacker
p1
;
ASSERT_EQ
(
0
,
p1
.
Init
(
4096
));
brpc
::
HPacker
p2
;
...
...
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