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
624e43d6
Commit
624e43d6
authored
Dec 29, 2017
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test_bvar
parent
ed9cd826
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
146 additions
and
7 deletions
+146
-7
build_in_travis_ci.sh
build_in_travis_ci.sh
+8
-5
CMakeLists.txt
test/CMakeLists.txt
+138
-2
No files found.
build_in_travis_ci.sh
View file @
624e43d6
...
...
@@ -26,14 +26,17 @@ fi
echo
"start building by cmake"
rm
-rf
build
&&
mkdir
build
&&
cd
build
if
!
cmake
-DBRPC_DEBUG
=
OFF
-DBUILD_EXAMPLE
=
ON
-DBUILD_UNIT_TESTS
=
ON ..
;
then
echo
"Fail to generate Makefile by cmake"
exit
1
fi
if
[
"
$PURPOSE
"
=
"compile"
]
;
then
if
!
cmake
-DBRPC_DEBUG
=
OFF
-DBUILD_EXAMPLE
=
ON
-DBUILD_UNIT_TESTS
=
OFF ..
;
then
echo
"Fail to generate Makefile by cmake"
exit
1
fi
make
-j4
elif
[
"
$PURPOSE
"
=
"unittest"
]
;
then
if
!
cmake
-DBRPC_DEBUG
=
OFF
-DBUILD_EXAMPLE
=
OFF
-DBUILD_UNIT_TESTS
=
ON ..
;
then
echo
"Fail to generate Makefile by cmake"
exit
1
fi
make
-j4
&&
cd test
&&
sh ./run_tests.sh
&&
cd
../
else
echo
"Unknown purpose=
\"
$PURPOSE
\"
"
...
...
test/CMakeLists.txt
View file @
624e43d6
...
...
@@ -126,10 +126,146 @@ SET(TEST_BUTIL_SOURCES
${
CMAKE_SOURCE_DIR
}
/test/butil_unittest_main.cpp
${
CMAKE_SOURCE_DIR
}
/test/butil_unittest_main.cpp
)
set
(
BUTIL_SOURCES
${
CMAKE_SOURCE_DIR
}
/src/butil/third_party/dmg_fp/g_fmt.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/third_party/dmg_fp/dtoa_wrapper.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/third_party/dynamic_annotations/dynamic_annotations.c
${
CMAKE_SOURCE_DIR
}
/src/butil/third_party/icu/icu_utf.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/third_party/superfasthash/superfasthash.c
${
CMAKE_SOURCE_DIR
}
/src/butil/third_party/modp_b64/modp_b64.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/third_party/nspr/prtime.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/third_party/symbolize/demangle.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/third_party/symbolize/symbolize.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/third_party/snappy/snappy-sinksource.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/third_party/snappy/snappy-stubs-internal.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/third_party/snappy/snappy.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/third_party/murmurhash3/murmurhash3.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/arena.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/at_exit.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/atomicops_internals_x86_gcc.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/base64.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/big_endian.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/cpu.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/debug/alias.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/debug/asan_invalid_access.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/debug/crash_logging.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/debug/debugger.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/debug/debugger_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/debug/dump_without_crashing.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/debug/proc_maps_linux.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/debug/stack_trace.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/debug/stack_trace_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/environment.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/files/file.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/files/file_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/files/file_enumerator.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/files/file_enumerator_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/files/file_path.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/files/file_path_constants.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/files/memory_mapped_file.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/files/memory_mapped_file_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/files/scoped_file.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/files/scoped_temp_dir.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/file_util.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/file_util_linux.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/file_util_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/guid.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/guid_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/hash.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/lazy_instance.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/location.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/md5.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/memory/aligned_memory.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/memory/ref_counted.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/memory/ref_counted_memory.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/memory/singleton.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/memory/weak_ptr.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/posix/file_descriptor_shuffle.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/posix/global_descriptors.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/rand_util.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/rand_util_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/fast_rand.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/safe_strerror_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/sha1_portable.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/strings/latin1_string_conversions.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/strings/nullable_string16.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/strings/safe_sprintf.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/strings/string16.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/strings/string_number_conversions.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/strings/string_split.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/strings/string_piece.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/strings/string_util.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/strings/string_util_constants.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/strings/stringprintf.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/strings/sys_string_conversions_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/strings/utf_offset_string_conversions.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/strings/utf_string_conversion_utils.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/strings/utf_string_conversions.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/synchronization/cancellation_flag.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/synchronization/condition_variable_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/synchronization/waitable_event_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/threading/non_thread_safe_impl.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/threading/platform_thread_linux.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/threading/platform_thread_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/threading/simple_thread.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/threading/thread_checker_impl.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/threading/thread_collision_warner.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/threading/thread_id_name_manager.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/threading/thread_local_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/threading/thread_local_storage.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/threading/thread_local_storage_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/threading/thread_restrictions.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/threading/watchdog.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/time/clock.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/time/default_clock.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/time/default_tick_clock.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/time/tick_clock.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/time/time.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/time/time_posix.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/version.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/logging.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/class_name.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/errno.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/find_cstr.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/status.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/string_printf.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/thread_local.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/unix_socket.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/endpoint.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/fd_utility.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/files/temp_file.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/files/file_watcher.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/time.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/zero_copy_stream_as_streambuf.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/crc32c.cc
${
CMAKE_SOURCE_DIR
}
/src/butil/containers/case_ignored_flat_map.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/iobuf.cpp
${
CMAKE_SOURCE_DIR
}
/src/butil/popen.cpp
)
set
(
BVAR_SOURCES1
${
CMAKE_SOURCE_DIR
}
/src/bvar/collector.cpp
${
CMAKE_SOURCE_DIR
}
/src/bvar/gflag.cpp
${
CMAKE_SOURCE_DIR
}
/src/bvar/latency_recorder.cpp
${
CMAKE_SOURCE_DIR
}
/src/bvar/variable.cpp
)
aux_source_directory
(
${
CMAKE_SOURCE_DIR
}
/src/bvar/detail BVAR_SOURCES2
)
file
(
GLOB TEST_BVAR_SRCS
"bvar_*_unittest.cpp"
)
add_executable
(
test_bvar
${
TEST_BVAR_SRCS
}
${
PROTO_SRCS
}
)
target_link_libraries
(
test_bvar brpc
${
GTEST_LIB
}
${
GPERFTOOLS_LIBRARIES
}
)
add_executable
(
test_bvar
${
BUTIL_SOURCES
}
${
BVAR_SOURCES1
}
${
BVAR_SOURCES2
}
${
TEST_BVAR_SRCS
}
)
target_link_libraries
(
test_bvar
${
PROTOBUF_LIBRARIES
}
${
GTEST_LIB
}
${
GPERFTOOLS_LIBRARIES
}
${
GFLAGS_LIBRARY
}
${
PROTOC_LIB
}
rt
ssl
crypto
dl
z
)
add_executable
(
test_butil
${
TEST_BUTIL_SOURCES
}
${
PROTO_SRCS
}
)
target_link_libraries
(
test_butil brpc
${
GTEST_LIB
}
)
...
...
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