aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/distrib
diff options
context:
space:
mode:
Diffstat (limited to 'test/distrib')
-rwxr-xr-xtest/distrib/csharp/test_codegen/test_codegen.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/distrib/csharp/test_codegen/test_codegen.sh b/test/distrib/csharp/test_codegen/test_codegen.sh
index 62c9040f20..21ccb7e6c3 100755
--- a/test/distrib/csharp/test_codegen/test_codegen.sh
+++ b/test/distrib/csharp/test_codegen/test_codegen.sh
@@ -17,12 +17,18 @@ set -ex
cd "$(dirname "$0")"
-ls -lR ../packages/Grpc.Tools.__GRPC_NUGET_VERSION__/tools
+ls -lR "../packages/Grpc.Tools.__GRPC_NUGET_VERSION__/tools"
-PROTOC=../packages/Grpc.Tools.__GRPC_NUGET_VERSION__/tools/linux_x64/protoc
-PLUGIN=../packages/Grpc.Tools.__GRPC_NUGET_VERSION__/tools/linux_x64/grpc_csharp_plugin
+PLATFORM_ARCH=linux_x64
+if [ "$(getconf LONG_BIT)" == "32" ]
+then
+ PLATFORM_ARCH=linux_x86
+fi
-$PROTOC --plugin=protoc-gen-grpc=$PLUGIN --csharp_out=. --grpc_out=. -I . helloworld.proto
+PROTOC="../packages/Grpc.Tools.__GRPC_NUGET_VERSION__/tools/${PLATFORM_ARCH}/protoc"
+PLUGIN="../packages/Grpc.Tools.__GRPC_NUGET_VERSION__/tools/${PLATFORM_ARCH}/grpc_csharp_plugin"
+
+$PROTOC --plugin="protoc-gen-grpc=${PLUGIN}" --csharp_out=. --grpc_out=. -I . helloworld.proto
ls *.cs