From e1ac46dd43870955dab3fda6135e6d1890e01bd3 Mon Sep 17 00:00:00 2001 From: Sean Brogan Date: Wed, 12 Jan 2022 19:39:29 -0800 Subject: [PATCH] Add support for locating VS2022 (#145) --- edk2toollib/windows/locate_tools.py | 2 +- edk2toollib/windows/locate_tools_test.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/edk2toollib/windows/locate_tools.py b/edk2toollib/windows/locate_tools.py index bfed8f9f..b949550a 100644 --- a/edk2toollib/windows/locate_tools.py +++ b/edk2toollib/windows/locate_tools.py @@ -41,7 +41,7 @@ # Supported Versions that can be queried with vswhere # Use lower case for key as all comparisons will be lower case # -supported_vs_versions = {"vs2017": "15.0,16.0", "vs2019": "16.0,17.0"} +supported_vs_versions = {"vs2017": "15.0,16.0", "vs2019": "16.0,17.0", "vs2022": "17.0,18.0"} # Downloads VSWhere diff --git a/edk2toollib/windows/locate_tools_test.py b/edk2toollib/windows/locate_tools_test.py index 70563993..db8cbf5e 100644 --- a/edk2toollib/windows/locate_tools_test.py +++ b/edk2toollib/windows/locate_tools_test.py @@ -46,6 +46,12 @@ def test_FindwithVsWhereVs2019(self): self.assertEqual(ret, 0, "Return code should be zero") # not checking the result as no need to depend on machine state + @unittest.skipUnless(sys.platform.startswith("win"), "requires Windows") + def test_FindwithVsWhereVs2022(self): + ret, star_prod = locate_tools.FindWithVsWhere(vs_version="vs2022") + self.assertEqual(ret, 0, "Return code should be zero") + # not checking the result as no need to depend on machine state + @unittest.skipUnless(sys.platform.startswith("win"), "requires Windows") def test_FindWithVsWhereVs2015(self): ret, star_prod = locate_tools.FindWithVsWhere(vs_version="vs2015")