Skip to content

Commit

Permalink
test: migrate tests to Python3 by default
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
compnerd committed Aug 18, 2020
1 parent c98d04b commit 17c8d27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/CMakeLists.txt
Expand Up @@ -351,7 +351,7 @@ _Block_release(void) { }\n")
endif()

execute_process(COMMAND
$<TARGET_FILE:Python2::Interpreter> "-c" "import psutil"
$<TARGET_FILE:Python3::Interpreter> "-c" "import psutil"
RESULT_VARIABLE python_psutil_status
TIMEOUT 1 # second
ERROR_QUIET)
Expand Down Expand Up @@ -415,7 +415,7 @@ _Block_release(void) { }\n")
${command_upload_swift_reflection_test}
${command_clean_test_results_dir}
COMMAND
$<TARGET_FILE:Python2::Interpreter> "${LIT}"
$<TARGET_FILE:Python3::Interpreter> "${LIT}"
${LIT_ARGS}
"--param" "swift_test_subset=${test_subset}"
"--param" "swift_test_mode=${test_mode}"
Expand All @@ -434,7 +434,7 @@ _Block_release(void) { }\n")
${command_upload_swift_reflection_test}
${command_clean_test_results_dir}
COMMAND
$<TARGET_FILE:Python2::Interpreter> "${LIT}"
$<TARGET_FILE:Python3::Interpreter> "${LIT}"
${LIT_ARGS}
"--param" "swift_test_subset=${test_subset}"
"--param" "swift_test_mode=${test_mode}"
Expand Down

0 comments on commit 17c8d27

Please sign in to comment.