Skip to content

Commit fc8a5c1

Browse files
authored
Merge branch 'dev' into feature/js-merge-firestore-changes
2 parents e419899 + 1be374e commit fc8a5c1

File tree

3 files changed

+14
-24
lines changed

3 files changed

+14
-24
lines changed

.github/workflows/cpp-packaging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ jobs:
667667
python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
668668
- name: Build integration tests
669669
run: |
670-
python scripts/gha/build_testapps.py --t ${{ env.apis }} --p ${{ matrix.target_platform }} --sdk_dir firebase_cpp_sdk --output_directory ${{ github.workspace }} --noadd_timestamp
670+
python scripts/gha/build_testapps.py --t ${{ env.apis }} --p ${{ matrix.target_platform }} --sdk_dir firebase_cpp_sdk --output_directory "${{ github.workspace }}" --noadd_timestamp
671671
672672
- name: Run desktop integration tests
673673
if: matrix.target_platform == 'Desktop' && !cancelled()

.github/workflows/integration_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
if [[ "${{ matrix.ssl_variant }}" == "boringssl" ]]; then
137137
ssl_option=--cmake_flag=-DFIREBASE_USE_BORINGSSL=ON
138138
fi
139-
python scripts/gha/build_testapps.py --t ${{ github.event.inputs.apis }} --p ${{ matrix.target_platform }} --output_directory ${{ github.workspace }} --use_vcpkg --noadd_timestamp ${ssl_option}
139+
python scripts/gha/build_testapps.py --t ${{ github.event.inputs.apis }} --p ${{ matrix.target_platform }} --output_directory "${{ github.workspace }}" --use_vcpkg --noadd_timestamp ${ssl_option}
140140
141141
- name: Run desktop integration tests
142142
if: matrix.target_platform == 'Desktop' && !cancelled()

scripts/gha/build_testapps.py

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def _build(
247247
os.chdir(project_dir)
248248

249249
_run_setup_script(root_dir, project_dir)
250-
250+
251251
failures = []
252252

253253
if _DESKTOP in platforms:
@@ -339,20 +339,7 @@ def _build_android(project_dir, sdk_dir):
339339
f.write("systemProp.firebase_cpp_sdk.dir=" + sdk_dir + "\n")
340340
# This will log the versions of dependencies for debugging purposes.
341341
_run([gradlew, "dependencies", "--configuration", "debugCompileClasspath"])
342-
# Building for Android has a known issue that can be worked around by
343-
# simply building again. Since building from source takes a while, we don't
344-
# want to retry the build if a different error occurred.
345-
build_args = [gradlew, "assembleDebug", "--stacktrace"]
346-
result = _run(args=build_args, capture_output=True, text=True, check=False)
347-
if result.returncode:
348-
if "Execution failed for task ':generateJsonModel" in result.stderr:
349-
logging.info("Task failed for ':generateJsonModel<target>'. Retrying.")
350-
_run(args=build_args)
351-
else:
352-
logging.error(result.stderr)
353-
raise subprocess.CalledProcessError(
354-
returncode=result.returncode,
355-
cmd=build_args)
342+
_run([gradlew, "assembleDebug", "--stacktrace"])
356343

357344

358345
def _validate_android_environment_variables():
@@ -502,15 +489,18 @@ def _build_ios(
502489
output_dir=build_dir, configuration="Debug")
503490

504491

505-
# This script is responsible for copying shared files into the integration
506-
# test projects. Should be executed before performing any builds.
492+
# This should be executed before performing any builds.
507493
def _run_setup_script(root_dir, testapp_dir):
508-
"""Runs the setup_integration_tests.py script if needed."""
494+
"""Runs the setup_integration_tests.py script."""
495+
# This script will download gtest to its own directory.
496+
# The CMake projects were configured to download gtest, but this was
497+
# found to be flaky and errors didn't propagate up the build system
498+
# layers. The workaround is to download gtest with this script and copy it.
499+
downloader_dir = os.path.join(root_dir, "testing", "test_framework")
500+
_run([sys.executable, os.path.join(downloader_dir, "download_googletest.py")])
501+
# Copies shared test framework files into the project, including gtest.
509502
script_path = os.path.join(root_dir, "setup_integration_tests.py")
510-
if os.path.isfile(script_path):
511-
_run([sys.executable, script_path, testapp_dir])
512-
else:
513-
logging.info("setup_integration_tests.py not found")
503+
_run([sys.executable, script_path, testapp_dir])
514504

515505

516506
def _run(args, timeout=2400, capture_output=False, text=None, check=True):

0 commit comments

Comments
 (0)