Skip to content

Commit

Permalink
RUMM-301 PR comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
buranmert committed Apr 23, 2020
1 parent 4dfe390 commit c81b021
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 55 deletions.
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all: tools dependencies xcodeproj-httpservermock templates examples benchmark
all: tools dependencies xcodeproj-httpservermock templates
.PHONY : examples tools

tools:
Expand All @@ -25,11 +25,6 @@ templates:
./tools/xcode-templates/install-xcode-templates.sh
@echo "OK 👌"

examples:
@echo "⚙️ Generating 'examples/examples-secret.xcconfig' file..."
./tools/config/generate-examples-config-template.sh
@echo "OK 👌"

# Tests if current branch ships a valid SPM package.
test-spm:
@cd dependency-manager-tests/spm && $(MAKE)
Expand Down
5 changes: 3 additions & 2 deletions Shopist/Shopist.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand All @@ -425,6 +425,7 @@
};
9EE2AA17244F38E000A2C252 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9EE0E1B6244F65B30030DC52 /* Shopist.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
Expand Down Expand Up @@ -467,7 +468,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
Expand Down
12 changes: 11 additions & 1 deletion Shopist/Shopist/Utils/ConsoleOutputInterceptor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
* Copyright 2019-2020 Datadog, Inc.
*/

#if DEBUG

/// Below `@testable import` is only for SDK debug purposes, to easily override internal `consolePrint` function and display
/// the output of the `Logger` in UI. Should be never used in client's application code.
@testable import Datadog
import Foundation
import UIKit

class ConsoleOutputInterceptor {
Expand Down Expand Up @@ -49,3 +50,12 @@ func startDisplayingDebugInfo(in textView: UITextView) {
textView?.text = newContents
}
}

#else

import UIKit.UITextView

func installConsoleOutputInterceptor() { }
func startDisplayingDebugInfo(in textView: UITextView) { }

#endif
59 changes: 21 additions & 38 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@ workflows:
- _make_dependencies
- run_linter
- run_unit_tests
- run_ui_tests
- run_integration_tests
- check_dependency_managers
# I disable it for now, as this would require supporting local pod installation
# of `DatadogSDK.podspec` in CP example project. This effort will be lost as in `RUMM-334`
# we're going to re-do sample apps layout and not use local pod anymore.
# - check_example_projects
- _deploy_artifacts

_make_dependencies:
Expand Down Expand Up @@ -94,6 +91,26 @@ workflows:
- destination: platform=OS X,arch=x86_64
- project_path: instrumented-tests/http-server-mock/HTTPServerMock.xcodeproj

run_ui_tests:
description: |-
Runs UI tests for Shopist app on iOS Simulator.
steps:
- [email protected]:
title: Generate client token for Shopist
inputs:
- content: |-
#!/usr/bin/env bash
set -e
cd Shopist && make
- [email protected]:
title: Run UI tests for Shopist - iOS Simulator
inputs:
- scheme: Shopist
- simulator_device: iPhone 11
- generate_code_coverage_files: 'yes'
- project_path: Shopist/Shopist.xcodeproj
- xcpretty_test_options: --color --report html --output "${BITRISE_DEPLOY_DIR}/Shopist-UI-tests.html"

run_integration_tests:
description: |-
Runs integration tests from Datadog.xcworkspace.
Expand Down Expand Up @@ -158,37 +175,3 @@ workflows:
- cache_level: none
- project_path: "$BITRISE_SOURCE_DIR/dependency-manager-tests/cocoapods/CPProject.xcworkspace"
- xcpretty_test_options: --color --report html --output "${BITRISE_DEPLOY_DIR}/CPProject-tests.html"

check_example_projects:
description: |-
Links SDK to example projects using supported dependency
managers (SPM and Cocoapods). With UITests it checks if example apps start with
no dylib error.
steps:
- cocoapods-install:
inputs:
- is_cache_disabled: 'true'
- source_root_path: "$BITRISE_SOURCE_DIR/examples/iOS-app-example-cocoapods"
- [email protected]:
title: Generate fake Client Token
inputs:
- content: |-
#!/usr/bin/env bash
set -e
make examples
- xcode-test:
title: Run CP's example UITests
inputs:
- scheme: iOS-app-example-cocoapods
- is_clean_build: 'yes'
- cache_level: none
- project_path: "$BITRISE_SOURCE_DIR/examples/iOS-app-example-cocoapods/iOS-app-example-cocoapods.xcworkspace"
- xcpretty_test_options: --color --report html --output "${BITRISE_DEPLOY_DIR}/Cocoapods-example-ui-tests.html"
- xcode-test:
title: Run SPM's example UITests
inputs:
- scheme: iOS-app-example-spm
- is_clean_build: 'yes'
- cache_level: none
- project_path: "$BITRISE_SOURCE_DIR/examples/iOS-app-example-spm/iOS-app-example-spm.xcodeproj"
- xcpretty_test_options: --color --report html --output "${BITRISE_DEPLOY_DIR}/SPM-example-ui-tests.html"
1 change: 0 additions & 1 deletion tools/config/examples-secret-template.xcconfig

This file was deleted.

7 changes: 0 additions & 7 deletions tools/config/generate-examples-config-template.sh

This file was deleted.

0 comments on commit c81b021

Please sign in to comment.