diff options
author | robot-ya-builder <robot-ya-builder@yandex-team.com> | 2023-08-14 09:22:28 +0300 |
---|---|---|
committer | robot-ya-builder <robot-ya-builder@yandex-team.com> | 2023-08-14 09:57:51 +0300 |
commit | 5dddb98273c83176cf673fd86e6697885e5b9a10 (patch) | |
tree | 6d8b5fc6087b470c6ae996d580461728f19d0c51 | |
parent | 7efa0b7b4882d475f9ba51d8a5ac38d6f1c88d2b (diff) | |
download | ydb-5dddb98273c83176cf673fd86e6697885e5b9a10.tar.gz |
External build system generator release 46
Update tools: yexport
-rw-r--r-- | build/external_resources/yexport/resources.json | 2 | ||||
-rw-r--r-- | cmake/common.cmake | 16 |
2 files changed, 15 insertions, 3 deletions
diff --git a/build/external_resources/yexport/resources.json b/build/external_resources/yexport/resources.json index d7a97d579c..125e8f27af 100644 --- a/build/external_resources/yexport/resources.json +++ b/build/external_resources/yexport/resources.json @@ -1,7 +1,7 @@ { "by_platform": { "linux": { - "uri": "sbr:4902977412" + "uri": "sbr:4913764847" } } } diff --git a/cmake/common.cmake b/cmake/common.cmake index 2f266468ac..49ff984d9c 100644 --- a/cmake/common.cmake +++ b/cmake/common.cmake @@ -257,16 +257,28 @@ function(add_yunittest) "${multival_args}" ${ARGN} ) - get_property(SPLIT_FACTOR TARGET ${YUNITTEST_ARGS_TEST_TARGET} PROPERTY SPLIT_FACTOR) + + get_property(SPLIT_FACTOR TARGET ${YUNITTEST_ARGS_TEST_TARGET} PROPERTY SPLIT_FACTOR) + get_property(SPLIT_TYPE TARGET ${YUNITTEST_ARGS_TEST_TARGET} PROPERTY SPLIT_TYPE) + + if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/run_testpack") + add_test(NAME ${YUNITTEST_ARGS_NAME} COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/run_testpack" ${YUNITTEST_ARGS_TEST_ARG}) + set_property(TEST ${YUNITTEST_ARGS_NAME} PROPERTY ENVIRONMENT "source_root=${CMAKE_SOURCE_DIR};build_root=${CMAKE_BINARY_DIR};test_split_factor=${SPLIT_FACTOR};test_split_type=${SPLIT_TYPE}") + return() + endif() + if (${SPLIT_FACTOR} EQUAL 1) add_test(NAME ${YUNITTEST_ARGS_NAME} COMMAND ${YUNITTEST_ARGS_TEST_TARGET} ${YUNITTEST_ARGS_TEST_ARG}) return() endif() + if ("${SPLIT_TYPE}") + set(FORK_MODE_ARG --fork-mode ${SPLIT_TYPE}) + endif() math(EXPR LastIdx "${SPLIT_FACTOR} - 1") foreach(Idx RANGE ${LastIdx}) add_test(NAME ${YUNITTEST_ARGS_NAME}_${Idx} - COMMAND Python3::Interpreter ${CMAKE_SOURCE_DIR}/build/scripts/split_unittest.py --split-factor ${SPLIT_FACTOR} --shard ${Idx} + COMMAND Python3::Interpreter ${CMAKE_SOURCE_DIR}/build/scripts/split_unittest.py --split-factor ${SPLIT_FACTOR} ${FORK_MODE_ARG} --shard ${Idx} $<TARGET_FILE:${YUNITTEST_ARGS_TEST_TARGET}> ${YUNITTEST_ARGS_TEST_ARG}) endforeach() endfunction() |