aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Alex Polcyn <apolcyn@google.com>2016-11-01 18:58:56 -0700
committerGravatar Alex Polcyn <apolcyn@google.com>2016-11-01 23:26:03 -0700
commitc064ff4e5667282545d23954b90b912da5362799 (patch)
treeafe95514656ad24511c8dec98fbf378aaf8b2cf0
parent84be265239bbc1d1313aa5a0a79b724a847ff5f1 (diff)
keep old obsolete csharp package builds but add windows dotnetcli package build. change names of package build targets too
-rw-r--r--tools/run_tests/package_targets.py40
1 files changed, 32 insertions, 8 deletions
diff --git a/tools/run_tests/package_targets.py b/tools/run_tests/package_targets.py
index 1b66b5d935..05183db87c 100644
--- a/tools/run_tests/package_targets.py
+++ b/tools/run_tests/package_targets.py
@@ -71,29 +71,52 @@ def create_jobspec(name, cmdline, environ=None, cwd=None, shell=False,
class CSharpPackage:
"""Builds C# nuget packages."""
- def __init__(self, use_dotnet_cli=False):
+ def __init__(self, linux=False, use_dotnet_cli=True):
+ self.linux = linux
self.use_dotnet_cli = use_dotnet_cli
- self.name = 'csharp_package_dotnetcli' if use_dotnet_cli else 'csharp_package'
+
self.labels = ['package', 'csharp']
+
if use_dotnet_cli:
- self.labels += ['linux']
+ if linux:
+ self.name = 'csharp_package_dotnetcli_linux'
+ self.labels += ['linux']
+ else:
+ self.name = 'csharp_package_dotnetcli_windows'
+ self.labels += ['windows']
else:
- self.labels += ['windows']
+ # official packages built with dotnet cli rather than nuget pack
+ self.name = 'csharp_package_obsolete'
+ self.labels += ['obsolete']
+
def pre_build_jobspecs(self):
- return [] # now using dotnet cli to build all packages
+ # The older, obsolete build uses nuget only instead of dotnet cli
+ if 'obsolete' in self.labels:
+ return [create_jobspec('prebuild_%s' % self.name,
+ ['tools\\run_tests\\pre_build_csharp.bat'],
+ shell=True,
+ flake_retries=5,
+ timeout_retries=2)]
+ else:
+ return []
def build_jobspec(self):
- if self.use_dotnet_cli:
+ if self.use_dotnet_cli and self.linux:
return create_docker_jobspec(
self.name,
'tools/dockerfile/test/csharp_coreclr_x64',
'src/csharp/build_packages_dotnetcli.sh')
- else:
+ elif self.use_dotnet_cli:
return create_jobspec(self.name,
['build_packages_dotnetcli.bat'],
cwd='src\\csharp',
shell=True)
+ else:
+ return create_jobspec(self.name,
+ ['build_packages.bat'],
+ cwd='src\\csharp',
+ shell=True)
def __str__(self):
return self.name
@@ -170,7 +193,8 @@ class PHPPackage:
def targets():
"""Gets list of supported targets"""
return [CSharpPackage(),
- CSharpPackage(use_dotnet_cli=True),
+ CSharpPackage(linux=True),
+ CSharpPackage(use_dotnet_cli=False),
NodePackage(),
RubyPackage(),
PythonPackage(),