Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Enable grpc_objc on windows #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions protog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package protog
import (
"io/fs"
"path/filepath"
"runtime"
"strings"
"testing"

Expand All @@ -25,6 +24,8 @@ func TestRun(t *testing.T) {
filepath.Join("java", "io", "grpc", "examples", "helloworld", "GreeterGrpc.java"),
filepath.Join("objc", "Helloworld.pbobjc.h"),
filepath.Join("objc", "Helloworld.pbobjc.m"),
filepath.Join("objc", "Helloworld.pbrpc.h"),
filepath.Join("objc", "Helloworld.pbrpc.m"),
filepath.Join("php", "Helloworld", "GreeterClient.php"),
filepath.Join("php", "Helloworld", "HelloReply.php"),
filepath.Join("php", "Helloworld", "HelloRequest.php"),
Expand All @@ -36,14 +37,6 @@ func TestRun(t *testing.T) {
filepath.Join("doc", "index.html"),
}

if runtime.GOOS != "windows" {
// grpc_objective_c_plugin crashes on Windows
expectedFilesNoJS = append(expectedFilesNoJS,
filepath.Join("objc", "Helloworld.pbrpc.h"),
filepath.Join("objc", "Helloworld.pbrpc.m"),
)
}

argsNoJS := func(dir string) []string {
args := []string{
"--cpp_out=" + filepath.Join(dir, "cpp"),
Expand All @@ -60,6 +53,7 @@ func TestRun(t *testing.T) {
"--python_out=" + filepath.Join(dir, "python"),
"--grpc_python_out=" + filepath.Join(dir, "python"),
"--objc_out=" + filepath.Join(dir, "objc"),
"--grpc_objc_out=" + filepath.Join(dir, "objc"),
"--ruby_out=" + filepath.Join(dir, "ruby"),
"--grpc_ruby_out=" + filepath.Join(dir, "ruby"),
"--ts_out=" + filepath.Join(dir, "ts"),
Expand All @@ -70,12 +64,6 @@ func TestRun(t *testing.T) {
filepath.Join("testdata", "helloworld.proto"),
}

if runtime.GOOS != "windows" {
args = append(args,
"--grpc_objc_out="+filepath.Join(dir, "objc"),
)
}

return args
}

Expand Down