@@ -1954,6 +1954,21 @@ for host in "${ALL_HOSTS[@]}"; do
1954
1954
-DSWIFT_RUNTIME_ENABLE_LEAK_CHECKER:BOOL=$( true_false " ${SWIFT_RUNTIME_ENABLE_LEAK_CHECKER} " )
1955
1955
)
1956
1956
1957
+ if [[ " ${TEST_PATHS} " ]]; then
1958
+ build_dir=$( build_directory ${host} " swift" )
1959
+
1960
+ test_paths=()
1961
+ for path in ${TEST_PATHS} ; do
1962
+ test_paths+=(
1963
+ " ${build_dir} /$( echo ${path} | sed -E " s/^(validation-test|test)/\1-${host} /" ) "
1964
+ )
1965
+ done
1966
+
1967
+ swift_cmake_options=(
1968
+ " ${swift_cmake_options[@]} "
1969
+ -DSWIFT_LIT_TEST_PATHS=" ${test_paths} " )
1970
+ fi
1971
+
1957
1972
if [[ " ${SKIP_TEST_SOURCEKIT} " ]] ; then
1958
1973
swift_cmake_options=(
1959
1974
" ${swift_cmake_options[@]} "
@@ -3174,43 +3189,12 @@ for host in "${ALL_HOSTS[@]}"; do
3174
3189
trap " tests_busted ${product} '(${target} )'" ERR
3175
3190
3176
3191
test_target=" $target "
3177
- test_paths=()
3178
-
3179
- if [[ ${test_target} == check-swift* ]]; then
3180
- if [[ " ${TEST_PATHS} " ]]; then
3181
- test_target=" ${test_target} -custom"
3182
- for path in ${TEST_PATHS} ; do
3183
- test_paths+=(
3184
- " ${build_dir} /$( echo ${path} | sed -E " s/^(validation-test|test)/\1-${host} /" ) "
3185
- )
3186
- done
3187
- fi
3192
+ if [[ ${test_target} == check-swift* ]] && [[ " ${TEST_PATHS} " ]]; then
3193
+ test_target=" ${test_target} -custom"
3188
3194
fi
3189
3195
3190
- # NOTE: In dry-run mode, build_dir might not exist yet. In that
3191
- # case, -n query will fail. So, in dry-run mode,
3192
- # we don't expand test script.
3193
- if [[ ! " ${DRY_RUN} " && " ${CMAKE_GENERATOR} " == Ninja ]] && ! ( " ${build_cmd[@]} " --version 2>&1 | grep -i -q llbuild ) && [[ -z " ${DISTCC_PUMP} " ]]; then
3194
- # Ninja buffers command output to avoid scrambling the output
3195
- # of parallel jobs, which is awesome... except that it
3196
- # interferes with the progress meter when testing. Instead of
3197
- # executing ninja directly, have it dump the commands it would
3198
- # run, strip Ninja's progress prefix with sed, and tell the
3199
- # shell to execute that.
3200
- # However, if we do this in a subshell in the ``sh -e -x -c`` line,
3201
- # errors in the command will not stop the script as they should.
3202
- echo " Generating dry run test command from: ${build_cmd[@]} -n -v ${test_target} "
3203
- dry_run_command_output=" $( ${build_cmd[@]} -n -v ${test_target} | sed -e ' s/[^]]*] //' ) "
3204
- echo " Test command: ${dry_run_command_output} "
3205
-
3206
- if [[ ! " ${test_paths} " ]]; then
3207
- env bash -ex <( echo -e " ${dry_run_command_output} " )
3208
- else
3209
- env bash -ex <( echo -e " ${dry_run_command_output} " " ${test_paths[@]} " )
3210
- fi
3211
- else
3212
- call " ${build_cmd[@]} " ${BUILD_TARGET_FLAG} ${test_target}
3213
- fi
3196
+ call " ${build_cmd[@]} " ${BUILD_TARGET_FLAG} ${test_target}
3197
+
3214
3198
echo " -- ${target} finished --"
3215
3199
fi
3216
3200
done
0 commit comments