<commit_before>function(swift_configure_lit_site_cfg source_path destination_path installed_name)
  if (CMAKE_CFG_INTDIR STREQUAL ".")
    set(SWIFT_BUILD_MODE ".")
  else ()
    set(SWIFT_BUILD_MODE "%(build_mode)s")
  endif ()

  string(REPLACE ${CMAKE_CFG_INTDIR} ${SWIFT_BUILD_MODE} LLVM_TOOLS_DIR ${LLVM_TOOLS_BINARY_DIR})
  string(REPLACE ${CMAKE_CFG_INTDIR} ${SWIFT_BUILD_MODE} LLVM_LIBS_DIR  ${LLVM_LIBRARY_DIR})

  if (XCODE)
    string(REPLACE ${CMAKE_CFG_INTDIR} Debug LIT_SWIFTLIB_DIR ${SWIFTLIB_DIR})
  else ()
    set(LIT_SWIFTLIB_DIR ${SWIFTLIB_DIR})
  endif ()

  configure_file("${source_path}" "${destination_path}" @ONLY)

  if(NOT "${installed_name}" STREQUAL "")
    swift_install_in_component(testsuite-tools
        FILES "${destination_path}"
        RENAME "${installed_name}"
        DESTINATION "share/swift/testsuite")
  endif()
endfunction()

function(normalize_boolean_spelling var_name)
  if(${var_name})
    set("${var_name}" TRUE PARENT_SCOPE)
  else()
    set("${var_name}" FALSE PARENT_SCOPE)
  endif()
endfunction()

function(get_test_dependencies SDK result_var_name)
  set(deps)

  if(SWIFT_BUILD_STDLIB)
    list(APPEND deps SwiftUnitTests)
  endif()

  set(deps_binaries
      swift swift-ide-test swift-syntax-test sil-opt swift-llvm-opt swift-demangle
      sil-func-extractor sil-llvm-gen sil-nm sil-passpipeline-dumper
      lldb-moduleimport-test swift-reflection-dump swift-remoteast-test
      swift-api-digester swift-refactor swift-demangle-yamldump)
  if(NOT SWIFT_BUILT_STANDALONE)
    list(APPEND deps_binaries FileCheck arcmt-test c-arcmt-test c-index-test
         clang llc llvm-cov llvm-dwarfdump llvm-link llvm-as llvm-dis
         llvm-bcanalyzer llvm-nm llvm-readobj llvm-profdata count not)<commit_msg>[CMake] Add swift-swiftsyntax-test as a dependency of check-swift if it exists<commit_after>function(swift_configure_lit_site_cfg source_path destination_path installed_name)
  if (CMAKE_CFG_INTDIR STREQUAL ".")
    set(SWIFT_BUILD_MODE ".")
  else ()
    set(SWIFT_BUILD_MODE "%(build_mode)s")
  endif ()

  string(REPLACE ${CMAKE_CFG_INTDIR} ${SWIFT_BUILD_MODE} LLVM_TOOLS_DIR ${LLVM_TOOLS_BINARY_DIR})
  string(REPLACE ${CMAKE_CFG_INTDIR} ${SWIFT_BUILD_MODE} LLVM_LIBS_DIR  ${LLVM_LIBRARY_DIR})

  if (XCODE)
    string(REPLACE ${CMAKE_CFG_INTDIR} Debug LIT_SWIFTLIB_DIR ${SWIFTLIB_DIR})
  else ()
    set(LIT_SWIFTLIB_DIR ${SWIFTLIB_DIR})
  endif ()

  configure_file("${source_path}" "${destination_path}" @ONLY)

  if(NOT "${installed_name}" STREQUAL "")
    swift_install_in_component(testsuite-tools
        FILES "${destination_path}"
        RENAME "${installed_name}"
        DESTINATION "share/swift/testsuite")
  endif()
endfunction()

function(normalize_boolean_spelling var_name)
  if(${var_name})
    set("${var_name}" TRUE PARENT_SCOPE)
  else()
    set("${var_name}" FALSE PARENT_SCOPE)
  endif()
endfunction()

function(get_test_dependencies SDK result_var_name)
  set(deps)

  if(SWIFT_BUILD_STDLIB)
    list(APPEND deps SwiftUnitTests)
  endif()

  set(deps_binaries
      swift swift-ide-test swift-syntax-test sil-opt swift-llvm-opt swift-demangle
      sil-func-extractor sil-llvm-gen sil-nm sil-passpipeline-dumper
      lldb-moduleimport-test swift-reflection-dump swift-remoteast-test
      swift-api-digester swift-refactor swift-demangle-yamldump)
  if (TARGET swift-swiftsyntax-test)
    list(APPEND deps_binaries swift-swiftsyntax-test)
  endif()
  if(NOT SWIFT_BUILT_STANDALONE)
    list(APPEND deps_binaries FileCheck arcmt-test c-arcmt-test c-index-test
         clang llc llvm-cov llvm-dwarfdump llvm-link llvm-as llvm-dis
         llvm-bcanalyzer llvm-nm llvm-readobj llvm-profdata count not)
{'fraction_non_alphanumeric': 0.10867208672086721, 'fraction_numerical': 0.0, 'mean_word_length': 4.704791344667697, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7617624', 'n_tokens_mistral': 1393, 'n_tokens_neox': 1346, 'n_words': 230}