Build and package TestHarness

This commit is contained in:
mpilman 2020-03-25 17:36:47 -07:00
parent bb5799bd20
commit ce6c4cb8d8
6 changed files with 47 additions and 3 deletions

View File

@ -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)

View File

@ -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()

5
contrib/CMakeLists.txt Normal file
View File

@ -0,0 +1,5 @@
if(NOT WIN32)
add_subdirectory(monitoring)
add_subdirectory(TraceLogHelper)
add_subdirectory(TestHarness)
endif()

View File

@ -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)

View File

@ -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)

View File

@ -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()