From fe92a843242eec7cf66a507d4777216541f3ffa2 Mon Sep 17 00:00:00 2001 From: Maciek Grzybowski Date: Wed, 14 Aug 2024 12:25:28 +0200 Subject: [PATCH 01/13] chore: Bump dd-swift-testing to recent version --- Datadog/Datadog.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Datadog/Datadog.xcodeproj/project.pbxproj b/Datadog/Datadog.xcodeproj/project.pbxproj index a33bfa4a6e..af083e90da 100644 --- a/Datadog/Datadog.xcodeproj/project.pbxproj +++ b/Datadog/Datadog.xcodeproj/project.pbxproj @@ -13696,8 +13696,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/DataDog/dd-sdk-swift-testing.git"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 2.4.0; + kind = exactVersion; + version = "2.5.0-alpha2"; }; }; /* End XCRemoteSwiftPackageReference section */ From dd0c19136ce258d91172ccf351eebe9e4953acff Mon Sep 17 00:00:00 2001 From: Maciek Grzybowski Date: Wed, 14 Aug 2024 18:20:41 +0200 Subject: [PATCH 02/13] chore: Export ENV variables for Test Visibility product --- Makefile | 8 ++++++-- tools/secrets/config.sh | 2 ++ tools/test.sh | 39 ++++++++++++++++++++++++++++++++++++++ tools/utils/current-git.sh | 2 ++ 4 files changed, 49 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e6fd5172d3..7a3141b8f8 100644 --- a/Makefile +++ b/Makefile @@ -116,14 +116,18 @@ DEFAULT_SR_SNAPSHOT_TESTS_DEVICE := iPhone 15 # Default location for deploying artifacts DEFAULT_ARTIFACTS_PATH := artifacts +# Whether Test Visibility product is enabled by default +DEFAULT_USE_TEST_VISIBILITY := 0 + # Run unit tests for specified SCHEME test: @$(call require_param,SCHEME) @$(call require_param,OS) @$(call require_param,PLATFORM) @$(call require_param,DEVICE) - @$(ECHO_TITLE) "make test SCHEME='$(SCHEME)' OS='$(OS)' PLATFORM='$(PLATFORM)' DEVICE='$(DEVICE)'" - ./tools/test.sh --scheme "$(SCHEME)" --os "$(OS)" --platform "$(PLATFORM)" --device "$(DEVICE)" + @:$(eval USE_TEST_VISIBILITY ?= $(DEFAULT_USE_TEST_VISIBILITY)) + @$(ECHO_TITLE) "make test SCHEME='$(SCHEME)' OS='$(OS)' PLATFORM='$(PLATFORM)' DEVICE='$(DEVICE)' USE_TEST_VISIBILITY='$(USE_TEST_VISIBILITY)'" + USE_TEST_VISIBILITY=$(USE_TEST_VISIBILITY) ./tools/test.sh --scheme "$(SCHEME)" --os "$(OS)" --platform "$(PLATFORM)" --device "$(DEVICE)" # Run unit tests for specified SCHEME using iOS Simulator test-ios: diff --git a/tools/secrets/config.sh b/tools/secrets/config.sh index 8b281fc216..e4f6296616 100644 --- a/tools/secrets/config.sh +++ b/tools/secrets/config.sh @@ -16,6 +16,7 @@ DD_IOS_SECRET__GH_CLI_TOKEN="gh.cli.token" DD_IOS_SECRET__CARTHAGE_GH_TOKEN="carthage.gh.token" DD_IOS_SECRET__CP_TRUNK_TOKEN="cocoapods.trunk.token" DD_IOS_SECRET__SSH_KEY="ssh.key" +DD_IOS_SECRET__TEST_VISIBILITY_API_KEY="test.visibility.api.key" DD_IOS_SECRET__DEV_CERTIFICATE_P12_BASE64="dev.certificate.p12.base64" DD_IOS_SECRET__DEV_CERTIFICATE_P12_PASSWORD="dev.certificate.p12.password" DD_IOS_SECRET__MI_S8S_API_KEY="mi.s8s.api.key" @@ -34,6 +35,7 @@ DD_IOS_SECRETS[$((idx++))]="$DD_IOS_SECRET__GH_CLI_TOKEN | GitHub token to authe DD_IOS_SECRETS[$((idx++))]="$DD_IOS_SECRET__CARTHAGE_GH_TOKEN | GitHub token to avoid rate limiting Carthage commands (https://github.com/Carthage/Carthage/pull/605)" DD_IOS_SECRETS[$((idx++))]="$DD_IOS_SECRET__CP_TRUNK_TOKEN | Cocoapods token to authenticate 'pod trunk' operations (https://guides.cocoapods.org/terminal/commands.html)" DD_IOS_SECRETS[$((idx++))]="$DD_IOS_SECRET__SSH_KEY | SSH key to authenticate 'git clone git@github.com:...' operations" +DD_IOS_SECRETS[$((idx++))]="$DD_IOS_SECRET__TEST_VISIBILITY_API_KEY | The Datadog API key used to upload the test results to Test Visibility product (https://docs.datadoghq.com/tests/setup/swift)." DD_IOS_SECRETS[$((idx++))]="$DD_IOS_SECRET__DEV_CERTIFICATE_P12_BASE64 | Base64-encoded '.p12' developer certificate file for signing apps" DD_IOS_SECRETS[$((idx++))]="$DD_IOS_SECRET__DEV_CERTIFICATE_P12_PASSWORD | Password to '$DD_IOS_SECRET__DEV_CERTIFICATE_P12_PASSWORD' certificate" DD_IOS_SECRETS[$((idx++))]="$DD_IOS_SECRET__MI_S8S_API_KEY | DATADOG_API_KEY for uploading app to synthetics in Mobile - Integration org" diff --git a/tools/test.sh b/tools/test.sh index 3d9aa917bf..5dcb3cf443 100755 --- a/tools/test.sh +++ b/tools/test.sh @@ -12,6 +12,9 @@ set -eo pipefail source ./tools/utils/argparse.sh +source ./tools/utils/echo-color.sh +source ./tools/utils/current-git.sh +source ./tools/secrets/get-secret.sh set_description "Executes unit tests for a specified --scheme, using the provided --os, --platform, and --device." define_arg "scheme" "" "Identifies the test scheme to execute" "string" "true" @@ -26,6 +29,42 @@ WORKSPACE="Datadog.xcworkspace" DESTINATION="platform=$platform,name=$device,OS=$os" SCHEME=$scheme +# Enables Datadog Test Visibility to trace tests execution +# Ref.: https://docs.datadoghq.com/tests/setup/swift/ +setup_test_visibility() { + export DD_TEST_RUNNER=1 + + # Base: + export DD_API_KEY=$(get_secret $DD_IOS_SECRET__TEST_VISIBILITY_API_KEY) + export DD_ENV=$([[ "$CI" = "true" ]] && echo "ci" || echo "local") + export DD_SERVICE=dd-sdk-ios + export SRCROOT="$\(SRCROOT\)" + + # Auto-instrumentation: + export DD_ENABLE_STDOUT_INSTRUMENTATION=0 + export DD_ENABLE_STDERR_INSTRUMENTATION=0 + export DD_DISABLE_NETWORK_INSTRUMENTATION=1 + export DD_DISABLE_RUM_INTEGRATION=1 + export DD_DISABLE_SOURCE_LOCATION=0 + export DD_DISABLE_CRASH_HANDLER=0 + + echo_info "CI Test Visibility setup:" + echo "▸ DD_TEST_RUNNER=$DD_TEST_RUNNER" + echo "▸ DD_ENV=$DD_ENV" + echo "▸ DD_SERVICE=$DD_SERVICE" + echo "▸ SRCROOT=$SRCROOT" + echo "▸ DD_ENABLE_STDOUT_INSTRUMENTATION=$DD_ENABLE_STDOUT_INSTRUMENTATION" + echo "▸ DD_ENABLE_STDERR_INSTRUMENTATION=$DD_ENABLE_STDERR_INSTRUMENTATION" + echo "▸ DD_DISABLE_NETWORK_INSTRUMENTATION=$DD_DISABLE_NETWORK_INSTRUMENTATION" + echo "▸ DD_DISABLE_RUM_INTEGRATION=$DD_DISABLE_RUM_INTEGRATION" + echo "▸ DD_DISABLE_SOURCE_LOCATION=$DD_DISABLE_SOURCE_LOCATION" + echo "▸ DD_DISABLE_CRASH_HANDLER=$DD_DISABLE_CRASH_HANDLER" +} + +if [ "$USE_TEST_VISIBILITY" = "1" ]; then + setup_test_visibility +fi + set -x xcodebuild -version diff --git a/tools/utils/current-git.sh b/tools/utils/current-git.sh index 66658d1387..80eadbca9e 100755 --- a/tools/utils/current-git.sh +++ b/tools/utils/current-git.sh @@ -8,6 +8,8 @@ # --print: Outputs the current Git reference to STDOUT (tag if available, branch otherwise) # --print-tag: Outputs the current Git tag to STDOUT (if available) # --print-branch: Outputs the current Git branch to STDOUT +# --print-commit: Outputs the current Git commit (full SHA) +# --print-commit-short: Outputs the first eight characters of the current commit SHA set -eo pipefail From a82de5a01e3afbce7558d73600c9c85833ba3aa1 Mon Sep 17 00:00:00 2001 From: Maciek Grzybowski Date: Wed, 14 Aug 2024 18:21:53 +0200 Subject: [PATCH 03/13] chore: Update schemes to forward Test Visibility ENVs to `dd-sdk-swift-testing` also enable gathering code coverage for tested targets --- .../xcschemes/DatadogCore iOS.xcscheme | 86 ++++--------------- .../xcschemes/DatadogCore tvOS.xcscheme | 86 ++++--------------- .../DatadogCrashReporting iOS.xcscheme | 72 ++++------------ .../DatadogCrashReporting tvOS.xcscheme | 72 ++++------------ .../xcschemes/DatadogInternal iOS.xcscheme | 79 ++++++++++++++++- .../xcschemes/DatadogInternal tvOS.xcscheme | 79 ++++++++++++++++- .../xcschemes/DatadogLogs iOS.xcscheme | 79 ++++++++++++++++- .../xcschemes/DatadogLogs tvOS.xcscheme | 79 ++++++++++++++++- .../xcschemes/DatadogRUM iOS.xcscheme | 79 ++++++++++++++++- .../xcschemes/DatadogRUM tvOS.xcscheme | 79 ++++++++++++++++- .../DatadogSessionReplay iOS.xcscheme | 85 ++++++------------ .../xcschemes/DatadogTrace iOS.xcscheme | 79 ++++++++++++++++- .../xcschemes/DatadogTrace tvOS.xcscheme | 79 ++++++++++++++++- .../DatadogWebViewTracking iOS.xcscheme | 79 ++++++++++++++++- 14 files changed, 794 insertions(+), 318 deletions(-) diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme index 8eea0f6703..020f6be9c3 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme @@ -34,20 +34,6 @@ ReferencedContainer = "container:Datadog.xcodeproj"> - - - - @@ -81,32 +67,17 @@ - - - - - - - - - - - - - - - - diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore tvOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore tvOS.xcscheme index 3280d3e0e4..ceab9dce70 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore tvOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore tvOS.xcscheme @@ -20,20 +20,6 @@ ReferencedContainer = "container:Datadog.xcodeproj"> - - - - @@ -67,32 +53,17 @@ - - - - - - - - - - - - - - - - diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting iOS.xcscheme index 145c6ae2e4..0548a3d5b8 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting iOS.xcscheme @@ -33,9 +33,9 @@ @@ -53,32 +53,17 @@ - - - - - - - - - - - - - - - - diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting tvOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting tvOS.xcscheme index d1c4d80d64..d7587528b0 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting tvOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting tvOS.xcscheme @@ -33,9 +33,9 @@ @@ -53,32 +53,17 @@ - - - - - - - - - - - - - - - - diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal iOS.xcscheme index b88210c4c2..07a0d15e11 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal iOS.xcscheme @@ -26,7 +26,84 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "NO" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal tvOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal tvOS.xcscheme index ecd19591ee..2bc752114e 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal tvOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal tvOS.xcscheme @@ -26,7 +26,84 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "NO" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs iOS.xcscheme index 8d8c65bf52..176689a05d 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs iOS.xcscheme @@ -26,7 +26,84 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "NO" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs tvOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs tvOS.xcscheme index c28f7de21f..1d1a04a960 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs tvOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs tvOS.xcscheme @@ -26,7 +26,84 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "NO" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM iOS.xcscheme index 3da59df68d..8a80bed3fa 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM iOS.xcscheme @@ -26,7 +26,84 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "NO" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM tvOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM tvOS.xcscheme index 1a9cfff2ee..c852b2192d 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM tvOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM tvOS.xcscheme @@ -26,7 +26,84 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "NO" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogSessionReplay iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogSessionReplay iOS.xcscheme index 440cbbab98..a15ab39490 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogSessionReplay iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogSessionReplay iOS.xcscheme @@ -26,13 +26,15 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "NO"> + shouldUseLaunchSchemeArgsEnv = "NO" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> @@ -50,32 +52,17 @@ - - - - - - - - - - - - - - - - + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace iOS.xcscheme index 20e8be3204..966ff7c79d 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace iOS.xcscheme @@ -26,7 +26,84 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "NO" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace tvOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace tvOS.xcscheme index a3a85bc4c8..a4493cd4b3 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace tvOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace tvOS.xcscheme @@ -26,7 +26,84 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "NO" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogWebViewTracking iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogWebViewTracking iOS.xcscheme index 977495b8e5..ed96a4cd72 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogWebViewTracking iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogWebViewTracking iOS.xcscheme @@ -40,7 +40,84 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "NO" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 38e9955b9ca6996771ca658eb54fcd0e68505ce3 Mon Sep 17 00:00:00 2001 From: Maciek Grzybowski Date: Wed, 14 Aug 2024 18:22:11 +0200 Subject: [PATCH 04/13] chore: Enable Test Visibility for CI runs --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 143c90cb0e..204722a6f6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,7 +96,7 @@ Unit Tests (iOS): script: - ./tools/runner-setup.sh --xcode "$DEFAULT_XCODE" - make clean repo-setup ENV=ci - - make test-ios-all OS="$DEFAULT_IOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" + - make test-ios-all OS="$DEFAULT_IOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" USE_TEST_VISIBILITY=1 Unit Tests (tvOS): stage: test @@ -109,7 +109,7 @@ Unit Tests (tvOS): script: - ./tools/runner-setup.sh --xcode "$DEFAULT_XCODE" - make clean repo-setup ENV=ci - - make test-tvos-all OS="$DEFAULT_TVOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" + - make test-tvos-all OS="$DEFAULT_TVOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" USE_TEST_VISIBILITY=1 UI Tests: stage: ui-test From 56064dcfc7bc2c761908369ab29aa15cb5a19010 Mon Sep 17 00:00:00 2001 From: Maciek Grzybowski Date: Mon, 19 Aug 2024 09:58:47 +0200 Subject: [PATCH 05/13] chore: Forward DD_GIT_REPOSITORY_URL to Test Visibility --- .../xcshareddata/xcschemes/DatadogCore iOS.xcscheme | 5 +++++ .../xcshareddata/xcschemes/DatadogCore tvOS.xcscheme | 5 +++++ .../xcschemes/DatadogCrashReporting iOS.xcscheme | 5 +++++ .../xcschemes/DatadogCrashReporting tvOS.xcscheme | 5 +++++ .../xcshareddata/xcschemes/DatadogInternal iOS.xcscheme | 5 +++++ .../xcshareddata/xcschemes/DatadogInternal tvOS.xcscheme | 5 +++++ .../xcshareddata/xcschemes/DatadogLogs iOS.xcscheme | 5 +++++ .../xcshareddata/xcschemes/DatadogLogs tvOS.xcscheme | 5 +++++ .../xcshareddata/xcschemes/DatadogRUM iOS.xcscheme | 5 +++++ .../xcshareddata/xcschemes/DatadogRUM tvOS.xcscheme | 5 +++++ .../xcshareddata/xcschemes/DatadogSessionReplay iOS.xcscheme | 5 +++++ .../xcshareddata/xcschemes/DatadogTrace iOS.xcscheme | 5 +++++ .../xcshareddata/xcschemes/DatadogTrace tvOS.xcscheme | 5 +++++ .../xcschemes/DatadogWebViewTracking iOS.xcscheme | 5 +++++ tools/test.sh | 4 ++++ 15 files changed, 74 insertions(+) diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme index 020f6be9c3..447f75efe7 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme @@ -115,6 +115,11 @@ value = "$(DD_DISABLE_CRASH_HANDLER)" isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + Date: Mon, 19 Aug 2024 10:24:43 +0200 Subject: [PATCH 06/13] chore: Forward DD_GIT_BRANCH and DD_GIT_TAG to Test Visibility --- .../xcshareddata/xcschemes/DatadogCore iOS.xcscheme | 10 ++++++++++ .../xcshareddata/xcschemes/DatadogCore tvOS.xcscheme | 10 ++++++++++ .../xcschemes/DatadogCrashReporting iOS.xcscheme | 10 ++++++++++ .../xcschemes/DatadogCrashReporting tvOS.xcscheme | 10 ++++++++++ .../xcschemes/DatadogInternal iOS.xcscheme | 10 ++++++++++ .../xcschemes/DatadogInternal tvOS.xcscheme | 10 ++++++++++ .../xcshareddata/xcschemes/DatadogLogs iOS.xcscheme | 10 ++++++++++ .../xcshareddata/xcschemes/DatadogLogs tvOS.xcscheme | 10 ++++++++++ .../xcshareddata/xcschemes/DatadogRUM iOS.xcscheme | 10 ++++++++++ .../xcshareddata/xcschemes/DatadogRUM tvOS.xcscheme | 10 ++++++++++ .../xcschemes/DatadogSessionReplay iOS.xcscheme | 10 ++++++++++ .../xcshareddata/xcschemes/DatadogTrace iOS.xcscheme | 10 ++++++++++ .../xcshareddata/xcschemes/DatadogTrace tvOS.xcscheme | 10 ++++++++++ .../xcschemes/DatadogWebViewTracking iOS.xcscheme | 10 ++++++++++ tools/test.sh | 6 ++++++ 15 files changed, 146 insertions(+) diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme index 447f75efe7..d91b12fa82 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme @@ -120,6 +120,16 @@ value = "$(DD_GIT_REPOSITORY_URL)" isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Date: Mon, 19 Aug 2024 11:23:51 +0200 Subject: [PATCH 07/13] chore: Use Test Visibility in shadowed GitLab build --- .gitlab-ci.yml | 16 +++++++++++++++- tools/test.sh | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 204722a6f6..fb7b9153e6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,6 +93,20 @@ Unit Tests (iOS): variables: PLATFORM: "iOS Simulator" DEVICE: "iPhone 15 Pro" + script: + - ./tools/runner-setup.sh --xcode "$DEFAULT_XCODE" + - make clean repo-setup ENV=ci + - make test-ios-all OS="$DEFAULT_IOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" USE_TEST_VISIBILITY=0 + +Unit Tests (iOS, Test Visibility shadow): + stage: test + rules: + - !reference [.test-pipeline-job, rules] + - !reference [.release-pipeline-job, rules] + variables: + PLATFORM: "iOS Simulator" + DEVICE: "iPhone 15 Pro" + allow_failure: true script: - ./tools/runner-setup.sh --xcode "$DEFAULT_XCODE" - make clean repo-setup ENV=ci @@ -109,7 +123,7 @@ Unit Tests (tvOS): script: - ./tools/runner-setup.sh --xcode "$DEFAULT_XCODE" - make clean repo-setup ENV=ci - - make test-tvos-all OS="$DEFAULT_TVOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" USE_TEST_VISIBILITY=1 + - make test-tvos-all OS="$DEFAULT_TVOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" USE_TEST_VISIBILITY=0 UI Tests: stage: ui-test diff --git a/tools/test.sh b/tools/test.sh index 8bb0e6c56c..76fdfbe063 100755 --- a/tools/test.sh +++ b/tools/test.sh @@ -50,7 +50,7 @@ setup_test_visibility() { # Git metadata: # - While `dd-sdk-swift-testing` can read Git metadata from `.git` folder, following info must be overwritten - # due to our GH → GitLab mirroring configuration. + # due to our GH → GitLab mirroring configuration (otherwise it will point to GitLab mirror not GH repo). export DD_GIT_REPOSITORY_URL="git@github.com:DataDog/dd-sdk-ios.git" export DD_GIT_BRANCH=$(current_git_branch) export DD_GIT_TAG=$(current_git_tag) From a5ec6e87e7794fdc6125349b4d970b7a91580eba Mon Sep 17 00:00:00 2001 From: Maciek Grzybowski Date: Mon, 19 Aug 2024 11:27:38 +0200 Subject: [PATCH 08/13] chore: Bump CI Test Visibility to `2.5.0-alpha3` --- Datadog/Datadog.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Datadog/Datadog.xcodeproj/project.pbxproj b/Datadog/Datadog.xcodeproj/project.pbxproj index af083e90da..2118094936 100644 --- a/Datadog/Datadog.xcodeproj/project.pbxproj +++ b/Datadog/Datadog.xcodeproj/project.pbxproj @@ -13697,7 +13697,7 @@ repositoryURL = "https://github.com/DataDog/dd-sdk-swift-testing.git"; requirement = { kind = exactVersion; - version = "2.5.0-alpha2"; + version = "2.5.0-alpha3"; }; }; /* End XCRemoteSwiftPackageReference section */ From a1efa80858aba43f1d2404c9e9eab7e3d4dbbb3f Mon Sep 17 00:00:00 2001 From: Maciek Grzybowski Date: Mon, 19 Aug 2024 14:12:22 +0200 Subject: [PATCH 09/13] chore: Cleanup ENVs in DatadogObjc xcscheme --- .../xcschemes/DatadogObjc iOS.xcscheme | 92 ------------------- .../xcschemes/DatadogObjc tvOS.xcscheme | 92 ------------------- 2 files changed, 184 deletions(-) diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogObjc iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogObjc iOS.xcscheme index 6758f81ec1..3749d2bd23 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogObjc iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogObjc iOS.xcscheme @@ -44,98 +44,6 @@ isEnabled = "YES"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Date: Wed, 21 Aug 2024 10:10:18 +0200 Subject: [PATCH 10/13] chore: Export DD_TRACE_DEBUG and enhance CI env debugging --- tools/env-check.sh | 20 ++++++++++++++++++-- tools/test.sh | 9 +++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/tools/env-check.sh b/tools/env-check.sh index e1a201404e..8e6d7c3938 100755 --- a/tools/env-check.sh +++ b/tools/env-check.sh @@ -93,9 +93,25 @@ if [ "$CI" = "true" ]; then ./tools/secrets/check-secrets.sh echo_subtitle "Print CI env" - echo "▸ CI_COMMIT_TAG = ${CI_COMMIT_TAG:-(not set or empty)}" - echo "▸ CI_COMMIT_BRANCH = ${CI_COMMIT_BRANCH:-(not set or empty)}" + # GitLab: + echo "▸ GITLAB_CI = ${GITLAB_CI:-(not set or empty)}" + echo "▸ CI_PROJECT_DIR = ${CI_PROJECT_DIR:-(not set or empty)}" + echo "▸ CI_JOB_STAGE = ${CI_JOB_STAGE:-(not set or empty)}" + echo "▸ CI_JOB_NAME = ${CI_JOB_NAME:-(not set or empty)}" + echo "▸ CI_JOB_URL = ${CI_JOB_URL:-(not set or empty)}" + echo "▸ CI_PIPELINE_ID = ${CI_PIPELINE_ID:-(not set or empty)}" + echo "▸ CI_PIPELINE_IID = ${CI_PIPELINE_IID:-(not set or empty)}" + echo "▸ CI_PIPELINE_URL = ${CI_PIPELINE_URL:-(not set or empty)}" + echo "▸ CI_PROJECT_PATH = ${CI_PROJECT_PATH:-(not set or empty)}" + echo "▸ CI_PROJECT_URL = ${CI_PROJECT_URL:-(not set or empty)}" echo "▸ CI_COMMIT_SHA = ${CI_COMMIT_SHA:-(not set or empty)}" + echo "▸ CI_REPOSITORY_URL = ${CI_REPOSITORY_URL:-(not set or empty)}" + echo "▸ CI_COMMIT_BRANCH = ${CI_COMMIT_BRANCH:-(not set or empty)}" + echo "▸ CI_COMMIT_TAG = ${CI_COMMIT_TAG:-(not set or empty)}" + echo "▸ CI_COMMIT_MESSAGE = ${CI_COMMIT_MESSAGE:-(not set or empty)}" + echo "▸ CI_COMMIT_AUTHOR = ${CI_COMMIT_AUTHOR:-(not set or empty)}" + echo "▸ CI_COMMIT_TIMESTAMP = ${CI_COMMIT_TIMESTAMP:-(not set or empty)}" + # Custom: echo "▸ RELEASE_GIT_TAG = ${RELEASE_GIT_TAG:-(not set or empty)}" echo "▸ RELEASE_DRY_RUN = ${RELEASE_DRY_RUN:-(not set or empty)}" fi diff --git a/tools/test.sh b/tools/test.sh index 76fdfbe063..558eb23166 100755 --- a/tools/test.sh +++ b/tools/test.sh @@ -48,12 +48,14 @@ setup_test_visibility() { export DD_DISABLE_SOURCE_LOCATION=0 export DD_DISABLE_CRASH_HANDLER=0 + # Debugging: + # - If `DD_TRACE_DEBUG` is enabled, the `dd-sdk-swift-testing` will print extra debug logs. + export DD_TRACE_DEBUG=0 + # Git metadata: # - While `dd-sdk-swift-testing` can read Git metadata from `.git` folder, following info must be overwritten # due to our GH → GitLab mirroring configuration (otherwise it will point to GitLab mirror not GH repo). export DD_GIT_REPOSITORY_URL="git@github.com:DataDog/dd-sdk-ios.git" - export DD_GIT_BRANCH=$(current_git_branch) - export DD_GIT_TAG=$(current_git_tag) echo_info "CI Test Visibility setup:" echo "▸ DD_TEST_RUNNER=$DD_TEST_RUNNER" @@ -66,9 +68,8 @@ setup_test_visibility() { echo "▸ DD_DISABLE_RUM_INTEGRATION=$DD_DISABLE_RUM_INTEGRATION" echo "▸ DD_DISABLE_SOURCE_LOCATION=$DD_DISABLE_SOURCE_LOCATION" echo "▸ DD_DISABLE_CRASH_HANDLER=$DD_DISABLE_CRASH_HANDLER" + echo "▸ DD_TRACE_DEBUG=$DD_TRACE_DEBUG" echo "▸ DD_GIT_REPOSITORY_URL=$DD_GIT_REPOSITORY_URL" - echo "▸ DD_GIT_BRANCH=$DD_GIT_BRANCH" - echo "▸ DD_GIT_TAG=$DD_GIT_TAG" } if [ "$USE_TEST_VISIBILITY" = "1" ]; then From 08a24b1e720c27086059b33b8523eb466c92894b Mon Sep 17 00:00:00 2001 From: Maciek Grzybowski Date: Wed, 21 Aug 2024 10:16:14 +0200 Subject: [PATCH 11/13] WIP --- .gitlab-ci.yml | 20 ++--- .../xcschemes/DatadogCore iOS.xcscheme | 83 ++++++++++++++++++- 2 files changed, 89 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb7b9153e6..b2f286b8bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,7 +85,7 @@ Lint: - make lint license-check - make rum-models-verify sr-models-verify -Unit Tests (iOS): +.Unit Tests (iOS): stage: test rules: - !reference [.test-pipeline-job, rules] @@ -112,7 +112,7 @@ Unit Tests (iOS, Test Visibility shadow): - make clean repo-setup ENV=ci - make test-ios-all OS="$DEFAULT_IOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" USE_TEST_VISIBILITY=1 -Unit Tests (tvOS): +.Unit Tests (tvOS): stage: test rules: - !reference [.test-pipeline-job, rules] @@ -125,7 +125,7 @@ Unit Tests (tvOS): - make clean repo-setup ENV=ci - make test-tvos-all OS="$DEFAULT_TVOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" USE_TEST_VISIBILITY=0 -UI Tests: +.UI Tests: stage: ui-test rules: - !reference [.test-pipeline-job, rules] @@ -145,7 +145,7 @@ UI Tests: - make clean repo-setup ENV=ci - make ui-test TEST_PLAN="$TEST_PLAN" OS="$DEFAULT_IOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" -SR Snapshot Tests: +.SR Snapshot Tests: stage: ui-test rules: - !reference [.test-pipeline-job, rules] @@ -164,7 +164,7 @@ SR Snapshot Tests: - make clean repo-setup ENV=ci - make sr-snapshots-pull sr-snapshot-test OS="$DEFAULT_IOS_OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" ARTIFACTS_PATH="$ARTIFACTS_PATH" -Tools Tests: +.Tools Tests: stage: test rules: - if: '$CI_COMMIT_BRANCH' # when on branch with following changes compared to develop @@ -178,7 +178,7 @@ Tools Tests: - make clean repo-setup ENV=ci - make tools-test -Smoke Tests (iOS): +.Smoke Tests (iOS): stage: smoke-test rules: - !reference [.test-pipeline-job, rules] @@ -197,7 +197,7 @@ Smoke Tests (iOS): - make spm-build-ios - make smoke-test-ios-all OS="$OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" -Smoke Tests (tvOS): +.Smoke Tests (tvOS): stage: smoke-test rules: - !reference [.test-pipeline-job, rules] @@ -216,7 +216,7 @@ Smoke Tests (tvOS): - make spm-build-tvos - make smoke-test-tvos-all OS="$OS" PLATFORM="$PLATFORM" DEVICE="$DEVICE" -Smoke Tests (visionOS): +.Smoke Tests (visionOS): stage: smoke-test rules: - !reference [.test-pipeline-job, rules] @@ -232,7 +232,7 @@ Smoke Tests (visionOS): - make clean repo-setup ENV=ci - make spm-build-visionos -Smoke Tests (macOS): +.Smoke Tests (macOS): stage: smoke-test rules: - !reference [.test-pipeline-job, rules] @@ -247,7 +247,7 @@ Smoke Tests (macOS): - make clean repo-setup ENV=ci - make spm-build-macos -Smoke Tests (watchOS): +.Smoke Tests (watchOS): stage: smoke-test rules: - !reference [.test-pipeline-job, rules] diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme index d91b12fa82..ab8c2ad95a 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme @@ -121,13 +121,88 @@ isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 73f0fcb355d4612632611dd8eb8937421679a485 Mon Sep 17 00:00:00 2001 From: Maciek Grzybowski Date: Wed, 21 Aug 2024 10:45:22 +0200 Subject: [PATCH 12/13] chore: Pass GitLab envs to Test Visibility --- .../xcschemes/DatadogCore iOS.xcscheme | 5 -- .../xcschemes/DatadogCore tvOS.xcscheme | 78 ++++++++++++++++++- .../DatadogCrashReporting iOS.xcscheme | 78 ++++++++++++++++++- .../DatadogCrashReporting tvOS.xcscheme | 78 ++++++++++++++++++- .../xcschemes/DatadogInternal iOS.xcscheme | 78 ++++++++++++++++++- .../xcschemes/DatadogInternal tvOS.xcscheme | 78 ++++++++++++++++++- .../xcschemes/DatadogLogs iOS.xcscheme | 78 ++++++++++++++++++- .../xcschemes/DatadogLogs tvOS.xcscheme | 78 ++++++++++++++++++- .../xcschemes/DatadogRUM iOS.xcscheme | 78 ++++++++++++++++++- .../xcschemes/DatadogRUM tvOS.xcscheme | 78 ++++++++++++++++++- .../DatadogSessionReplay iOS.xcscheme | 78 ++++++++++++++++++- .../xcschemes/DatadogTrace iOS.xcscheme | 78 ++++++++++++++++++- .../xcschemes/DatadogTrace tvOS.xcscheme | 78 ++++++++++++++++++- .../DatadogWebViewTracking iOS.xcscheme | 78 ++++++++++++++++++- tools/test.sh | 18 ++++- 15 files changed, 979 insertions(+), 58 deletions(-) diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme index ab8c2ad95a..eaca1e4c15 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCore iOS.xcscheme @@ -175,11 +175,6 @@ value = "$(CI_COMMIT_SHA)" isEnabled = "YES"> - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting iOS.xcscheme index d3bf00c856..853f578441 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting iOS.xcscheme @@ -107,13 +107,83 @@ isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting tvOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting tvOS.xcscheme index 44b3610793..417294662d 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting tvOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogCrashReporting tvOS.xcscheme @@ -107,13 +107,83 @@ isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal iOS.xcscheme index 180a66c686..a4422a9c7e 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal iOS.xcscheme @@ -100,13 +100,83 @@ isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal tvOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal tvOS.xcscheme index 0bd4f12743..251f49560e 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal tvOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogInternal tvOS.xcscheme @@ -100,13 +100,83 @@ isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs iOS.xcscheme index 70b7429725..96304d7948 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs iOS.xcscheme @@ -100,13 +100,83 @@ isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs tvOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs tvOS.xcscheme index 0a0bbe6cc2..bb2fb24be0 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs tvOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogLogs tvOS.xcscheme @@ -100,13 +100,83 @@ isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM iOS.xcscheme index a784d4da8e..0911175fa7 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM iOS.xcscheme @@ -100,13 +100,83 @@ isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM tvOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM tvOS.xcscheme index 46fa1b9ac7..13de3f1975 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM tvOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogRUM tvOS.xcscheme @@ -100,13 +100,83 @@ isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogSessionReplay iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogSessionReplay iOS.xcscheme index b75c281953..07a31a4557 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogSessionReplay iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogSessionReplay iOS.xcscheme @@ -106,13 +106,83 @@ isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace iOS.xcscheme index 8aeb8250ab..05898dd9fd 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace iOS.xcscheme @@ -100,13 +100,83 @@ isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace tvOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace tvOS.xcscheme index 04b7007d12..0ba9e725e5 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace tvOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogTrace tvOS.xcscheme @@ -100,13 +100,83 @@ isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogWebViewTracking iOS.xcscheme b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogWebViewTracking iOS.xcscheme index 77411aed74..a5fee88576 100644 --- a/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogWebViewTracking iOS.xcscheme +++ b/Datadog/Datadog.xcodeproj/xcshareddata/xcschemes/DatadogWebViewTracking iOS.xcscheme @@ -114,13 +114,83 @@ isEnabled = "YES"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/test.sh b/tools/test.sh index 558eb23166..f372a42871 100755 --- a/tools/test.sh +++ b/tools/test.sh @@ -59,6 +59,7 @@ setup_test_visibility() { echo_info "CI Test Visibility setup:" echo "▸ DD_TEST_RUNNER=$DD_TEST_RUNNER" + echo "▸ DD_API_KEY=$([[ -n "$DD_API_KEY" ]] && echo '***' || echo '')" echo "▸ DD_ENV=$DD_ENV" echo "▸ DD_SERVICE=$DD_SERVICE" echo "▸ SRCROOT=$SRCROOT" @@ -68,8 +69,23 @@ setup_test_visibility() { echo "▸ DD_DISABLE_RUM_INTEGRATION=$DD_DISABLE_RUM_INTEGRATION" echo "▸ DD_DISABLE_SOURCE_LOCATION=$DD_DISABLE_SOURCE_LOCATION" echo "▸ DD_DISABLE_CRASH_HANDLER=$DD_DISABLE_CRASH_HANDLER" - echo "▸ DD_TRACE_DEBUG=$DD_TRACE_DEBUG" echo "▸ DD_GIT_REPOSITORY_URL=$DD_GIT_REPOSITORY_URL" + echo "▸ DD_TRACE_DEBUG=$DD_TRACE_DEBUG" + echo "▸ GITLAB_CI=$GITLAB_CI" + echo "▸ CI_PROJECT_DIR=$CI_PROJECT_DIR" + echo "▸ CI_JOB_STAGE=$CI_JOB_STAGE" + echo "▸ CI_JOB_NAME=$CI_JOB_NAME" + echo "▸ CI_JOB_URL=$CI_JOB_URL" + echo "▸ CI_PIPELINE_ID=$CI_PIPELINE_ID" + echo "▸ CI_PIPELINE_IID=$CI_PIPELINE_IID" + echo "▸ CI_PIPELINE_URL=$CI_PIPELINE_URL" + echo "▸ CI_PROJECT_PATH=$CI_PROJECT_PATH" + echo "▸ CI_COMMIT_SHA=$CI_COMMIT_SHA" + echo "▸ CI_COMMIT_BRANCH=$CI_COMMIT_BRANCH" + echo "▸ CI_COMMIT_TAG=$CI_COMMIT_TAG" + echo "▸ CI_COMMIT_MESSAGE=$CI_COMMIT_MESSAGE" + echo "▸ CI_COMMIT_AUTHOR=$CI_COMMIT_AUTHOR" + echo "▸ CI_COMMIT_TIMESTAMP=$CI_COMMIT_TIMESTAMP" } if [ "$USE_TEST_VISIBILITY" = "1" ]; then From 5fa648bd5a8cfd402fedccb1dd49db7bda09d7e5 Mon Sep 17 00:00:00 2001 From: Maciek Grzybowski Date: Wed, 21 Aug 2024 11:00:57 +0200 Subject: [PATCH 13/13] chore: Bump `dd-sdk-swift-testing` to 2.5.0 --- Datadog/Datadog.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Datadog/Datadog.xcodeproj/project.pbxproj b/Datadog/Datadog.xcodeproj/project.pbxproj index 2118094936..c20ff12e5a 100644 --- a/Datadog/Datadog.xcodeproj/project.pbxproj +++ b/Datadog/Datadog.xcodeproj/project.pbxproj @@ -13696,8 +13696,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/DataDog/dd-sdk-swift-testing.git"; requirement = { - kind = exactVersion; - version = "2.5.0-alpha3"; + kind = upToNextMajorVersion; + minimumVersion = 2.5.0; }; }; /* End XCRemoteSwiftPackageReference section */