use grpc_csharp_ext built by cmake
diff --git a/tools/run_tests/helper_scripts/pre_build_csharp.bat b/tools/run_tests/helper_scripts/pre_build_csharp.bat
index 139955d..f37f63b 100644
--- a/tools/run_tests/helper_scripts/pre_build_csharp.bat
+++ b/tools/run_tests/helper_scripts/pre_build_csharp.bat
@@ -31,9 +31,21 @@
setlocal
+set ARCHITECTURE=%1
+
@rem enter repo root
cd /d %~dp0\..\..\..
+mkdir cmake
+cd cmake
+mkdir build
+cd build
+mkdir %ARCHITECTURE%
+cd %ARCHITECTURE%
+@rem TODO(jtattermusch): Stop hardcoding path to yasm once Jenkins workers can locate yasm correctly
+cmake -G "Visual Studio 14 2015" -A %ARCHITECTURE% -DgRPC_BUILD_TESTS=OFF -DCMAKE_ASM_NASM_COMPILER="C:/Program Files (x86)/yasm/yasm.exe" ../../.. || goto :error
+cd ..\..\..
+
@rem Location of nuget.exe
set NUGET=C:\nuget\nuget.exe
@@ -42,7 +54,6 @@
@rem Restore Grpc packages by packages since Nuget client 3.4.4 doesnt support restore
@rem by solution
@rem Moving into each directory to let the restores work based on per-project packages.config files
- %NUGET% restore vsprojects/grpc_csharp_ext.sln || goto :error
cd src/csharp
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 75571aa..7f06632 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -722,12 +722,10 @@
self.config = config
self.args = args
if self.platform == 'windows':
- # Explicitly choosing between x86 and x64 arch doesn't work yet
+ _check_compiler(self.args.compiler, ['coreclr', 'default'])
_check_arch(self.args.arch, ['default'])
- # CoreCLR use 64bit runtime by default.
- arch_option = 'x64' if self.args.compiler == 'coreclr' else self.args.arch
- self._make_options = [_windows_toolset_option(self.args.compiler),
- _windows_arch_option(arch_option)]
+ self._cmake_arch_option = 'x64' if self.args.compiler == 'coreclr' else 'Win32'
+ self._make_options = []
else:
_check_compiler(self.args.compiler, ['default', 'coreclr'])
if self.platform == 'linux' and self.args.compiler == 'coreclr':
@@ -799,7 +797,7 @@
def pre_build_steps(self):
if self.platform == 'windows':
- return [['tools\\run_tests\\helper_scripts\\pre_build_csharp.bat']]
+ return [['tools\\run_tests\\helper_scripts\\pre_build_csharp.bat', self._cmake_arch_option]]
else:
return [['tools/run_tests/helper_scripts/pre_build_csharp.sh']]
@@ -830,7 +828,10 @@
return [['tools/run_tests/helper_scripts/post_tests_csharp.sh']]
def makefile_name(self):
- return 'Makefile'
+ if self.platform == 'windows':
+ return 'cmake/build/%s/Makefile' % self._cmake_arch_option
+ else:
+ return 'Makefile'
def dockerfile_dir(self):
return 'tools/dockerfile/test/csharp_%s_%s' % (self._docker_distro,
@@ -1292,7 +1293,7 @@
return [jobset.JobSpec(['cmake', '--build', '.',
'--target', '%s' % target,
'--config', _MSBUILD_CONFIG[cfg]],
- cwd='cmake/build',
+ cwd=os.path.dirname(makefile),
timeout_seconds=None) for target in targets]
extra_args = []
# better do parallel compilation