aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-10-07 19:26:19 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-10-07 19:26:19 -0700
commit874aec02b45dd3c3a8e8ae6c158ead268cbc1d47 (patch)
tree2b4199ed66f091f6f6a89eaf19f14a4bf91cce9a /tools
parent48423fc84362e195854a7e2bcf244ff29f03cee7 (diff)
move nuget restore into prebuild step on windows
Diffstat (limited to 'tools')
-rwxr-xr-xtools/jenkins/run_jenkins.sh4
-rw-r--r--tools/run_tests/pre_build_c.bat21
-rw-r--r--tools/run_tests/pre_build_csharp.bat22
-rwxr-xr-xtools/run_tests/run_tests.py7
4 files changed, 48 insertions, 6 deletions
diff --git a/tools/jenkins/run_jenkins.sh b/tools/jenkins/run_jenkins.sh
index f79e739f6a..67cfc2bb0a 100755
--- a/tools/jenkins/run_jenkins.sh
+++ b/tools/jenkins/run_jenkins.sh
@@ -63,10 +63,6 @@ then
# Prevent msbuild from picking up "platform" env variable, which would break the build
unset platform
- # TODO(jtattermusch): integrate nuget restore in a nicer way.
- /cygdrive/c/nuget/nuget.exe restore vsprojects/grpc.sln
- /cygdrive/c/nuget/nuget.exe restore src/csharp/Grpc.sln
-
python tools/run_tests/run_tests.py -t -l $language -x report.xml $@ || true
elif [ "$platform" == "macos" ]
diff --git a/tools/run_tests/pre_build_c.bat b/tools/run_tests/pre_build_c.bat
new file mode 100644
index 0000000000..ac8a375ad7
--- /dev/null
+++ b/tools/run_tests/pre_build_c.bat
@@ -0,0 +1,21 @@
+@rem Performs nuget restore step for C/C++.
+
+setlocal
+
+@rem enter repo root
+cd /d %~dp0\..\..
+
+@rem Location of nuget.exe
+set NUGET=C:\nuget\nuget.exe
+
+if exists %NUGET% (
+ %NUGET% restore vsprojects/grpc.sln || goto :error
+)
+
+endlocal
+
+goto :EOF
+
+:error
+echo Failed!
+exit /b %errorlevel%
diff --git a/tools/run_tests/pre_build_csharp.bat b/tools/run_tests/pre_build_csharp.bat
new file mode 100644
index 0000000000..f5890c2743
--- /dev/null
+++ b/tools/run_tests/pre_build_csharp.bat
@@ -0,0 +1,22 @@
+@rem Performs nuget restore step for C#.
+
+setlocal
+
+@rem enter repo root
+cd /d %~dp0\..\..
+
+@rem Location of nuget.exe
+set NUGET=C:\nuget\nuget.exe
+
+if exists %NUGET% (
+ %NUGET% restore vsprojects/grpc_csharp_ext.sln || goto :error
+ %NUGET% restore src/csharp/Grpc.sln || goto :error
+)
+
+endlocal
+
+goto :EOF
+
+:error
+echo Failed!
+exit /b %errorlevel%
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 69a480ac85..d5036d55d8 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -167,7 +167,10 @@ class CLanguage(object):
return ['buildtests_%s' % self.make_target, 'tools_%s' % self.make_target]
def pre_build_steps(self):
- return []
+ if self.platform == 'windows':
+ return [['tools\\run_tests\\pre_build_c.bat']]
+ else:
+ return []
def build_steps(self):
return []
@@ -322,7 +325,7 @@ class CSharpLanguage(object):
def pre_build_steps(self):
if self.platform == 'windows':
- return []
+ return [['tools\\run_tests\\pre_build_csharp.bat']]
else:
return [['tools/run_tests/pre_build_csharp.sh']]