Skip to content

Commit 872b8ca

Browse files
authored
Switch to a Firestore commit that fixes a Windows build error. (#373)
Also ensure -DNOMINMAX is set in Windows builds. Together, this fixes a Windows build error in Firestore's core library. Also fix log summarization (minor change) on Android.
1 parent 406fc4b commit 872b8ca

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

cmake/external/firestore.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if(TARGET firestore)
1818
return()
1919
endif()
2020

21-
set(version CocoaPods-7.10.0)
21+
set(version 9bae3613d885fb8cc7d74c612c90f821a0e1981f)
2222
ExternalProject_Add(
2323
firestore
2424

firestore/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,12 @@ set(FIREBASE_FIRESTORE_CPP_DEFINES -DINTERNAL_EXPERIMENTAL=1)
324324
if (WIN32 AND NOT ANDROID AND NOT IOS)
325325
# On Windows, gRPC gives a compiler error in firebase_metadata_provider_desktop.cc
326326
# unless _WIN32_WINNT is defined to this value (0x0600, Windows Vista).
327+
# Also set -DNOMINMAX for both Firestore and Firestore Core.
327328
set(FIREBASE_FIRESTORE_CPP_DEFINES ${FIREBASE_FIRESTORE_CPP_DEFINES} -D_WIN32_WINNT=0x0600 -DNOMINMAX)
329+
target_compile_definitions(firestore_core
330+
PRIVATE
331+
-DNOMINMAX
332+
)
328333
endif()
329334

330335
target_compile_definitions(firebase_firestore

scripts/gha/summarize_test_results.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ def print_log(log_results):
205205
def print_github_log(log_results):
206206
"""Print a text log, but replace newlines with %0A and add
207207
the GitHub ::error text."""
208-
output_lines = [LOG_HEADER, ""] + print_log(log_results)
208+
output_lines = [LOG_HEADER,
209+
"".ljust(len(LOG_HEADER), "—"),
210+
""] + print_log(log_results)
209211
# "%0A" produces a newline in GitHub workflow logs.
210212
return ["::error ::%s" % "%0A".join(output_lines)]
211213

@@ -292,8 +294,11 @@ def main(argv):
292294

293295
# Extract test failures, which follow "TESTAPPS EXPERIENCED ERRORS:"
294296
m = re.search(r'^TEST SUMMARY(.*)TESTAPPS (EXPERIENCED ERRORS|FAILED):\n(([^\n]*\n)+)', log_text, re.MULTILINE | re.DOTALL)
295-
if m and ((SIMULATOR in platform and not "(ON SIMULATOR)" in m.group(1)) or
296-
(HARDWARE in platform and not "(ON HARDWARE)" in m.group(1))):
297+
# If the log reports "(ON SIMULATOR)" or "(ON HARDWARE)", make sure it matches the platform.
298+
if m and "(ON " in m.group(1) and (
299+
(SIMULATOR in platform and not "(ON SIMULATOR)" in m.group(1)) or
300+
(HARDWARE in platform and not "(ON HARDWARE)" in m.group(1))
301+
):
297302
m = None # don't process this if it's for the wrong hardware target
298303
if m:
299304
for test_failure_line in m.group(3).strip("\n").split("\n"):

0 commit comments

Comments
 (0)