summaryrefslogtreecommitdiffstats
path: root/Tests/Server/CMakeLists.txt
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2016-09-13 08:56:42 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-19 12:57:58 (GMT)
commitb63c1f6ce75d82028efc364cff8277c77854dcc3 (patch)
tree045e5c49c6a0193c5d74ff888b59d0555d1921ce /Tests/Server/CMakeLists.txt
parentd341d077c5fb5c3df3732210b836a9ba6cb53873 (diff)
downloadCMake-b63c1f6ce75d82028efc364cff8277c77854dcc3.zip
CMake-b63c1f6ce75d82028efc364cff8277c77854dcc3.tar.gz
CMake-b63c1f6ce75d82028efc364cff8277c77854dcc3.tar.bz2
cmake-server: Add unit test
Diffstat (limited to 'Tests/Server/CMakeLists.txt')
-rw-r--r--Tests/Server/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/Tests/Server/CMakeLists.txt b/Tests/Server/CMakeLists.txt
new file mode 100644
index 0000000..8daf12a
--- /dev/null
+++ b/Tests/Server/CMakeLists.txt
@@ -0,0 +1,23 @@
+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")
+
+add_executable(Server empty.cpp)