2016-09-13 11:56:42 +03:00
|
|
|
cmake_minimum_required(VERSION 3.4)
|
|
|
|
project(Server CXX)
|
|
|
|
|
|
|
|
find_package(PythonInterp REQUIRED)
|
|
|
|
|
|
|
|
macro(do_test bsname file)
|
|
|
|
execute_process(COMMAND ${PYTHON_EXECUTABLE}
|
|
|
|
"${CMAKE_SOURCE_DIR}/server-test.py"
|
|
|
|
"${CMAKE_COMMAND}"
|
|
|
|
"${CMAKE_SOURCE_DIR}/${file}"
|
|
|
|
"${CMAKE_SOURCE_DIR}"
|
|
|
|
"${CMAKE_BINARY_DIR}"
|
|
|
|
RESULT_VARIABLE test_result
|
|
|
|
)
|
|
|
|
|
|
|
|
if (NOT test_result EQUAL 0)
|
|
|
|
message(SEND_ERROR "TEST FAILED")
|
|
|
|
endif()
|
|
|
|
endmacro()
|
|
|
|
|
|
|
|
do_test("test_handshake" "tc_handshake.json")
|
2016-09-09 11:01:45 +03:00
|
|
|
do_test("test_globalSettings" "tc_globalSettings.json")
|
2016-09-13 11:56:42 +03:00
|
|
|
|
|
|
|
add_executable(Server empty.cpp)
|