Skip to content

Commit

Permalink
Merge pull request #1477 from freakboy3742/dvt-core-warning
Browse files Browse the repository at this point in the history
Filter out DVTCoreDeviceEnabledState warnings from Xcode builds.
  • Loading branch information
mhsmith authored Oct 4, 2023
2 parents 8e3d391 + 1874722 commit 6baeffc
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/1477.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The DVTCoreDeviceEnabledState warning produced by Xcode 14 on x86_64 is now suppressed.
13 changes: 13 additions & 0 deletions src/briefcase/platforms/macOS/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ class XcodeBuildFilter:
r"\d{4}-\d{2}-\d{2} +\d+:\d{2}:\d{2}\.\d{3} xcodebuild\[\d+:\d+\] +"
)

# Xcode 14 generates the following warning on x86_64 hardware
# 2023-10-04 08:05:21.757 xcodebuild[46899:11335453] DVTCoreDeviceEnabledState:
# DVTCoreDeviceEnabledState_Disabled set via user default
# (DVTEnableCoreDevice=disabled)
DEVICE_ENABLED_STATE_RE = re.compile(
XCODEBUILD_PREFIX
+ r"DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled "
r"set via user default \(DVTEnableCoreDevice=disabled\)"
)

# Xcode 14 generates the following warning when there is a passcode protected device
# attached to your computer, even if you're not doing anything to target that device:
# ---------------------------------------------------------------------
Expand Down Expand Up @@ -126,6 +136,9 @@ def __call__(self, line):
elif self.LOCKED_DEVICE_ADDITIONAL_RE.match(line):
# Ignore the additional 1-line warning about failing to start the service.
pass
elif self.DEVICE_ENABLED_STATE_RE.match(line):
# Ignore the DVTCoreDeviceEnabledState warning
pass
elif self.DVT_ASSERTIONS_RE.match(line):
# Ignore the 4 lines after the DVTAssertions message
self.dvt_ignore_count = 4
Expand Down
12 changes: 12 additions & 0 deletions tests/platforms/macOS/test_XcodeBuildFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@
"Did gyre and gimble in the wabe;",
],
),
# XCode 14: x86_64 "device enabled state" warning.
(
[
"'Twas brillig, and the slithy toves",
"2023-10-04 08:05:21.757 xcodebuild[46899:11335453] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)",
"Did gyre and gimble in the wabe;",
],
[
"'Twas brillig, and the slithy toves",
"Did gyre and gimble in the wabe;",
],
),
# Xcode 15: DVTAssertions warning about createItemModels
(
[
Expand Down

0 comments on commit 6baeffc

Please sign in to comment.