Commit ae9e7802 authored by peng.xu's avatar peng.xu
Browse files

Merge branch 'branch-0.5.0' into 'branch-0.5.0'

format unittest code

See merge request megasearch/milvus!634

Former-commit-id: 38c8befef43f04c9c60534769d6333f57aadb8ce
parents 37e26cce 5220a393
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ add_custom_target(lint
                  --exclude_globs
                  ${LINT_EXCLUSIONS_FILE}
                  --source_dir
                  ${CMAKE_CURRENT_SOURCE_DIR}/src
                  ${CMAKE_CURRENT_SOURCE_DIR}
                  ${MILVUS_LINT_QUIET})

#
+5 −3
Original line number Diff line number Diff line
*cmake-build-debug*
*cmake-build-release*
*cmake_build*
*src/thirdparty*
*src/core/thirdparty*
*src/grpc*
*thirdparty*
*easylogging++*
*SqliteMetaImpl.cpp
*src/grpc*
*src/core*
*src/wrapper*
 No newline at end of file
+18 −13
Original line number Diff line number Diff line
@@ -99,21 +99,26 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
    # cpplint check
    make lint
    if [ $? -ne 0 ]; then
        echo "ERROR! cpplint check not pass"
        exit 1
    fi
    # clang-format check
    make check-clang-format
    if [ $? -ne 0 ]; then
        echo "ERROR! clang-format check failed"
        exit 1
    fi
    # clang-tidy check
    make check-clang-tidy
    if [ $? -ne 0 ]; then
        echo "ERROR! clang-tidy check failed"
        echo "ERROR! cpplint check failed"
        exit 1
    fi
    echo "cpplint check passed!"

#    # clang-format check
#    make check-clang-format
#    if [ $? -ne 0 ]; then
#        echo "ERROR! clang-format check failed"
#        exit 1
#    fi
#    echo "clang-format check passed!"
#
#    # clang-tidy check
#    make check-clang-tidy
#    if [ $? -ne 0 ]; then
#        echo "ERROR! clang-tidy check failed"
#        exit 1
#    fi
#    echo "clang-tidy check passed!"
else
    # compile and build
    make -j 4 || exit 1
+2 −3
Original line number Diff line number Diff line
@@ -40,9 +40,8 @@ MetaFactory::BuildOption(const std::string &path) {
    if (p == "") {
        srand(time(nullptr));
        std::stringstream ss;
        uint32_t rd = 0;
        rand_r(&rd);
        ss << "/tmp/" << rd;
        uint32_t seed = 1;
        ss << "/tmp/" << rand_r(&seed);
        p = ss.str();
    }

+2 −0
Original line number Diff line number Diff line
@@ -118,6 +118,8 @@ set(unittest_libs
        cublas
        )

include_directories(${CMAKE_CURRENT_SOURCE_DIR})
message(STATUS "CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}")
foreach(dir ${CORE_INCLUDE_DIRS})
    include_directories(${dir})
endforeach()
Loading