Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Test & Build
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest, windows-2022]
python-version: ["3.11"]
include:
- os: ubuntu-latest
Expand Down
17 changes: 12 additions & 5 deletions tests/test_source_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,16 @@ def test_config_shorthand(self):

@needs_cygwin
def test_vstoolset_set(self):
# n.b. This test will need to be updated from time to time:
# AUTOBUILD_VSVER is validated against the Visual Studio versions
# installed on the host system.
with envvar("AUTOBUILD_VSVER", "170"):
# Dynamically discover the latest installed Visual Studio version so
# this test keeps working when the runner image ships a newer VS.
available = atse._available_vsvers()
if not available:
self.skipTest("No Visual Studio install detected")
latest_vsver = available[-1]
major = latest_vsver[:-1]
expected_toolset = atse._VSTOOLSETS.get(major)
if expected_toolset is None:
self.skipTest("No toolset mapping for VS major version %s" % major)
with envvar("AUTOBUILD_VSVER", latest_vsver):
vars = self.read_variables(self.find_data("empty"))
self.assertEqual(vars["AUTOBUILD_WIN_VSTOOLSET"], "v143")
self.assertEqual(vars["AUTOBUILD_WIN_VSTOOLSET"], expected_toolset)
Loading