aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/distrib
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2018-06-06 16:56:35 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2018-06-06 16:56:35 +0200
commit8d396573b3074b7b677511f353f20f7fa96df4b6 (patch)
tree068365578263344774070b067ad6cdf9a6d43f99 /test/distrib
parent4fae81d7778977dc879c4acd78e7257f0f3f07f4 (diff)
fix test_codegen for x86
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