Skip to content

Commit 17c8d27

Browse files
committed
test: migrate tests to Python3 by default
This changes the python interpreter used to invoke the tests to Python3. Python2 has been EOL'ed by the Python Software Foundation. This migration enables the Swift test suite to run with Python 3 instead.
1 parent c98d04b commit 17c8d27

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ _Block_release(void) { }\n")
351351
endif()
352352

353353
execute_process(COMMAND
354-
$<TARGET_FILE:Python2::Interpreter> "-c" "import psutil"
354+
$<TARGET_FILE:Python3::Interpreter> "-c" "import psutil"
355355
RESULT_VARIABLE python_psutil_status
356356
TIMEOUT 1 # second
357357
ERROR_QUIET)
@@ -415,7 +415,7 @@ _Block_release(void) { }\n")
415415
${command_upload_swift_reflection_test}
416416
${command_clean_test_results_dir}
417417
COMMAND
418-
$<TARGET_FILE:Python2::Interpreter> "${LIT}"
418+
$<TARGET_FILE:Python3::Interpreter> "${LIT}"
419419
${LIT_ARGS}
420420
"--param" "swift_test_subset=${test_subset}"
421421
"--param" "swift_test_mode=${test_mode}"
@@ -434,7 +434,7 @@ _Block_release(void) { }\n")
434434
${command_upload_swift_reflection_test}
435435
${command_clean_test_results_dir}
436436
COMMAND
437-
$<TARGET_FILE:Python2::Interpreter> "${LIT}"
437+
$<TARGET_FILE:Python3::Interpreter> "${LIT}"
438438
${LIT_ARGS}
439439
"--param" "swift_test_subset=${test_subset}"
440440
"--param" "swift_test_mode=${test_mode}"

0 commit comments

Comments
 (0)