Build and package TestHarness
This commit is contained in:
parent
bb5799bd20
commit
ce6c4cb8d8
|
@ -193,11 +193,11 @@ if(WITH_PYTHON)
|
|||
add_subdirectory(bindings)
|
||||
endif()
|
||||
add_subdirectory(fdbbackup)
|
||||
add_subdirectory(contrib)
|
||||
add_subdirectory(tests)
|
||||
if(WITH_DOCUMENTATION)
|
||||
add_subdirectory(documentation)
|
||||
endif()
|
||||
add_subdirectory(contrib/monitoring)
|
||||
|
||||
if(WIN32)
|
||||
add_subdirectory(packaging/msi)
|
||||
|
|
|
@ -189,10 +189,12 @@ function(create_test_package)
|
|||
OUTPUT ${tar_file}
|
||||
DEPENDS ${out_files}
|
||||
COMMAND ${CMAKE_COMMAND} -E tar cfz ${tar_file} ${CMAKE_BINARY_DIR}/packages/bin/fdbserver
|
||||
${CMAKE_BINARY_DIR}/packages/bin/TestHarness.exe
|
||||
${CMAKE_BINARY_DIR}/packages/bin/TraceLogHelper.dll
|
||||
${out_files} ${external_files}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/packages
|
||||
COMMENT "Package correctness archive"
|
||||
)
|
||||
add_custom_target(package_tests DEPENDS ${tar_file})
|
||||
add_dependencies(package_tests strip_fdbserver)
|
||||
add_dependencies(package_tests strip_fdbserver TestHarness)
|
||||
endfunction()
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
if(NOT WIN32)
|
||||
add_subdirectory(monitoring)
|
||||
add_subdirectory(TraceLogHelper)
|
||||
add_subdirectory(TestHarness)
|
||||
endif()
|
|
@ -0,0 +1,17 @@
|
|||
set(SRCS
|
||||
Program.cs
|
||||
Properties/AssemblyInfo.cs)
|
||||
|
||||
set(TEST_HARNESS_REFERENCES
|
||||
"-r:System,System.Core,System.Xml.Linq,System.Data.DataSetExtensions,Microsoft.CSharp,System.Data,System.Xml,${TraceLogHelperDll}")
|
||||
|
||||
set(out_file ${CMAKE_BINARY_DIR}/packages/bin/TestHarness.exe)
|
||||
|
||||
add_custom_command(OUTPUT ${out_file}
|
||||
COMMAND ${MCS_EXECUTABLE} ARGS ${TEST_HARNESS_REFERENCES} ${SRCS} "-target:exe" "-out:${out_file}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS ${SRCS}
|
||||
COMMENT "Compile TestHarness" VERBATIM)
|
||||
add_custom_target(TestHarness DEPENDS ${out_file})
|
||||
add_dependencies(TestHarness TraceLogHelper)
|
||||
set(TestHarnesExe "${out_file}" PARENT_SCOPE)
|
|
@ -0,0 +1,20 @@
|
|||
set(SRCS
|
||||
Event.cs
|
||||
JsonParser.cs
|
||||
Properties/AssemblyInfo.cs
|
||||
TraceLogUtil.cs
|
||||
XmlParser.cs)
|
||||
|
||||
set(TRACE_LOG_HELPER_REFERENCES
|
||||
"-r:System,System.Core,System.Runtime.Serialization,System.Xml.Linq,System.Data.DataSetExtensions,Microsoft.CSharp,System.Data,System.Xml")
|
||||
|
||||
|
||||
set(out_file ${CMAKE_BINARY_DIR}/packages/bin/TraceLogHelper.dll)
|
||||
|
||||
add_custom_command(OUTPUT ${out_file}
|
||||
COMMAND ${MCS_EXECUTABLE} ARGS ${TRACE_LOG_HELPER_REFERENCES} ${SRCS} "-target:library" "-out:${out_file}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS ${SRCS}
|
||||
COMMENT "Compile TraceLogHelper" VERBATIM)
|
||||
add_custom_target(TraceLogHelper DEPENDS ${out_file})
|
||||
set(TraceLogHelperDll "${out_file}" PARENT_SCOPE)
|
|
@ -226,7 +226,7 @@ if(WITH_PYTHON)
|
|||
|
||||
|
||||
verify_testing()
|
||||
if (NOT OPEN_FOR_IDE)
|
||||
if (NOT OPEN_FOR_IDE AND NOT WIN32)
|
||||
create_test_package()
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue