[ObjC] remove libuv podspec and tests (#34196)

libuv was previously considered as the base of event engine, it's not
the case anymore.
It was removed from third_party in #33748, this PR remove it from objc
pull/33965/head
Hannah Shi 2 years ago committed by GitHub
parent 1305f1a5e5
commit fa0312cbf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 151
      src/objective-c/Libuv-gRPC.podspec
  2. 49
      src/objective-c/tests/ThirdPartyTests/Libuv/BUILD
  3. 54
      src/objective-c/tests/ThirdPartyTests/Libuv/LibuvGetAddrInfoTests.m
  4. 46
      src/objective-c/tests/ThirdPartyTests/Libuv/LibuvGetHostnameTests.m
  5. 50
      src/objective-c/tests/ThirdPartyTests/Libuv/LibuvGetNameInfo.m
  6. 48
      src/objective-c/tests/ThirdPartyTests/Libuv/LibuvGetSockNameTests.m
  7. 70
      src/objective-c/tests/ThirdPartyTests/Libuv/LibuvTimerTests.m
  8. 153
      templates/src/objective-c/Libuv-gRPC.podspec.template

@ -1,151 +0,0 @@
# This file has been automatically generated from a template file.
# Please make modifications to
# `templates/src/objective-c/libuv-gRPC.podspec.template` instead. This
# file can be regenerated from the template by running
# `tools/buildgen/generate_projects.sh`.
# Libuv CocoaPods podspec
# Copyright 2021, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Pod::Spec.new do |spec|
pod_version = "0.0.10"
libuv_version = "1.37.0"
spec.name = "Libuv-gRPC"
spec.version = pod_version
spec.summary = "gRPC-Only Libuv Pod"
spec.description = <<-DESC
Libuv pod intended to be used only by gRPC iOS. libuv is a multi-platform
support library with a focus on asynchronous I/O. It was primarily developed
for use by Node.js, but it's also used by Luvit, Julia, pyuv, and others.
DESC
spec.homepage = "https://libuv.org/"
spec.license = { :type => 'Mixed', :file => 'LICENSE' }
spec.author = "libuv"
# When using multiple platforms
spec.ios.deployment_target = '9.0'
spec.osx.deployment_target = '10.10'
spec.tvos.deployment_target = '10.0'
spec.watchos.deployment_target = '4.0'
spec.source = { :git => "https://github.com/libuv/libuv.git", :tag => "v#{libuv_version}" }
name = 'uv'
spec.module_name = name
spec.header_mappings_dir = 'include'
spec.header_dir = name
spec.subspec 'Interface' do |ss|
ss.header_mappings_dir = 'include'
ss.source_files = "include/uv.h",
"include/uv/errno.h",
"include/uv/threadpool.h",
"include/uv/version.h",
"include/uv/tree.h",
"include/uv/unix.h",
"include/uv/darwin.h"
end
spec.subspec 'Implementation' do |ss|
ss.header_mappings_dir = 'src'
ss.source_files =
"src/fs-poll.c",
"src/idna.c",
"src/inet.c",
"src/strscpy.c",
"src/threadpool.c",
"src/timer.c",
"src/uv-data-getter-setters.c",
"src/uv-common.c",
"src/version.c",
"src/unix/async.c",
"src/unix/core.c",
"src/unix/dl.c",
"src/unix/fs.c",
"src/unix/getaddrinfo.c",
"src/unix/getnameinfo.c",
"src/unix/loop.c",
"src/unix/loop-watcher.c",
"src/unix/pipe.c",
"src/unix/poll.c",
"src/unix/process.c",
"src/unix/signal.c",
"src/unix/stream.c",
"src/unix/tcp.c",
"src/unix/thread.c",
"src/unix/tty.c",
"src/unix/udp.c",
"src/unix/bsd-ifaddrs.c",
"src/unix/darwin.c",
"src/unix/fsevents.c",
"src/unix/kqueue.c",
"src/unix/darwin-proctitle.c",
"src/unix/proctitle.c",
"src/heap-inl.h",
"src/idna.h",
"src/queue.h",
"src/strscpy.h",
"src/uv-common.h",
"src/unix/atomic-ops.h",
"src/unix/internal.h",
"src/unix/spinlock.h"
ss.dependency "#{spec.name}/Interface", pod_version
end
spec.requires_arc = false
spec.pod_target_xcconfig = {
'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(PODS_TARGET_SRCROOT)/include"',
'USER_HEADER_SEARCH_PATHS' => '"$(PODS_TARGET_SRCROOT)" "$(PODS_TARGET_SRCROOT)/src" "$(PODS_TARGET_SRCROOT)/include"',
'CLANG_WARN_STRICT_PROTOTYPES' => 'NO',
'CLANG_WARN_DOCUMENTATION_COMMENTS' => 'NO',
'USE_HEADERMAP' => 'NO',
'ALWAYS_SEARCH_USER_PATHS' => 'NO',
'GCC_TREAT_WARNINGS_AS_ERRORS' => 'NO',
'GCC_WARN_INHIBIT_ALL_WARNINGS' => 'YES'
}
spec.libraries = 'c++'
spec.compiler_flags =
"-D_LARGEFILE_SOURCE",
"-D_FILE_OFFSET_BITS=64",
"-D_GNU_SOURCE",
"-D_DARWIN_USE_64_BIT_INODE=1",
"-D_DARWIN_UNLIMITED_SELECT=1"
end

@ -1,49 +0,0 @@
# Copyright 2021 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This is for the gRPC build system. This isn't intended to be used outsite of
# the BUILD file for gRPC. It contains the mapping for the template system we
# use to generate other platform's build system files.
#
# Please consider that there should be a high bar for additions and changes to
# this file.
# Each rule listed must be re-written for Google's internal build system, and
# each change must be ported from one to the other.
#
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
load("@build_bazel_rules_apple//apple/testing/default_runner:ios_test_runner.bzl", "ios_test_runner")
ios_test_runner(
name = "ios_x86_64_sim_runner",
device_type = "iPhone 8",
)
objc_library(
name = "LibuvTestsLib",
testonly = True,
srcs = glob(["*.m"]),
deps = [
"//external:libuv",
"//external:libuv_test",
],
)
ios_unit_test(
name = "LibuvTest",
minimum_os_version = "9.0",
runner = ":ios_x86_64_sim_runner",
deps = [":LibuvTestsLib"],
)

@ -1,54 +0,0 @@
/*
*
* Copyright 2021 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#import <XCTest/XCTest.h>
#import "test/runner.h"
#import "test/task.h"
// Tests in:
// libuv/test/test-getaddrinfo.c
TEST_DECLARE(getaddrinfo_fail)
TEST_DECLARE(getaddrinfo_fail_sync)
TEST_DECLARE(getaddrinfo_basic)
TEST_DECLARE(getaddrinfo_basic_sync)
TEST_DECLARE(getaddrinfo_concurrent)
#define TASK_LIST_START_LOCAL static task_entry_t TEST_TASKS[] = {
TASK_LIST_START_LOCAL
TEST_ENTRY(getaddrinfo_fail)
TEST_ENTRY(getaddrinfo_fail_sync)
TEST_ENTRY(getaddrinfo_basic)
TEST_ENTRY(getaddrinfo_basic_sync)
TEST_ENTRY(getaddrinfo_concurrent)
TASK_LIST_END
@interface LibuvGetAddrInfoTests : XCTestCase
@end
@implementation LibuvGetAddrInfoTests
- (void)testGetAddrInfoAll {
for (task_entry_t* task = TEST_TASKS; task->main; task++) {
task->main();
}
}
@end

@ -1,46 +0,0 @@
/*
*
* Copyright 2021 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#import <XCTest/XCTest.h>
#import "test/runner.h"
#import "test/task.h"
// Tests in:
// libuv/test/test-gethostname.c
TEST_DECLARE(gethostname)
#define TASK_LIST_START_LOCAL static task_entry_t TEST_TASKS[] = {
TASK_LIST_START_LOCAL
TEST_ENTRY(gethostname)
TASK_LIST_END
@interface LibuvGetHostNameTests : XCTestCase
@end
@implementation LibuvGetHostNameTests
- (void)testGetHostNameAll {
for (task_entry_t* task = TEST_TASKS; task->main; task++) {
task->main();
}
}
@end

@ -1,50 +0,0 @@
/*
*
* Copyright 2021 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#import <XCTest/XCTest.h>
#import "test/runner.h"
#import "test/task.h"
// Tests in:
// libuv/test/test-getnameinfo.c
TEST_DECLARE(getnameinfo_basic_ip4)
TEST_DECLARE(getnameinfo_basic_ip4_sync)
TEST_DECLARE(getnameinfo_basic_ip6)
#define TASK_LIST_START_LOCAL static task_entry_t TEST_TASKS[] = {
TASK_LIST_START_LOCAL
TEST_ENTRY(getnameinfo_basic_ip4)
TEST_ENTRY(getnameinfo_basic_ip4_sync)
TEST_ENTRY(getnameinfo_basic_ip6)
TASK_LIST_END
@interface LibuvGetNameInfoTests : XCTestCase
@end
@implementation LibuvGetNameInfoTests
- (void)testGetHostNameAll {
for (task_entry_t* task = TEST_TASKS; task->main; task++) {
task->main();
}
}
@end

@ -1,48 +0,0 @@
/*
*
* Copyright 2021 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#import <XCTest/XCTest.h>
#import "test/runner.h"
#import "test/task.h"
// Tests in:
// libuv/test/test-getsockname.c
TEST_DECLARE(getsockname_tcp)
TEST_DECLARE(getsockname_udp)
#define TASK_LIST_START_LOCAL static task_entry_t TEST_TASKS[] = {
TASK_LIST_START_LOCAL
TEST_ENTRY(getsockname_tcp)
// TEST_ENTRY(getsockname_udp)
TASK_LIST_END
@interface LibuvGetSockNameTests : XCTestCase
@end
@implementation LibuvGetSockNameTests
- (void)testGetSockNameAll {
for (task_entry_t* task = TEST_TASKS; task->main; task++) {
task->main();
}
}
@end

@ -1,70 +0,0 @@
/*
*
* Copyright 2021 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#import <XCTest/XCTest.h>
#import "test/runner.h"
#import "test/task.h"
// Tests in:
// libuv/test/test-timer.c
// libuv/test/test-timer-again.c
// libuv/test/test-timer-from-check.c
TEST_DECLARE(timer)
TEST_DECLARE(timer_init)
TEST_DECLARE(timer_again)
// TEST_DECLARE(timer_start_twice) //withhold until libuv patched
TEST_DECLARE(timer_order)
TEST_DECLARE(timer_huge_timeout)
TEST_DECLARE(timer_huge_repeat)
TEST_DECLARE(timer_run_once)
TEST_DECLARE(timer_from_check)
TEST_DECLARE(timer_is_closing)
TEST_DECLARE(timer_null_callback)
TEST_DECLARE(timer_early_check)
#define TASK_LIST_START_LOCAL static task_entry_t TEST_TASKS[] = {
TASK_LIST_START_LOCAL
TEST_ENTRY(timer)
TEST_ENTRY(timer_init)
TEST_ENTRY(timer_again)
// TEST_ENTRY(timer_start_twice) //withhold until libuv patched
TEST_ENTRY(timer_order)
TEST_ENTRY(timer_huge_timeout)
TEST_ENTRY(timer_huge_repeat)
TEST_ENTRY(timer_run_once)
TEST_ENTRY(timer_from_check)
TEST_ENTRY(timer_is_closing)
TEST_ENTRY(timer_null_callback)
TEST_ENTRY(timer_early_check)
TASK_LIST_END
@interface LibuvTimerTests : XCTestCase
@end
@implementation LibuvTimerTests
- (void)testTimerAll {
for (task_entry_t* task = TEST_TASKS; task->main; task++) {
task->main();
}
}
@end

@ -1,153 +0,0 @@
%YAML 1.2
--- |
# This file has been automatically generated from a template file.
# Please make modifications to
# `templates/src/objective-c/libuv-gRPC.podspec.template` instead. This
# file can be regenerated from the template by running
# `tools/buildgen/generate_projects.sh`.
# Libuv CocoaPods podspec
# Copyright 2021, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Pod::Spec.new do |spec|
pod_version = "0.0.10"
libuv_version = "1.37.0"
spec.name = "Libuv-gRPC"
spec.version = pod_version
spec.summary = "gRPC-Only Libuv Pod"
spec.description = <<-DESC
Libuv pod intended to be used only by gRPC iOS. libuv is a multi-platform
support library with a focus on asynchronous I/O. It was primarily developed
for use by Node.js, but it's also used by Luvit, Julia, pyuv, and others.
DESC
spec.homepage = "https://libuv.org/"
spec.license = { :type => 'Mixed', :file => 'LICENSE' }
spec.author = "libuv"
# When using multiple platforms
spec.ios.deployment_target = '9.0'
spec.osx.deployment_target = '10.10'
spec.tvos.deployment_target = '10.0'
spec.watchos.deployment_target = '4.0'
spec.source = { :git => "https://github.com/libuv/libuv.git", :tag => "v#{libuv_version}" }
name = 'uv'
spec.module_name = name
spec.header_mappings_dir = 'include'
spec.header_dir = name
spec.subspec 'Interface' do |ss|
ss.header_mappings_dir = 'include'
ss.source_files = "include/uv.h",
"include/uv/errno.h",
"include/uv/threadpool.h",
"include/uv/version.h",
"include/uv/tree.h",
"include/uv/unix.h",
"include/uv/darwin.h"
end
spec.subspec 'Implementation' do |ss|
ss.header_mappings_dir = 'src'
ss.source_files =
"src/fs-poll.c",
"src/idna.c",
"src/inet.c",
"src/strscpy.c",
"src/threadpool.c",
"src/timer.c",
"src/uv-data-getter-setters.c",
"src/uv-common.c",
"src/version.c",
"src/unix/async.c",
"src/unix/core.c",
"src/unix/dl.c",
"src/unix/fs.c",
"src/unix/getaddrinfo.c",
"src/unix/getnameinfo.c",
"src/unix/loop.c",
"src/unix/loop-watcher.c",
"src/unix/pipe.c",
"src/unix/poll.c",
"src/unix/process.c",
"src/unix/signal.c",
"src/unix/stream.c",
"src/unix/tcp.c",
"src/unix/thread.c",
"src/unix/tty.c",
"src/unix/udp.c",
"src/unix/bsd-ifaddrs.c",
"src/unix/darwin.c",
"src/unix/fsevents.c",
"src/unix/kqueue.c",
"src/unix/darwin-proctitle.c",
"src/unix/proctitle.c",
"src/heap-inl.h",
"src/idna.h",
"src/queue.h",
"src/strscpy.h",
"src/uv-common.h",
"src/unix/atomic-ops.h",
"src/unix/internal.h",
"src/unix/spinlock.h"
ss.dependency "#{spec.name}/Interface", pod_version
end
spec.requires_arc = false
spec.pod_target_xcconfig = {
'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(PODS_TARGET_SRCROOT)/include"',
'USER_HEADER_SEARCH_PATHS' => '"$(PODS_TARGET_SRCROOT)" "$(PODS_TARGET_SRCROOT)/src" "$(PODS_TARGET_SRCROOT)/include"',
'CLANG_WARN_STRICT_PROTOTYPES' => 'NO',
'CLANG_WARN_DOCUMENTATION_COMMENTS' => 'NO',
'USE_HEADERMAP' => 'NO',
'ALWAYS_SEARCH_USER_PATHS' => 'NO',
'GCC_TREAT_WARNINGS_AS_ERRORS' => 'NO',
'GCC_WARN_INHIBIT_ALL_WARNINGS' => 'YES'
}
spec.libraries = 'c++'
spec.compiler_flags =
"-D_LARGEFILE_SOURCE",
"-D_FILE_OFFSET_BITS=64",
"-D_GNU_SOURCE",
"-D_DARWIN_USE_64_BIT_INODE=1",
"-D_DARWIN_UNLIMITED_SELECT=1"
end
Loading…
Cancel
Save