Merge pull request #15138 from jtattermusch/fix_csharp_macos

Fix C# macos tests
pull/15143/head
Matt Kwong 7 years ago committed by GitHub
commit fe9a6d5ec2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      examples/csharp/helloworld-from-cli/global.json
  2. 8
      src/csharp/Grpc.Core/NativeDeps.Mac.csproj.include
  3. 5
      src/csharp/global.json
  4. 6
      tools/run_tests/run_tests.py

@ -1,5 +0,0 @@
{
"sdk": {
"version": "1.0.0"
}
}

@ -1,13 +1,5 @@
<Project>
<ItemGroup>
<!-- We are relying on run_tests.py to build grpc_csharp_ext with the right bitness
and we copy it as both x86 (needed by net45) and x64 (needed by netcoreapp1.0) as we don't
know which one will be needed to run the tests. -->
<Content Include="..\..\..\libs\$(NativeDependenciesConfigurationUnix)\libgrpc_csharp_ext.dylib">
<Link>libgrpc_csharp_ext.x86.dylib</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Pack>false</Pack>
</Content>
<Content Include="..\..\..\libs\$(NativeDependenciesConfigurationUnix)\libgrpc_csharp_ext.dylib">
<Link>libgrpc_csharp_ext.x64.dylib</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

@ -1,5 +0,0 @@
{
"sdk": {
"version": "2.1.4"
}
}

@ -921,9 +921,6 @@ class CSharpLanguage(object):
if self.platform == 'mac':
# TODO(jtattermusch): EMBED_ZLIB=true currently breaks the mac build
self._make_options = ['EMBED_OPENSSL=true']
if self.args.compiler != 'coreclr':
# On Mac, official distribution of mono is 32bit.
self._make_options += ['ARCH_FLAGS=-m32', 'LDFLAGS=-m32']
else:
self._make_options = ['EMBED_OPENSSL=true', 'EMBED_ZLIB=true']
@ -944,6 +941,9 @@ class CSharpLanguage(object):
assembly_subdir += '/net45'
if self.platform == 'windows':
runtime_cmd = []
elif self.platform == 'mac':
# mono before version 5.2 on MacOS defaults to 32bit runtime
runtime_cmd = ['mono', '--arch=64']
else:
runtime_cmd = ['mono']

Loading…
Cancel
Save