Skip to content

Commit

Permalink
Build MatterTests and dft with MTR_NO_AVAILABILITY=1
Browse files Browse the repository at this point in the history
  • Loading branch information
ksperling-apple committed Jan 24, 2024
1 parent b34a693 commit 8dd1c0e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
10 changes: 0 additions & 10 deletions src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ var sController: MTRDeviceController? = nil

var sTestKeys: MTRTestKeys? = nil

// Because we are using things from Matter.framework that are flagged
// as only being available starting with macOS 13.3, we need to flag our
// code with the same availabiluty annotation.
@available(macOS, introduced: 13.3)
@available(iOS, introduced: 16.4)
class MTRSwiftDeviceTestControllerDelegate : NSObject, MTRDeviceControllerDelegate {
let expectation: XCTestExpectation

Expand Down Expand Up @@ -97,11 +92,6 @@ class MTRSwiftDeviceTestDelegate : NSObject, MTRDeviceDelegate {

}

// Because we are using things from Matter.framework that are flagged
// as only being available starting with macOS 14.4, we need to flag our
// code with the same availability annotation.
@available(macOS, introduced: 14.4)
@available(iOS, introduced: 17.4)
class MTRSwiftDeviceTests : XCTestCase {
static var sStackInitRan : Bool = false
static var sNeedsStackShutdown : Bool = true
Expand Down
10 changes: 0 additions & 10 deletions src/darwin/Framework/CHIPTests/MTRSwiftPairingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ struct PairingConstants {
static let timeoutInSeconds : UInt16 = 3
}

// Because we are using things from Matter.framework that are flagged
// as only being available starting with macOS 13.3, we need to flag our
// code with the same availabiluty annotation.
@available(macOS, introduced: 13.3)
@available(iOS, introduced: 16.4)
class MTRSwiftPairingTestControllerDelegate : NSObject, MTRDeviceControllerDelegate {
let expectation: XCTestExpectation

Expand Down Expand Up @@ -47,11 +42,6 @@ class MTRSwiftPairingTestControllerDelegate : NSObject, MTRDeviceControllerDeleg
}

class MTRSwiftPairingTests : XCTestCase {
// Because we are using things from Matter.framework that are flagged
// as only being available starting with macOS 13.3, we need to flag our
// code with the same availabiluty annotation.
@available(macOS, introduced: 13.3)
@available(iOS, introduced: 16.4)
func test001_BasicPairing() {
let factory = MTRDeviceControllerFactory.sharedInstance()

Expand Down
12 changes: 12 additions & 0 deletions src/darwin/Framework/Matter.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1848,11 +1848,13 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
CHIP_HAVE_CONFIG_H,
"CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=<lib/address_resolve/AddressResolve_DefaultImpl.h>",
CONFIG_BUILD_FOR_HOST_UNIT_TEST,
"CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1",
"CONFIG_USE_INTERACTIVE_MODE=1",
"MTR_NO_AVAILABILITY=1",
);
"HEADER_SEARCH_PATHS[arch=*]" = (
"$(CHIP_ROOT)/examples/darwin-framework-tool",
Expand Down Expand Up @@ -1924,11 +1926,13 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
CHIP_HAVE_CONFIG_H,
"CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=<lib/address_resolve/AddressResolve_DefaultImpl.h>",
CONFIG_BUILD_FOR_HOST_UNIT_TEST,
"CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1",
"CONFIG_USE_INTERACTIVE_MODE=1",
"MTR_NO_AVAILABILITY=1",
);
"HEADER_SEARCH_PATHS[arch=*]" = (
"$(CHIP_ROOT)/examples//darwin-framework-tool",
Expand Down Expand Up @@ -2143,6 +2147,10 @@
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
"MTR_NO_AVAILABILITY=1",
);
"HEADER_SEARCH_PATHS[arch=*]" = "$(PROJECT_DIR)/../../../src";
INFOPLIST_FILE = CHIPTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -2311,6 +2319,10 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
"MTR_NO_AVAILABILITY=1",
);
"HEADER_SEARCH_PATHS[arch=*]" = "$(PROJECT_DIR)/../../../src";
INFOPLIST_FILE = CHIPTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down

0 comments on commit 8dd1c0e

Please sign in to comment.