Make Visual Studio 2017 Community Edition work w/ GYP.

Change-Id: I474dcb1c5f6dea03a5b82af62f90b28e9b9cfbb9
Reviewed-on: https://chromium-review.googlesource.com/c/1358041
Reviewed-by: Mark Mentovai <mark@chromium.org>
diff --git a/test/lib/TestGyp.py b/test/lib/TestGyp.py
index 626476c..2b88f7b 100644
--- a/test/lib/TestGyp.py
+++ b/test/lib/TestGyp.py
@@ -790,8 +790,16 @@
   @staticmethod
   def _ComputeVsvarsPath(devenv_path):
     devenv_dir = os.path.split(devenv_path)[0]
-    vsvars_path = os.path.join(devenv_path, '../../Tools/vsvars32.bat')
-    return vsvars_path
+
+    # Check for location of Community install (in VS2017, at least).
+    vcvars_path = os.path.join(devenv_path, '..', '..', '..', '..', 'VC',
+                               'Auxiliary', 'Build', 'vcvars32.bat')
+    if os.path.exists(vcvars_path):
+      return os.path.abspath(vcvars_path)
+
+    vsvars_path = os.path.join(devenv_path, '..', '..', 'Tools',
+                               'vsvars32.bat')
+    return os.path.abspath(vsvars_path)
 
   def initialize_build_tool(self):
     super(TestGypOnMSToolchain, self).initialize_build_tool()