Updating runtest.py so that it works with Python 3#19768
Updating runtest.py so that it works with Python 3#19768tannergooding merged 1 commit intodotnet:masterfrom tannergooding:runtest-python3
Conversation
|
CC. @jashook |
tests/runtest.py
Outdated
| if host_os != "Windows_NT": | ||
| # Set executable bit | ||
| os.chmod(os.path.join(dest, item), 0774) | ||
| os.chmod(os.path.join(dest, item), 774) |
There was a problem hiding this comment.
This is the only line that doesn't modify a print call
|
The rest of the changes were |
tests/runtest.py
Outdated
|
|
||
| def print_summary(tests): | ||
| """ Print a summary of the test results | ||
| """ print(a summary of the test results |
|
@jashook, there were a couple things I missed, and then I remembered "2to3.py" existed, so I just ran the script through that instead. Validated locally that python3.7 and python2.7 both work as expected. |
| # Convert self.env to a defaultdict | ||
| self.env = defaultdict(lambda: None, self.env) | ||
| for key, value in env.iteritems(): | ||
| for key, value in env.items(): |
There was a problem hiding this comment.
Python3 removed iteritem
| print contents | ||
| print() |
There was a problem hiding this comment.
python3 won't complain about just print, but does require print() for it work as intended
|
All the changes required to support Python3 should be documented as part of the 3.0 release notes here: https://docs.python.org/3.0/whatsnew/3.0.html |
|
test Windows_NT arm64 Cross Debug Innerloop Build please |
…lix queue Port (partially) the following changes: * Build xunit wrappers the same way on windows and unix (#18695) * Update vc-runtime package to support ARM and ARM64 with current builds (#19265) * build-test - fix TestWrapper CS warnings (#19180) * Clean up build.cmd/build-test.cmd/runtest.cmd (#19291) * Use runtest.py to run tests for all platforms (#19213) * Updating runtest.py so that it works with Python 3 (#19768) * Fix build-test.sh wrapper build (#19779) * Move ARM64 Windows boxen to be Helix-provisioned (#20204) * Runtest.py on Windows Arm(64) (#20227) * Use runtest.cmd for arm(64) windows testing (#20301) * Do not restore or initialize buildtools for x86/arm64 (#20370) * Add hack for arm64/x86 to skip build tools restore (#20390) Update Xunit to 2.4.1 prerelease version Use the latest version (dbf0bf1) of tests/runtest.py
…lix queue Port (partially) the following changes: * Build xunit wrappers the same way on windows and unix (#18695) * Work around cmd command length limit in xunit Exec task (#19095) * Update vc-runtime package to support ARM and ARM64 with current builds (#19265) * build-test - fix TestWrapper CS warnings (#19180) * Clean up build.cmd/build-test.cmd/runtest.cmd (#19291) * Use runtest.py to run tests for all platforms (#19213) * Updating runtest.py so that it works with Python 3 (#19768) * Fix build-test.sh wrapper build (#19779) * Move ARM64 Windows boxen to be Helix-provisioned (#20204) * Runtest.py on Windows Arm(64) (#20227) * Use runtest.cmd for arm(64) windows testing (#20301) * Do not restore or initialize buildtools for x86/arm64 (#20370) * Add hack for arm64/x86 to skip build tools restore (#20390) Update Xunit to 2.4.1 prerelease version Use the latest version (dbf0bf1) of tests/runtest.py
…lix queue Port (partially) the following changes: * Build xunit wrappers the same way on windows and unix (#18695) * Work around cmd command length limit in xunit Exec task (#19095) * Update vc-runtime package to support ARM and ARM64 with current builds (#19265) * build-test - fix TestWrapper CS warnings (#19180) * Clean up build.cmd/build-test.cmd/runtest.cmd (#19291) * Use runtest.py to run tests for all platforms (#19213) * Updating runtest.py so that it works with Python 3 (#19768) * Fix build-test.sh wrapper build (#19779) * Move ARM64 Windows boxen to be Helix-provisioned (#20204) * Runtest.py on Windows Arm(64) (#20227) * Use runtest.cmd for arm(64) windows testing (#20301) * Do not restore or initialize buildtools for x86/arm64 (#20370) * Add hack for arm64/x86 to skip build tools restore (#20390) Update Xunit to 2.4.1 prerelease version Use the latest version (dbf0bf1) of tests/runtest.py
…lix queue Port (partially) the following changes: * Build xunit wrappers the same way on windows and unix (#18695) * Work around cmd command length limit in xunit Exec task (#19095) * Update vc-runtime package to support ARM and ARM64 with current builds (#19265) * build-test - fix TestWrapper CS warnings (#19180) * Clean up build.cmd/build-test.cmd/runtest.cmd (#19291) * Use runtest.py to run tests for all platforms (#19213) * Updating runtest.py so that it works with Python 3 (#19768) * Fix build-test.sh wrapper build (#19779) * Move ARM64 Windows boxen to be Helix-provisioned (#20204) * Runtest.py on Windows Arm(64) (#20227) * Use runtest.cmd for arm(64) windows testing (#20301) * Do not restore or initialize buildtools for x86/arm64 (#20370) * Add hack for arm64/x86 to skip build tools restore (#20390) Update Xunit to 2.4.1 prerelease version Use the latest version (dbf0bf1) of tests/runtest.py
#19213 updated runtest.cmd to start calling runtest.py on Windows. For users which only have python 3 installed, this broke the ability to run tests.
This updates the runtest.py file so that it works under Python 3.