Add basic test skeleton

This commit is contained in:
Tyler Neely 2022-07-04 11:56:41 +00:00
parent cb70431301
commit 6cec9acbb9
3 changed files with 46 additions and 0 deletions

View File

@ -10,6 +10,9 @@ add_subdirectory(stress)
# concurrent test binaries
add_subdirectory(concurrent)
# simulation test binaries
add_subdirectory(simulation)
# manual test binaries
add_subdirectory(manual)

View File

@ -0,0 +1,23 @@
set(test_prefix memgraph__simulation__)
find_package(gflags)
add_custom_target(memgraph__simulation)
function(add_simulation_test test_cpp)
# get exec name (remove extension from the abs path)
get_filename_component(exec_name ${test_cpp} NAME_WE)
set(target_name ${test_prefix}${exec_name})
add_executable(${target_name} ${test_cpp})
# OUTPUT_NAME sets the real name of a target when it is built and can be
# used to help create two targets of the same name even though CMake
# requires unique logical target names
set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${exec_name})
target_link_libraries(${target_name} gtest gmock gtest_main)
# register test
add_test(${target_name} ${exec_name})
add_dependencies(memgraph__simulation ${target_name})
endfunction(add_simulation_test)
add_simulation_test(basic_request.cpp)
target_link_libraries(${test_prefix}basic_request mg-utils mg-io-v3)

View File

@ -0,0 +1,20 @@
// Copyright 2022 Memgraph Ltd.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
// License, and you may not use this file except in compliance with the Business Source License.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.
//#include <gtest/gtest.h>
#include "io/v3/transport.hpp"
#include "utils/logging.hpp"
int main() {
MG_ASSERT(true);
return 0;
}