Skip to content

Generate scripts for component-wise lit invocations #30673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ function(get_test_dependencies SDK result_var_name)
set("${result_var_name}" "${deps}" PARENT_SCOPE)
endfunction()

function (write_component_test_script test_bin_dir component_name)
string(REPLACE ";" " " args "${LIT_ARGS}")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/../utils/test-scripts-template.sh
${test_bin_dir}/../test/check-swift-${component_name}.sh
)
endfunction()

set(LIT "${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py")

# Incremental mode in lit orders test files by the last modification time
Expand Down Expand Up @@ -434,6 +442,11 @@ _Block_release(void) { }\n")
PROPERTY FOLDER "Tests/check-swift")
endforeach()
endforeach()
if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
write_component_test_script("${test_bin_dir}" "irgen")
write_component_test_script("${test_bin_dir}" "silgen")
write_component_test_script("${test_bin_dir}" "sema")
endif()
endforeach()
endforeach()
endforeach()
Expand Down
5 changes: 5 additions & 0 deletions utils/test-scripts-template.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
${PYTHON_EXECUTABLE} ${LIT} \
${args} \
${test_bin_dir}/ \
--filter=${component_name}