diff --git a/.buildsystem/deploy-github.sh b/.buildsystem/deploy-github.sh index b0159cd1d..099ac127d 100755 --- a/.buildsystem/deploy-github.sh +++ b/.buildsystem/deploy-github.sh @@ -18,7 +18,7 @@ fi DTASK=":publishDefaultPublicationToGitHubRepository" -TARGETS=":core$DTASK :vendor:vendor-android$DTASK :marathon-gradle-plugin$DTASK :report:execution-timeline$DTASK :report:html-report$DTASK :analytics:usage$DTASK" +TARGETS=":core$DTASK :vendor:vendor-android$DTASK :marathon-gradle-plugin$DTASK :report:execution-timeline$DTASK :report:html-report$DTASK" if [ -n "$TRAVIS_TAG" ]; then echo "on a tag -> deploy release version $TRAVIS_TAG" diff --git a/.buildsystem/deploy-sonatype.sh b/.buildsystem/deploy-sonatype.sh index 03281858a..51e7af64c 100755 --- a/.buildsystem/deploy-sonatype.sh +++ b/.buildsystem/deploy-sonatype.sh @@ -19,7 +19,7 @@ fi DTASK=":publishDefaultPublicationToOSSHRRepository" -TARGETS=":core$DTASK :vendor:vendor-android$DTASK :marathon-gradle-plugin$DTASK :report:execution-timeline$DTASK :report:html-report$DTASK :analytics:usage$DTASK" +TARGETS=":core$DTASK :vendor:vendor-android$DTASK :marathon-gradle-plugin$DTASK :report:execution-timeline$DTASK :report:html-report$DTASK" if [ -z "$TRAVIS_TAG" ]; then echo "not on a tag -> deploy snapshot version" diff --git a/.buildsystem/deploy.sh b/.buildsystem/deploy.sh index 59631ce3e..887b4f47b 100755 --- a/.buildsystem/deploy.sh +++ b/.buildsystem/deploy.sh @@ -2,7 +2,7 @@ cd `dirname $0`/.. TARGETS="" -for i in ":core" ":vendor:vendor-android:base" ":vendor:vendor-android:ddmlib" ":marathon-gradle-plugin" ":report:execution-timeline" ":report:html-report" ":analytics:usage"; do +for i in ":core" ":vendor:vendor-android:base" ":vendor:vendor-android:ddmlib" ":marathon-gradle-plugin" ":report:execution-timeline" ":report:html-report"; do TARGETS="$TARGETS $i:publishDefaultPublicationToMavenLocal" done diff --git a/.github/labeler.yml b/.github/labeler.yml index 2993ec4ab..6dcfbf64e 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,9 +1,6 @@ -analytics: analytics/**/* core: core/**/* -cli: cli/**/* report: report/**/* vendor: vendor/**/* -ios: vendor/vendor-ios/**/* android: vendor/vendor-android/**/* gradle-plugin: marathon-gradle-plugin/**/* sample: sample/**/* @@ -15,8 +12,6 @@ build: git: - .gitignore - CODEOWNERS -travis: - - .travis.yml workflow: - .github/**/* ide: diff --git a/.gitignore b/.gitignore index 294ca6f3a..bd3267a39 100644 --- a/.gitignore +++ b/.gitignore @@ -274,5 +274,4 @@ DerivedData *.ipa *.xcuserstate *.profraw -sample/ios-app/Marathondevices local.properties diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1b8d98e57..000000000 --- a/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -language: java -dist: trusty - -jdk: - - openjdk8 - -sudo: required -services: - - docker - -before_cache: - - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - - rm -rf $HOME/.gradle/caches/*/plugin-resolution/ - -cache: - directories: - - $HOME/.gradle/caches/ - - $HOME/.gradle/wrapper/ - -before_install: - - docker pull axiom/rsync-server - - echo -e "Host localhost\n\tStrictHostKeyChecking no\n" >> $HOME/.ssh/config - - echo 'localhost ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBMaFQFXjCQRbvc8XQpz3DZHF/spSHqqpfNgiFp+KUHtaysaHn2kpx2dpurkx7TvM9bxBgxoNj4WNwce4UqwJgSo=' >> $HOME/.ssh/known_hosts - -jobs: - include: - - stage: test - script: - - chmod 0600 $TRAVIS_BUILD_DIR/vendor/vendor-ios/src/test/resources/fixtures/derived-data-manager/test_rsa - - ./gradlew clean test jacocoTestReport integrationTest - - bash <(curl -s https://codecov.io/bash) - - stage: detekt - script: ./gradlew clean detektCheck diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index f481e9675..000000000 --- a/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @malinskiy @tagantroy @vacxe diff --git a/README.md b/README.md index 495995bf8..fbe9bd8b3 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,5 @@ -[![Build Status](https://travis-ci.org/Malinskiy/marathon.svg?branch=develop)](https://travis-ci.org/Malinskiy/marathon) -[![codecov](https://codecov.io/gh/malinskiy/marathon/branch/develop/graph/badge.svg)](https://codecov.io/gh/malinskiy/marathon) -[![Slack](https://img.shields.io/badge/slack-chat-green.svg?logo=slack&longCache=true&style=flat)](https://bit.ly/2LLghaW) - # Marathon -Cross-platform test runner written for Android and iOS projects +Cross-platform test runner for Android projects ## Main focus - **stability** of test execution adjusting for flakiness in the environment and in the tests. diff --git a/analytics/usage/build.gradle.kts b/analytics/usage/build.gradle.kts deleted file mode 100644 index c49183787..000000000 --- a/analytics/usage/build.gradle.kts +++ /dev/null @@ -1,11 +0,0 @@ -plugins { - `java-library` - id("org.jetbrains.kotlin.jvm") - id("org.jetbrains.dokka") -} - -Deployment.initialize(project) - -dependencies { - implementation(Analytics.googleAnalyticsWrapper) -} diff --git a/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/Constants.kt b/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/Constants.kt deleted file mode 100644 index 0c75dc61d..000000000 --- a/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/Constants.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.malinskiy.marathon.usageanalytics - -internal object Constants { - const val GoogleAnalyticsId = "UA-131132823-1" - const val AnalyticsCategory = "UsageAnalytics" -} \ No newline at end of file diff --git a/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/TrackActionType.kt b/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/TrackActionType.kt deleted file mode 100644 index cf8c70835..000000000 --- a/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/TrackActionType.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.malinskiy.marathon.usageanalytics - -enum class TrackActionType { - RunType, - VendorConfiguration, - RetryStrategy, - SortingStrategy, - ShardingStrategy, - PoolingStrategy, - BatchingStrategy, - FlakinessStrategy -} \ No newline at end of file diff --git a/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/UsageAnalytics.kt b/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/UsageAnalytics.kt deleted file mode 100644 index 2d28af90a..000000000 --- a/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/UsageAnalytics.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.malinskiy.marathon.usageanalytics - -import com.malinskiy.marathon.usageanalytics.tracker.EmptyTracker -import com.malinskiy.marathon.usageanalytics.tracker.GoogleAnalyticsTracker -import com.malinskiy.marathon.usageanalytics.tracker.UsageTracker - -object UsageAnalytics { - var enable = false - - val USAGE_TRACKER: UsageTracker by lazy { - if (enable) GoogleAnalyticsTracker() else EmptyTracker() - } -} diff --git a/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/tracker/EmptyTracker.kt b/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/tracker/EmptyTracker.kt deleted file mode 100644 index 1f744d0a3..000000000 --- a/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/tracker/EmptyTracker.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.malinskiy.marathon.usageanalytics.tracker - -internal class EmptyTracker : UsageTracker { - override fun trackEvent(event: Event) { - - } -} \ No newline at end of file diff --git a/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/tracker/Event.kt b/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/tracker/Event.kt deleted file mode 100644 index e88beeecf..000000000 --- a/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/tracker/Event.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.malinskiy.marathon.usageanalytics.tracker - -import com.malinskiy.marathon.usageanalytics.TrackActionType - -data class Event( - val action: TrackActionType, - val label: String -) \ No newline at end of file diff --git a/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/tracker/GoogleAnalyticsTracker.kt b/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/tracker/GoogleAnalyticsTracker.kt deleted file mode 100644 index da5801202..000000000 --- a/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/tracker/GoogleAnalyticsTracker.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.malinskiy.marathon.usageanalytics.tracker - -import com.brsanthu.googleanalytics.GoogleAnalytics -import com.malinskiy.marathon.usageanalytics.Constants -import com.malinskiy.marathon.usageanalytics.Constants.AnalyticsCategory - -internal class GoogleAnalyticsTracker() : UsageTracker { - - private val tracker = GoogleAnalytics.builder() - .withTrackingId(Constants.GoogleAnalyticsId) - .build() - - override fun trackEvent(event: Event) { - tracker.event() - .eventCategory(AnalyticsCategory) - .eventAction(event.action.name) - .eventLabel(event.label) - .sendAsync() - } -} \ No newline at end of file diff --git a/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/tracker/UsageTracker.kt b/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/tracker/UsageTracker.kt deleted file mode 100644 index e65ea44e6..000000000 --- a/analytics/usage/src/main/kotlin/com/malinskiy/marathon/usageanalytics/tracker/UsageTracker.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.malinskiy.marathon.usageanalytics.tracker - -interface UsageTracker { - fun trackEvent(event: Event) -} \ No newline at end of file diff --git a/assets/grafana-dashboard.json b/assets/grafana-dashboard.json deleted file mode 100644 index 5a2eadfa3..000000000 --- a/assets/grafana-dashboard.json +++ /dev/null @@ -1,1002 +0,0 @@ -{ - "__inputs": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "5.2.2" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "5.0.0" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "id": null, - "iteration": 1536305726844, - "links": [], - "panels": [ - { - "alarm": { - "action": "", - "consecutive": false, - "description": "", - "enabled": false, - "entity": "", - "key": "", - "lookBackPeriod": "", - "missingDataAlert": true, - "name": "", - "seriesMatcher": "", - "service": "", - "show": true, - "tags": [], - "violationChecker": { - "direction": "AlertOnHigh", - "minCount": 1, - "minPeriod": 300, - "type": "Count" - }, - "webHook": { - "enabled": false, - "method": "GET" - } - }, - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { - "h": 7, - "w": 8, - "x": 0, - "y": 0 - }, - "id": 1, - "interval": "", - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "alias": "", - "expr": "count(android_test{deviceserial=~\"$device\",branch=~\"$branch\",class=~\"$class\",build_id=~\"$build_id\",team=~\"$team\"})", - "format": "time_series", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "instant": false, - "interval": "1m", - "intervalFactor": 1, - "legendFormat": "Tests count", - "measurement": "tests", - "orderByTime": "ASC", - "policy": "autogen", - "query": "SELECT count(\"success\") FROM $retentionPolicy.\"tests\" WHERE $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "success" - ], - "type": "field" - }, - { - "params": [], - "type": "count" - } - ] - ], - "tags": [] - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Test executions", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alarm": { - "action": "", - "consecutive": false, - "description": "", - "enabled": false, - "entity": "", - "key": "", - "lookBackPeriod": "", - "missingDataAlert": true, - "name": "", - "seriesMatcher": "", - "service": "", - "show": true, - "tags": [], - "violationChecker": { - "direction": "AlertOnHigh", - "minCount": 1, - "minPeriod": 300, - "type": "Count" - }, - "webHook": { - "enabled": false, - "method": "GET" - } - }, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { - "h": 7, - "w": 8, - "x": 8, - "y": 0 - }, - "id": 2, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": true, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "alias": "count", - "expr": "count(android_test{deviceserial=~\"$device\",branch=~\"$branch\",class=~\"$class\",build_id=~\"$build_id\",team=~\"$team\",ignored=\"true\"})", - "format": "time_series", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "intervalFactor": 2, - "legendFormat": "Ignored", - "measurement": "tests", - "orderByTime": "ASC", - "policy": "autogen", - "query": "SELECT count(\"success\") FROM $retentionPolicy.\"tests\" WHERE ignored = 1 AND $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "refId": "B", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "success" - ], - "type": "field" - }, - { - "params": [], - "type": "count" - } - ] - ], - "tags": [ - { - "key": "ignored", - "operator": ">", - "value": "0" - } - ] - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Ignored", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alarm": { - "action": "", - "consecutive": false, - "description": "", - "enabled": false, - "entity": "", - "key": "", - "lookBackPeriod": "", - "missingDataAlert": true, - "name": "", - "seriesMatcher": "", - "service": "", - "show": true, - "tags": [], - "violationChecker": { - "direction": "AlertOnHigh", - "minCount": 1, - "minPeriod": 300, - "type": "Count" - }, - "webHook": { - "enabled": false, - "method": "GET" - } - }, - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { - "h": 7, - "w": 8, - "x": 16, - "y": 0 - }, - "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "alias": "count", - "expr": "count(android_test{deviceserial=~\"$device\",branch=~\"$branch\",class=~\"$class\",build_id=~\"$build_id\",team=~\"$team\",success=\"false\",})", - "format": "time_series", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "intervalFactor": 2, - "legendFormat": "Failing", - "measurement": "tests", - "orderByTime": "ASC", - "policy": "autogen", - "query": "SELECT count(\"success\") FROM $retentionPolicy.\"tests\" WHERE success = 0 AND $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": true, - "refId": "C", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "success" - ], - "type": "field" - }, - { - "params": [], - "type": "count" - } - ] - ], - "tags": [] - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Failing tests count", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alarm": { - "action": "", - "consecutive": false, - "description": "", - "enabled": false, - "entity": "", - "key": "", - "lookBackPeriod": "", - "missingDataAlert": true, - "name": "", - "seriesMatcher": "", - "service": "", - "show": true, - "tags": [], - "violationChecker": { - "direction": "AlertOnHigh", - "minCount": 1, - "minPeriod": 300, - "type": "Count" - }, - "webHook": { - "enabled": false, - "method": "GET" - } - }, - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 7 - }, - "id": 4, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "alias": "$tag_testname", - "expr": "count(android_test{deviceserial=~\"$device\",branch=~\"$branch\",class=~\"$class\",build_id=~\"$build_id\",team=~\"$team\",success=\"false\"}) by (class,method)", - "format": "time_series", - "groupBy": [], - "intervalFactor": 2, - "legendFormat": "{{class}},{{method}}", - "measurement": "tests", - "orderByTime": "ASC", - "policy": "autogen", - "query": "SELECT count(\"success\") FROM $retentionPolicy.\"tests\" WHERE success = 0 AND $timeFilter GROUP BY time($__interval), \"testname\" fill(null)\n", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "success" - ], - "type": "field" - } - ] - ], - "tags": [ - { - "key": "success", - "operator": "=", - "value": "0" - } - ] - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Failing tests", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "series", - "name": null, - "show": false, - "values": [ - "total" - ] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "decimals": 0, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alarm": { - "action": "", - "consecutive": false, - "description": "", - "enabled": false, - "entity": "", - "key": "", - "lookBackPeriod": "", - "missingDataAlert": true, - "name": "", - "seriesMatcher": "", - "service": "", - "show": true, - "tags": [], - "violationChecker": { - "direction": "AlertOnHigh", - "minCount": 1, - "minPeriod": 300, - "type": "Count" - }, - "webHook": { - "enabled": false, - "method": "GET" - } - }, - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 5, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "alias": "$tag_class", - "expr": "count(android_test{deviceserial=~\"$device\",branch=~\"$branch\",class=~\"$class\",build_id=~\"$build_id\",team=~\"$team\",success=\"false\"}) by (class)", - "format": "time_series", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "intervalFactor": 2, - "legendFormat": "{{class}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT count(\"success\") FROM $retentionPolicy.\"tests\" WHERE success = 0 AND $timeFilter GROUP BY time($__interval), \"class\" fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Failing test classes", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "series", - "name": null, - "show": false, - "values": [ - "total" - ] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "decimals": 0, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "alarm": { - "action": "", - "consecutive": false, - "description": "", - "enabled": false, - "entity": "", - "key": "", - "lookBackPeriod": "", - "missingDataAlert": true, - "name": "", - "seriesMatcher": "", - "service": "", - "show": true, - "tags": [], - "violationChecker": { - "direction": "AlertOnHigh", - "minCount": 1, - "minPeriod": 300, - "type": "Count" - }, - "webHook": { - "enabled": false, - "method": "GET" - } - }, - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "fill": 1, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 21 - }, - "id": 6, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "alias": "$tag_deviceSerial", - "expr": "count(android_test{deviceserial=~\"$device\",branch=~\"$branch\",class=~\"$class\",build_id=~\"$build_id\",team=~\"$team\",success=\"false\"}) by (deviceserial)", - "format": "time_series", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "intervalFactor": 2, - "legendFormat": "{{deviceserial}}", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT count(\"success\") FROM $retentionPolicy.\"tests\" WHERE success = 0 AND $timeFilter GROUP BY time($__interval), \"deviceSerial\" fill(null)", - "rawQuery": true, - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Failing devices", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "series", - "name": null, - "show": false, - "values": [ - "total" - ] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "decimals": 0, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": false, - "schemaVersion": 16, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "current": { - "tags": [], - "text": "Marathon", - "value": "Marathon" - }, - "hide": 0, - "label": null, - "name": "datasource", - "options": [], - "query": "influxdb", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": null, - "current": {}, - "datasource": "$datasource", - "hide": 0, - "includeAll": false, - "label": null, - "multi": false, - "name": "retentionPolicy", - "options": [], - "query": "SHOW RETENTION POLICIES", - "refresh": 1, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Marathon tests", - "uid": "zLbo49hmz", - "version": 8 -} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/Deployment.kt b/buildSrc/src/main/kotlin/Deployment.kt index 61598ebc6..e87d1a9b9 100644 --- a/buildSrc/src/main/kotlin/Deployment.kt +++ b/buildSrc/src/main/kotlin/Deployment.kt @@ -117,7 +117,7 @@ object Deployment { pom?.apply { name.set(project.name) url.set("https://github.com/Malinskiy/marathon") - description.set("Android & iOS test runner") + description.set("Android test runner") licenses { license { diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index f27c86471..1df06ca6f 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -10,7 +10,6 @@ object Versions { val slf4jAPI = "1.0.0" val logbackClassic = "1.2.3" val axmlParser = "1.0" - val bugsnag = "3.6.1" val androidGradleVersion = "8.4.2" @@ -25,24 +24,13 @@ object Versions { val apacheCommonsText = "1.3" val apacheCommonsIO = "2.6" val apacheCommonsCollections = "4.4" - val influxDbClient = "2.22" - val argParser = "2.0.7" val jacksonDatabind = "2.9.5" - val jacksonKotlin = "2.9.4.1" - val jacksonYaml = "2.9.6" - val jacksonJSR310 = "2.9.6" - val ddPlist = "1.21" - val guava = "26.0-jre" - val rsync4j = "3.1.2-12" - val sshj = "0.26.0" val testContainers = "1.15.3" val jupiterEngine = "5.1.0" - val jansi = "1.17.1" val scalr = "4.2" val allureJava = "2.17.3" val allureEnvironment = "1.0.0" val mockitoKotlin = "4.0.0" - val googleAnalitycsWrapper = "2.0.0" val koin = "2.0.1" val jsonAssert = "1.5.0" } @@ -71,23 +59,11 @@ object Libraries { val apacheCommonsText = "org.apache.commons:commons-text:${Versions.apacheCommonsText}" val apacheCommonsIO = "commons-io:commons-io:${Versions.apacheCommonsIO}" val apacheCommonsCollections = "org.apache.commons:commons-collections4:${Versions.apacheCommonsCollections}" - val influxDbClient = "org.influxdb:influxdb-java:${Versions.influxDbClient}" - val argParser = "com.xenomachina:kotlin-argparser:${Versions.argParser}" - val jacksonDatabind = "com.fasterxml.jackson.core:jackson-databind:${Versions.jacksonDatabind}" val jacksonAnnotations = "com.fasterxml.jackson.core:jackson-annotations:${Versions.jacksonDatabind}" - val jacksonKotlin = "com.fasterxml.jackson.module:jackson-module-kotlin:${Versions.jacksonKotlin}" - val jacksonYaml = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${Versions.jacksonYaml}" - val jacksonJSR310 = "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${Versions.jacksonJSR310}" - val ddPlist = "com.googlecode.plist:dd-plist:${Versions.ddPlist}" - val guava = "com.google.guava:guava:${Versions.guava}" - val rsync4j = "com.github.fracpete:rsync4j-all:${Versions.rsync4j}" - val sshj = "com.hierynomus:sshj:${Versions.sshj}" - val jansi = "org.fusesource.jansi:jansi:${Versions.jansi}" val scalr = "org.imgscalr:imgscalr-lib:${Versions.scalr}" val allure = "io.qameta.allure:allure-java-commons:${Versions.allureJava}" val allureEnvironment = "com.github.automatedowl:allure-environment-writer:${Versions.allureEnvironment}" val koin = "io.insert-koin:koin-core:${Versions.koin}" - val bugsnag = "com.bugsnag:bugsnag:${Versions.bugsnag}" } object TestLibraries { @@ -107,9 +83,4 @@ object TestLibraries { val jsonAssert = "org.skyscreamer:jsonassert:${Versions.jsonAssert}" val testContainers = "org.testcontainers:testcontainers:${Versions.testContainers}" - val testContainersInflux = "org.testcontainers:influxdb:${Versions.testContainers}" -} - -object Analytics { - val googleAnalyticsWrapper = "com.brsanthu:google-analytics-java:${Versions.googleAnalitycsWrapper}" } diff --git a/cli/build.gradle.kts b/cli/build.gradle.kts deleted file mode 100644 index cb54f09f6..000000000 --- a/cli/build.gradle.kts +++ /dev/null @@ -1,72 +0,0 @@ -plugins { - application - id("idea") - id("org.jetbrains.kotlin.jvm") - id("org.jetbrains.dokka") - id("com.github.gmazzo.buildconfig") -} - -val enableJDB = false -val debugCoroutines = true -val jvmOptions = listOf( - when (enableJDB) { - true -> "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044" - else -> "" - }, - when (debugCoroutines) { - true -> "-Dkotlinx.coroutines.debug=on" - else -> "" - } -).filter { it.isNotBlank() } - -application { - mainClass.set("com.malinskiy.marathon.cli.ApplicationViewKt") - applicationName = "marathon" - applicationDefaultJvmArgs = jvmOptions -} - -distributions { - getByName("main") { - distributionBaseName.set("marathon") - } -} - -dependencies { - implementation(project(":core")) - implementation(project(":vendor:vendor-ios")) - implementation(project(":vendor:vendor-android:base")) - implementation(project(":vendor:vendor-android:ddmlib")) - implementation(project(":analytics:usage")) - implementation(Libraries.kotlinCoroutines) - implementation(Libraries.kotlinLogging) - implementation(Libraries.kotlinReflect) - implementation(Libraries.slf4jAPI) - implementation(Libraries.logbackClassic) - implementation(Libraries.argParser) - implementation(Libraries.jacksonDatabind) - implementation(Libraries.jacksonAnnotations) - implementation(Libraries.jacksonKotlin) - implementation(Libraries.jacksonYaml) - implementation(Libraries.jacksonJSR310) - implementation(Libraries.apacheCommonsText) -} - -Deployment.initialize(project) -Testing.configure(project) - -buildConfig { - buildConfigField("String", "VERSION", "\"${Versions.marathon}\"") -} - -sourceSets["main"].java { - srcDirs.add(layout.buildDirectory.dir("gen").get().asFile) -} - -// At the moment for non-Android projects you need to explicitly -// mark the generated code for correct highlighting in IDE. -idea { - module { - sourceDirs = sourceDirs + project.layout.buildDirectory.dir("gen/buildconfig/src/main").get().asFile - generatedSourceDirs = generatedSourceDirs + project.layout.buildDirectory.dir("gen/buildconfig/src/main").get().asFile - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/ApplicationView.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/ApplicationView.kt deleted file mode 100644 index a094342ce..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/ApplicationView.kt +++ /dev/null @@ -1,57 +0,0 @@ -package com.malinskiy.marathon.cli - -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.dataformat.yaml.YAMLFactory -import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule -import com.fasterxml.jackson.module.kotlin.KotlinModule -import com.malinskiy.marathon.Marathon -import com.malinskiy.marathon.cli.args.MarathonCliConfiguration -import com.malinskiy.marathon.cli.args.environment.SystemEnvironmentReader -import com.malinskiy.marathon.cli.config.ConfigFactory -import com.malinskiy.marathon.cli.config.DeserializeModule -import com.malinskiy.marathon.cli.config.time.InstantTimeProviderImpl -import com.malinskiy.marathon.di.marathonStartKoin -import com.malinskiy.marathon.config.AppType -import com.malinskiy.marathon.exceptions.BugsnagExceptionsReporter -import com.malinskiy.marathon.log.MarathonLogging -import com.malinskiy.marathon.usageanalytics.TrackActionType -import com.malinskiy.marathon.usageanalytics.UsageAnalytics -import com.malinskiy.marathon.usageanalytics.tracker.Event -import com.xenomachina.argparser.ArgParser -import com.xenomachina.argparser.SystemExitException -import com.xenomachina.argparser.mainBody - -private val logger = MarathonLogging.logger {} - -fun main(args: Array): Unit = mainBody( - programName = "marathon v${BuildConfig.VERSION}" -) { - ArgParser(args).parseInto(::MarathonCliConfiguration).run { - logger.info { "Starting marathon" } - val bugsnagExceptionsReporter = BugsnagExceptionsReporter() - bugsnagExceptionsReporter.start(AppType.CLI) - - val mapper = ObjectMapper(YAMLFactory().disable(YAMLGenerator.Feature.USE_NATIVE_TYPE_ID)) - mapper.registerModule(DeserializeModule(InstantTimeProviderImpl())) - .registerModule(KotlinModule()) - .registerModule(JavaTimeModule()) - - val configuration = ConfigFactory(mapper).create( - marathonfile = marathonfile, - environmentReader = SystemEnvironmentReader() - ) - - val application = marathonStartKoin(configuration) - val marathon: Marathon = application.koin.get() - - UsageAnalytics.enable = this.analyticsTracking - UsageAnalytics.USAGE_TRACKER.trackEvent(Event(TrackActionType.RunType, "cli")) - val success = marathon.run() - bugsnagExceptionsReporter.end() - if (!success) { - throw SystemExitException("Build failed", 1) - } - success - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/EnvironmentConfiguration.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/EnvironmentConfiguration.kt deleted file mode 100644 index 75d0b94e5..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/EnvironmentConfiguration.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.malinskiy.marathon.cli.args - -import java.io.File - -data class EnvironmentConfiguration(val androidSdk: File?) diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/FileAndroidConfiguration.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/FileAndroidConfiguration.kt deleted file mode 100644 index 950f88683..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/FileAndroidConfiguration.kt +++ /dev/null @@ -1,52 +0,0 @@ -package com.malinskiy.marathon.cli.args - -import com.fasterxml.jackson.annotation.JsonProperty -import com.malinskiy.marathon.android.AndroidConfiguration -import com.malinskiy.marathon.android.DEFAULT_INSTALL_OPTIONS -import com.malinskiy.marathon.android.defaultInitTimeoutMillis -import com.malinskiy.marathon.android.serial.SerialStrategy -import com.malinskiy.marathon.device.DeviceFeature -import com.malinskiy.marathon.exceptions.ConfigurationException -import ddmlibModule -import java.io.File - -data class FileAndroidConfiguration( - @JsonProperty("vendor") val vendor: String? = "ddmlib", - @JsonProperty("androidSdk") val androidSdk: File?, - @JsonProperty("applicationApk") val applicationOutput: File?, - @JsonProperty("testApplicationApk") val testApplicationOutput: File, - @JsonProperty("autoGrantPermission") val autoGrantPermission: Boolean?, - @JsonProperty("instrumentationArgs") val instrumentationArgs: Map?, - @JsonProperty("applicationPmClear") val applicationPmClear: Boolean?, - @JsonProperty("testApplicationPmClear") val testApplicationPmClear: Boolean?, - @JsonProperty("adbInitTimeoutMillis") val adbInitTimeoutMillis: Int?, - @JsonProperty("installOptions") val installOptions: String?, - @JsonProperty("preferableRecorderType") val preferableRecorderType: DeviceFeature?, - @JsonProperty("serialStrategy") val serialStrategy: SerialStrategy = SerialStrategy.AUTOMATIC -) : FileVendorConfiguration { - - fun toAndroidConfiguration(environmentAndroidSdk: File?): AndroidConfiguration { - val finalAndroidSdk = androidSdk - ?: environmentAndroidSdk - ?: throw ConfigurationException("No android SDK path specified") - - when (vendor) { - else -> { - return AndroidConfiguration( - androidSdk = finalAndroidSdk, - applicationOutput = applicationOutput, - testApplicationOutput = testApplicationOutput, - autoGrantPermission = autoGrantPermission ?: false, - instrumentationArgs = instrumentationArgs ?: emptyMap(), - applicationPmClear = applicationPmClear ?: false, - testApplicationPmClear = testApplicationPmClear ?: false, - adbInitTimeoutMillis = adbInitTimeoutMillis ?: defaultInitTimeoutMillis, - installOptions = installOptions ?: DEFAULT_INSTALL_OPTIONS, - preferableRecorderType = preferableRecorderType, - serialStrategy = serialStrategy, - implementationModules = listOf(ddmlibModule) - ) - } - } - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/FileConfiguration.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/FileConfiguration.kt deleted file mode 100644 index 7db2e8961..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/FileConfiguration.kt +++ /dev/null @@ -1,50 +0,0 @@ -package com.malinskiy.marathon.cli.args - -import com.malinskiy.marathon.execution.AnalyticsConfiguration -import com.malinskiy.marathon.execution.CacheConfiguration -import com.malinskiy.marathon.execution.FilteringConfiguration -import com.malinskiy.marathon.execution.StrictRunFilterConfiguration -import com.malinskiy.marathon.execution.strategy.BatchingStrategy -import com.malinskiy.marathon.execution.strategy.FlakinessStrategy -import com.malinskiy.marathon.execution.strategy.PoolingStrategy -import com.malinskiy.marathon.execution.strategy.RetryStrategy -import com.malinskiy.marathon.execution.strategy.ShardingStrategy -import com.malinskiy.marathon.execution.strategy.SortingStrategy -import java.io.File - -data class FileConfiguration( - var name: String, - var outputDir: File, - - var analyticsConfiguration: AnalyticsConfiguration?, - var poolingStrategy: PoolingStrategy?, - var shardingStrategy: ShardingStrategy?, - var sortingStrategy: SortingStrategy?, - var batchingStrategy: BatchingStrategy?, - var flakinessStrategy: FlakinessStrategy?, - var retryStrategy: RetryStrategy?, - var filteringConfiguration: FilteringConfiguration?, - var strictRunFilterConfiguration: StrictRunFilterConfiguration?, - - var cache: CacheConfiguration?, - var ignoreFailures: Boolean?, - var isCodeCoverageEnabled: Boolean?, - var fallbackToScreenshots: Boolean?, - var strictMode: Boolean?, - var uncompletedTestRetryQuota: Int?, - - var testClassRegexes: Collection?, - var includeSerialRegexes: Collection?, - var excludeSerialRegexes: Collection?, - var ignoreFailureRegexes: Collection?, - var failFastFailureRegexes: Collection?, - - var testBatchTimeoutMillis: Long?, - var testOutputTimeoutMillis: Long?, - var noDevicesTimeoutMillis: Long?, - var debug: Boolean?, - - var vendorConfiguration: FileVendorConfiguration?, - - var analyticsTracking: Boolean? -) diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/FileIOSConfiguration.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/FileIOSConfiguration.kt deleted file mode 100644 index e77b2f9ba..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/FileIOSConfiguration.kt +++ /dev/null @@ -1,91 +0,0 @@ -package com.malinskiy.marathon.cli.args - -import com.fasterxml.jackson.annotation.JsonProperty -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.ios.IOSConfiguration -import java.io.File - -interface FileListProvider { - fun fileList(root: File = File(".")): Iterable -} - -object DerivedDataFileListProvider : FileListProvider { - override fun fileList(root: File): Iterable { - return root.walkTopDown().asIterable() - } -} - -data class FileIOSConfiguration( - @JsonProperty("derivedDataDir") val derivedDataDir: File, - @JsonProperty("xctestrunPath") val xctestrunPath: File?, - @JsonProperty("remoteUsername") val remoteUsername: String, - @JsonProperty("remotePrivateKey") val remotePrivateKey: File, - @JsonProperty("knownHostsPath") val knownHostsPath: File?, - @JsonProperty("remoteRsyncPath") val remoteRsyncPath: String = "/usr/bin/rsync", - @JsonProperty("sourceRoot") val sourceRoot: File?, - @JsonProperty("alwaysEraseSimulators") val alwaysEraseSimulators: Boolean?, - @JsonProperty("debugSsh") val debugSsh: Boolean?, - @JsonProperty("hideRunnerOutput") val hideRunnerOutput: Boolean?, - @JsonProperty("compactOutput") val compactOutput: Boolean = false, - @JsonProperty("keepAliveIntervalMillis") val keepAliveIntervalMillis: Long = 0L, - @JsonProperty("devices") val devices: File?, - val fileListProvider: FileListProvider = DerivedDataFileListProvider -) : FileVendorConfiguration { - - fun toIOSConfiguration( - marathonfileDir: File, - sourceRootOverride: File? = null - ): IOSConfiguration { - // Any relative path specified in Marathonfile should be resolved against the directory Marathonfile is in - val resolvedDerivedDataDir = marathonfileDir.resolve(derivedDataDir) - val finalXCTestRunPath = xctestrunPath?.resolveAgainst(marathonfileDir) - ?: fileListProvider - .fileList(resolvedDerivedDataDir) - .firstOrNull { it.extension == "xctestrun" } - ?: throw ConfigurationException("Unable to find an xctestrun file in derived data folder") - val optionalSourceRoot = sourceRootOverride - ?: sourceRoot?.resolveAgainst(marathonfileDir) - val optionalDebugSsh = debugSsh ?: false - val optionalAlwaysEraseSimulators = alwaysEraseSimulators ?: true - val optionalDevices = devices?.resolveAgainst(marathonfileDir) - ?: marathonfileDir.resolve("Marathondevices") - val optionalKnownHostsPath = knownHostsPath?.resolveAgainst(marathonfileDir) - val optionalHideRunnerOutput = hideRunnerOutput ?: false - - return if (optionalSourceRoot == null) { - IOSConfiguration( - derivedDataDir = resolvedDerivedDataDir, - xctestrunPath = finalXCTestRunPath, - remoteUsername = remoteUsername, - remotePrivateKey = remotePrivateKey, - knownHostsPath = optionalKnownHostsPath, - remoteRsyncPath = remoteRsyncPath, - debugSsh = optionalDebugSsh, - alwaysEraseSimulators = optionalAlwaysEraseSimulators, - hideRunnerOutput = optionalHideRunnerOutput, - compactOutput = compactOutput, - keepAliveIntervalMillis = keepAliveIntervalMillis, - devicesFile = optionalDevices - ) - } else { - IOSConfiguration( - derivedDataDir = resolvedDerivedDataDir, - xctestrunPath = finalXCTestRunPath, - remoteUsername = remoteUsername, - remotePrivateKey = remotePrivateKey, - knownHostsPath = optionalKnownHostsPath, - remoteRsyncPath = remoteRsyncPath, - debugSsh = optionalDebugSsh, - alwaysEraseSimulators = optionalAlwaysEraseSimulators, - hideRunnerOutput = optionalHideRunnerOutput, - compactOutput = compactOutput, - keepAliveIntervalMillis = keepAliveIntervalMillis, - devicesFile = optionalDevices, - sourceRoot = optionalSourceRoot - ) - } - } -} - -// inverted [resolve] call allows to avoid too many if expressions -private fun File.resolveAgainst(file: File): File = file.resolve(this) diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/FileVendorConfiguration.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/FileVendorConfiguration.kt deleted file mode 100644 index c4eb0ef77..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/FileVendorConfiguration.kt +++ /dev/null @@ -1,4 +0,0 @@ -package com.malinskiy.marathon.cli.args - -interface FileVendorConfiguration { -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/MarathonCliConfiguration.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/MarathonCliConfiguration.kt deleted file mode 100644 index 2613fefa1..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/MarathonCliConfiguration.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.malinskiy.marathon.cli.args - -import com.xenomachina.argparser.ArgParser -import com.xenomachina.argparser.default -import java.io.File - -class MarathonCliConfiguration(parser: ArgParser) { - val marathonfile: File by parser - .storing("--marathonfile", "-m", help = "marathonfile file path") { File(this) } - .default(File("Marathonfile")) - val analyticsTracking: Boolean by parser - .storing("--analyticsTracking", help = "Enable anonymous analytics tracking") { this.toBoolean() } - .default(false) -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/environment/EnvironmentReader.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/environment/EnvironmentReader.kt deleted file mode 100644 index 1e3580126..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/environment/EnvironmentReader.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.malinskiy.marathon.cli.args.environment - -import com.malinskiy.marathon.cli.args.EnvironmentConfiguration - -interface EnvironmentReader { - fun read(): EnvironmentConfiguration -} \ No newline at end of file diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/environment/SystemEnvironmentReader.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/environment/SystemEnvironmentReader.kt deleted file mode 100644 index 4e9455aee..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/args/environment/SystemEnvironmentReader.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.malinskiy.marathon.cli.args.environment - -import com.malinskiy.marathon.cli.args.EnvironmentConfiguration -import java.io.File - -class SystemEnvironmentReader : EnvironmentReader { - override fun read() = EnvironmentConfiguration(System.getenv("ANDROID_HOME")?.let { File(it) }) -} \ No newline at end of file diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/ConfigFactory.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/ConfigFactory.kt deleted file mode 100644 index e8be8b1eb..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/ConfigFactory.kt +++ /dev/null @@ -1,87 +0,0 @@ -package com.malinskiy.marathon.cli.config - -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.exc.MismatchedInputException -import com.malinskiy.marathon.cli.args.FileAndroidConfiguration -import com.malinskiy.marathon.cli.args.FileConfiguration -import com.malinskiy.marathon.cli.args.FileIOSConfiguration -import com.malinskiy.marathon.cli.args.environment.EnvironmentReader -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.Configuration -import com.malinskiy.marathon.log.MarathonLogging -import com.malinskiy.marathon.vendor.VendorConfiguration -import org.apache.commons.text.StringSubstitutor -import org.apache.commons.text.lookup.StringLookupFactory -import java.io.File - -private val logger = MarathonLogging.logger {} - -class ConfigFactory(private val mapper: ObjectMapper) { - private val environmentVariableSubstitutor = StringSubstitutor(StringLookupFactory.INSTANCE.environmentVariableStringLookup()) - - fun create(marathonfile: File, environmentReader: EnvironmentReader): Configuration { - logger.info { "Checking $marathonfile config" } - - if (!marathonfile.isFile) { - logger.error { "No config ${marathonfile.absolutePath} present" } - throw ConfigurationException("No config ${marathonfile.absolutePath} present") - } - - val config = readConfigFile(marathonfile) ?: throw ConfigurationException("Invalid config format") - - val fileVendorConfiguration = config.vendorConfiguration - val vendorConfiguration = when (fileVendorConfiguration) { - is FileIOSConfiguration -> fileVendorConfiguration.toIOSConfiguration( - marathonfile.canonicalFile.parentFile - ) - is FileAndroidConfiguration -> { - fileVendorConfiguration.toAndroidConfiguration(environmentReader.read().androidSdk) - } - else -> throw ConfigurationException("No vendor config present in ${marathonfile.absolutePath}") - } - - return Configuration( - name = config.name, - outputDir = config.outputDir, - - customAnalyticsTracker = null, - analyticsConfiguration = config.analyticsConfiguration, - poolingStrategy = config.poolingStrategy, - shardingStrategy = config.shardingStrategy, - sortingStrategy = config.sortingStrategy, - batchingStrategy = config.batchingStrategy, - flakinessStrategy = config.flakinessStrategy, - retryStrategy = config.retryStrategy, - filteringConfiguration = config.filteringConfiguration, - strictRunFilterConfiguration = config.strictRunFilterConfiguration, - cache = config.cache, - ignoreFailures = config.ignoreFailures, - isCodeCoverageEnabled = config.isCodeCoverageEnabled, - fallbackToScreenshots = config.fallbackToScreenshots, - strictMode = config.strictMode, - listener = null, - uncompletedTestRetryQuota = config.uncompletedTestRetryQuota, - testClassRegexes = config.testClassRegexes, - includeSerialRegexes = config.includeSerialRegexes, - excludeSerialRegexes = config.excludeSerialRegexes, - ignoreFailureRegexes = config.ignoreFailureRegexes, - failFastFailureRegexes = config.failFastFailureRegexes, - testBatchTimeoutMillis = config.testBatchTimeoutMillis, - testOutputTimeoutMillis = config.testOutputTimeoutMillis, - noDevicesTimeoutMillis = config.noDevicesTimeoutMillis, - debug = config.debug, - vendorConfiguration = vendorConfiguration as VendorConfiguration, - analyticsTracking = config.analyticsTracking - ) - } - - private fun readConfigFile(configFile: File): FileConfiguration? { - val configWithEnvironmentVariablesReplaced = environmentVariableSubstitutor.replace(configFile.readText()) - try { - return mapper.readValue(configWithEnvironmentVariablesReplaced, FileConfiguration::class.java) - } catch (e: MismatchedInputException) { - logger.error { "Invalid config file ${configFile.absolutePath}. Error parsing ${e.targetType.canonicalName}" } - throw ConfigurationException(e) - } - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/DeserializeModule.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/DeserializeModule.kt deleted file mode 100644 index fc509cf0f..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/DeserializeModule.kt +++ /dev/null @@ -1,64 +0,0 @@ -package com.malinskiy.marathon.cli.config - -import com.fasterxml.jackson.databind.module.SimpleModule -import com.malinskiy.marathon.cli.args.FileVendorConfiguration -import com.malinskiy.marathon.cli.config.deserialize.AnalyticsConfigurationDeserializer -import com.malinskiy.marathon.cli.config.deserialize.BatchingStrategyDeserializer -import com.malinskiy.marathon.cli.config.deserialize.CacheConfigurationDeserializer -import com.malinskiy.marathon.cli.config.deserialize.ExecutionTimeSortingStrategyDeserializer -import com.malinskiy.marathon.cli.config.deserialize.FileVendorConfigurationDeserializer -import com.malinskiy.marathon.cli.config.deserialize.FixedSizeBatchingStrategyDeserializer -import com.malinskiy.marathon.cli.config.deserialize.FlakinessStrategyDeserializer -import com.malinskiy.marathon.cli.config.deserialize.InfluxDbConfigurationDeserializer -import com.malinskiy.marathon.cli.config.deserialize.PoolingStrategyDeserializer -import com.malinskiy.marathon.cli.config.deserialize.ProbabilityBasedFlakinessStrategyDeserializer -import com.malinskiy.marathon.cli.config.deserialize.RetentionPolicyConfigurationDeserializer -import com.malinskiy.marathon.cli.config.deserialize.RetryStrategyDeserializer -import com.malinskiy.marathon.cli.config.deserialize.ShardingStrategyDeserializer -import com.malinskiy.marathon.cli.config.deserialize.SortingStrategyDeserializer -import com.malinskiy.marathon.cli.config.deserialize.TestFilterDeserializer -import com.malinskiy.marathon.cli.config.time.InstantTimeProvider -import com.malinskiy.marathon.execution.AnalyticsConfiguration -import com.malinskiy.marathon.execution.CacheConfiguration -import com.malinskiy.marathon.execution.TestFilter -import com.malinskiy.marathon.execution.strategy.BatchingStrategy -import com.malinskiy.marathon.execution.strategy.FlakinessStrategy -import com.malinskiy.marathon.execution.strategy.PoolingStrategy -import com.malinskiy.marathon.execution.strategy.RetryStrategy -import com.malinskiy.marathon.execution.strategy.ShardingStrategy -import com.malinskiy.marathon.execution.strategy.SortingStrategy -import com.malinskiy.marathon.execution.strategy.impl.batching.FixedSizeBatchingStrategy -import com.malinskiy.marathon.execution.strategy.impl.flakiness.ProbabilityBasedFlakinessStrategy -import com.malinskiy.marathon.execution.strategy.impl.sorting.ExecutionTimeSortingStrategy - -class DeserializeModule(instantTimeProvider: InstantTimeProvider) : SimpleModule() { - init { - addDeserializer(AnalyticsConfiguration::class.java, AnalyticsConfigurationDeserializer()) - addDeserializer(AnalyticsConfiguration.InfluxDbConfiguration::class.java, InfluxDbConfigurationDeserializer()) - addDeserializer( - AnalyticsConfiguration.InfluxDbConfiguration.RetentionPolicyConfiguration::class.java, - RetentionPolicyConfigurationDeserializer() - ) - addDeserializer(PoolingStrategy::class.java, PoolingStrategyDeserializer()) - addDeserializer(ShardingStrategy::class.java, ShardingStrategyDeserializer()) - addDeserializer(SortingStrategy::class.java, SortingStrategyDeserializer()) - addDeserializer( - ExecutionTimeSortingStrategy::class.java, - ExecutionTimeSortingStrategyDeserializer(instantTimeProvider) - ) - addDeserializer(BatchingStrategy::class.java, BatchingStrategyDeserializer()) - addDeserializer(FlakinessStrategy::class.java, FlakinessStrategyDeserializer()) - addDeserializer(CacheConfiguration::class.java, CacheConfigurationDeserializer()) - addDeserializer( - ProbabilityBasedFlakinessStrategy::class.java, - ProbabilityBasedFlakinessStrategyDeserializer(instantTimeProvider) - ) - addDeserializer( - FixedSizeBatchingStrategy::class.java, - FixedSizeBatchingStrategyDeserializer(instantTimeProvider) - ) - addDeserializer(RetryStrategy::class.java, RetryStrategyDeserializer()) - addDeserializer(TestFilter::class.java, TestFilterDeserializer()) - addDeserializer(FileVendorConfiguration::class.java, FileVendorConfigurationDeserializer()) - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/AnalyticsConfigurationDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/AnalyticsConfigurationDeserializer.kt deleted file mode 100644 index ced0f965d..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/AnalyticsConfigurationDeserializer.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.malinskiy.marathon.execution.AnalyticsConfiguration - - -class AnalyticsConfigurationDeserializer : StdDeserializer(AnalyticsConfiguration::class.java) { - override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): AnalyticsConfiguration { - val node: JsonNode? = p?.codec?.readTree(p) - - - val influxNode = node?.get("influx") - influxNode?.let { - val influxDbConfiguration = - ctxt?.readValue(influxNode.traverse(p.codec), AnalyticsConfiguration.InfluxDbConfiguration::class.java) - if (influxDbConfiguration != null) return influxDbConfiguration - } - - return AnalyticsConfiguration.DisabledAnalytics - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/BatchingStrategyDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/BatchingStrategyDeserializer.kt deleted file mode 100644 index 7aeaf99b1..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/BatchingStrategyDeserializer.kt +++ /dev/null @@ -1,30 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.fasterxml.jackson.databind.node.ObjectNode -import com.fasterxml.jackson.module.kotlin.treeToValue -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.strategy.BatchingStrategy -import com.malinskiy.marathon.execution.strategy.impl.batching.FixedSizeBatchingStrategy -import com.malinskiy.marathon.execution.strategy.impl.batching.IsolateBatchingStrategy - -class BatchingStrategyDeserializer : StdDeserializer(BatchingStrategy::class.java) { - override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): BatchingStrategy { - val codec = p?.codec as ObjectMapper - val node: JsonNode = codec.readTree(p) ?: throw ConfigurationException("Missing batching strategy") - val type = node.get("type").asText() - - return when (type) { - "isolate" -> IsolateBatchingStrategy() - "fixed-size" -> { - (node as ObjectNode).remove("type") - return codec.treeToValue(node) - } - else -> throw ConfigurationException("Unrecognized batching strategy $type") - } - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/CacheConfigurationDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/CacheConfigurationDeserializer.kt deleted file mode 100644 index b366b0fef..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/CacheConfigurationDeserializer.kt +++ /dev/null @@ -1,68 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.core.TreeNode -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.fasterxml.jackson.databind.exc.InvalidFormatException -import com.malinskiy.marathon.cache.config.Credentials -import com.malinskiy.marathon.cache.config.LocalCacheConfiguration -import com.malinskiy.marathon.cache.config.RemoteCacheConfiguration -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.CacheConfiguration -import java.io.File -import java.time.Duration -import java.time.Instant - -class CacheConfigurationDeserializer : - StdDeserializer(CacheConfiguration::class.java) { - override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): CacheConfiguration { - val codec = p?.codec as ObjectMapper - val node: JsonNode = codec.readTree(p) ?: throw ConfigurationException("Invalid caching configuration") - - val localConfig: LocalCacheConfiguration = node.findValue("local") - ?.let { localNode -> - val directory = - localNode.findValue("directory")?.asText() ?: throw ConfigurationException("Local cache directory is not specified") - val expireDays = localNode.findValue("removeUnusedEntriesAfterDays")?.asInt() - ?: throw ConfigurationException("Local cache expiration is not specified") - - LocalCacheConfiguration.Enabled(File(directory), expireDays) - } - ?: LocalCacheConfiguration.Disabled - - val remoteConfig: RemoteCacheConfiguration = node.findValue("remote") - ?.let { localNode -> - val url = - localNode.findValue("url")?.asText() ?: throw ConfigurationException("Remote cache URL is not specified") - val credentials = localNode.findValue("credentials")?.let { - val userName = - localNode.findValue("userName")?.asText() ?: throw ConfigurationException("Remote cache username is not specified") - val password = - localNode.findValue("password")?.asText() ?: throw ConfigurationException("Remote cache password is not specified") - Credentials(userName, password) - } - - RemoteCacheConfiguration.Enabled(url, credentials) - } - ?: RemoteCacheConfiguration.Disabled - - return CacheConfiguration( - local = localConfig, - remote = remoteConfig - ) - } -} - -private fun Duration.addToInstant(instant: Instant): Instant = instant.plus(this) -private fun ObjectMapper.treeToValueOrNull(node: TreeNode, clazz: Class): T? { - val result: T - try { - result = treeToValue(node, clazz) - } catch (e: InvalidFormatException) { - return null - } - return result -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/ExecutionTimeSortingStrategyDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/ExecutionTimeSortingStrategyDeserializer.kt deleted file mode 100644 index 3342b6c15..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/ExecutionTimeSortingStrategyDeserializer.kt +++ /dev/null @@ -1,44 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.core.TreeNode -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.fasterxml.jackson.databind.exc.InvalidFormatException -import com.malinskiy.marathon.cli.config.time.InstantTimeProvider -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.strategy.impl.sorting.ExecutionTimeSortingStrategy -import java.time.Duration -import java.time.Instant - -class ExecutionTimeSortingStrategyDeserializer(private val instantTimeProvider: InstantTimeProvider) : - StdDeserializer(ExecutionTimeSortingStrategy::class.java) { - override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): ExecutionTimeSortingStrategy { - val codec = p?.codec as ObjectMapper - val node: JsonNode = codec.readTree(p) ?: throw ConfigurationException("Invalid sorting strategy") - - val percentile = node.findValue("percentile")?.asDouble() - ?: throw ConfigurationException("Missing percentile value") - - val timeLimitValue = node.findValue("timeLimit") - ?: throw ConfigurationException("Missing time limit value") - val instant = codec.treeToValueOrNull(timeLimitValue, Instant::class.java) - ?: codec.treeToValueOrNull(timeLimitValue, Duration::class.java)?.addToInstant(instantTimeProvider.referenceTime()) - ?: throw ConfigurationException("bbb") - - return ExecutionTimeSortingStrategy(percentile, instant) - } -} - -private fun Duration.addToInstant(instant: Instant): Instant = instant.plus(this) -private fun ObjectMapper.treeToValueOrNull(node: TreeNode, clazz: Class): T? { - val result: T - try { - result = treeToValue(node, clazz) - } catch (e: InvalidFormatException) { - return null - } - return result -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/FileVendorConfigurationDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/FileVendorConfigurationDeserializer.kt deleted file mode 100644 index 506d9e7c2..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/FileVendorConfigurationDeserializer.kt +++ /dev/null @@ -1,39 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.fasterxml.jackson.databind.node.ObjectNode -import com.fasterxml.jackson.module.kotlin.treeToValue -import com.malinskiy.marathon.cli.args.FileAndroidConfiguration -import com.malinskiy.marathon.cli.args.FileIOSConfiguration -import com.malinskiy.marathon.cli.args.FileVendorConfiguration -import com.malinskiy.marathon.exceptions.ConfigurationException - -const val TYPE_ANDROID = "Android" -const val TYPE_IOS = "iOS" - -class FileVendorConfigurationDeserializer : StdDeserializer(FileVendorConfiguration::class.java) { - override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): FileVendorConfiguration { - val codec = p?.codec as ObjectMapper - val node: JsonNode = codec.readTree(p) ?: throw ConfigurationException("Missing vendor configuration") - val type = node.get("type").asText() - - return when (type) { - TYPE_IOS -> { - (node as ObjectNode).remove("type") - codec.treeToValue(node) - } - TYPE_ANDROID -> { - (node as ObjectNode).remove("type") - codec.treeToValue(node) - } - else -> throw ConfigurationException( - "Unrecognized vendor type $type. " + - "Valid options are $TYPE_ANDROID and $TYPE_IOS" - ) - } - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/FixedSizeBatchingStrategyDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/FixedSizeBatchingStrategyDeserializer.kt deleted file mode 100644 index 2a04d7c97..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/FixedSizeBatchingStrategyDeserializer.kt +++ /dev/null @@ -1,48 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.core.TreeNode -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.fasterxml.jackson.databind.exc.InvalidFormatException -import com.malinskiy.marathon.cli.config.time.InstantTimeProvider -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.strategy.impl.batching.FixedSizeBatchingStrategy -import java.time.Duration -import java.time.Instant - -class FixedSizeBatchingStrategyDeserializer(private val instantTimeProvider: InstantTimeProvider) : - StdDeserializer(FixedSizeBatchingStrategy::class.java) { - override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): FixedSizeBatchingStrategy { - val codec = p?.codec as ObjectMapper - val node: JsonNode = codec.readTree(p) ?: throw ConfigurationException("Invalid sorting strategy") - - val size = node.findValue("size")?.asInt() - ?: throw ConfigurationException("Missing size value") - - val durationMillis = node.findValue("durationMillis")?.asLong() - val percentile = node.findValue("percentile")?.asDouble() - val lastMileLength = node.findValue("lastMileLength")?.asInt() - - val timeLimitValue: JsonNode? = node.findValue("timeLimit") - val instant = timeLimitValue?.let { - codec.treeToValueOrNull(timeLimitValue, Instant::class.java) - ?: codec.treeToValueOrNull(timeLimitValue, Duration::class.java)?.addToInstant(instantTimeProvider.referenceTime()) - } - - return FixedSizeBatchingStrategy(size, durationMillis, percentile, instant, lastMileLength ?: 0) - } -} - -private fun Duration.addToInstant(instant: Instant): Instant = instant.plus(this) -private fun ObjectMapper.treeToValueOrNull(node: TreeNode, clazz: Class): T? { - val result: T - try { - result = treeToValue(node, clazz) - } catch (e: InvalidFormatException) { - return null - } - return result -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/FlakinessStrategyDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/FlakinessStrategyDeserializer.kt deleted file mode 100644 index 884871b55..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/FlakinessStrategyDeserializer.kt +++ /dev/null @@ -1,30 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.fasterxml.jackson.databind.node.ObjectNode -import com.fasterxml.jackson.module.kotlin.treeToValue -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.strategy.FlakinessStrategy -import com.malinskiy.marathon.execution.strategy.impl.flakiness.IgnoreFlakinessStrategy -import com.malinskiy.marathon.execution.strategy.impl.flakiness.ProbabilityBasedFlakinessStrategy - -class FlakinessStrategyDeserializer : StdDeserializer(FlakinessStrategy::class.java) { - override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): FlakinessStrategy { - val codec = p?.codec as ObjectMapper - val node: JsonNode = codec.readTree(p) ?: throw ConfigurationException("Missing flakiness strategy") - val type = node.get("type").asText() - - return when (type) { - "ignore" -> IgnoreFlakinessStrategy() - "probability" -> { - (node as ObjectNode).remove("type") - return codec.treeToValue(node) - } - else -> throw ConfigurationException("Unrecognized flakiness strategy $type") - } - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/InfluxDbConfigurationDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/InfluxDbConfigurationDeserializer.kt deleted file mode 100644 index 2cb7d40b1..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/InfluxDbConfigurationDeserializer.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.AnalyticsConfiguration - -class InfluxDbConfigurationDeserializer - : StdDeserializer( - AnalyticsConfiguration.InfluxDbConfiguration::class.java -) { - override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): AnalyticsConfiguration.InfluxDbConfiguration { - val node: JsonNode? = p?.codec?.readTree(p) - - val url = node?.get("url")?.asText() - val user = node?.get("user")?.asText() - val password = node?.get("password")?.asText() - val dbName = node?.get("dbName")?.asText() - - val retentionPolicyNode = node?.get("retentionPolicyConfiguration")?.traverse(p.codec) - val policyClazz = AnalyticsConfiguration.InfluxDbConfiguration.RetentionPolicyConfiguration::class.java - val retentionPolicyConfiguration = - retentionPolicyNode?.let { ctxt?.readValue(retentionPolicyNode, policyClazz) } - ?: AnalyticsConfiguration.InfluxDbConfiguration.RetentionPolicyConfiguration.default - - if (url == null) throw ConfigurationException("InfluxDbConfigurationDeserializer: url should be specified") - if (user == null) throw ConfigurationException("InfluxDbConfigurationDeserializer: user should be specified") - if (password == null) throw ConfigurationException("InfluxDbConfigurationDeserializer: password should be specified") - if (dbName == null) throw ConfigurationException("InfluxDbConfigurationDeserializer: dbName should be specified") - - return AnalyticsConfiguration.InfluxDbConfiguration(url, user, password, dbName, retentionPolicyConfiguration) - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/PoolingStrategyDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/PoolingStrategyDeserializer.kt deleted file mode 100644 index f986d68d7..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/PoolingStrategyDeserializer.kt +++ /dev/null @@ -1,48 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.fasterxml.jackson.databind.node.ArrayNode -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.strategy.PoolingStrategy -import com.malinskiy.marathon.execution.strategy.impl.pooling.OmniPoolingStrategy -import com.malinskiy.marathon.execution.strategy.impl.pooling.parameterized.AbiPoolingStrategy -import com.malinskiy.marathon.execution.strategy.impl.pooling.parameterized.ComboPoolingStrategy -import com.malinskiy.marathon.execution.strategy.impl.pooling.parameterized.ManufacturerPoolingStrategy -import com.malinskiy.marathon.execution.strategy.impl.pooling.parameterized.ModelPoolingStrategy -import com.malinskiy.marathon.execution.strategy.impl.pooling.parameterized.OperatingSystemVersionPoolingStrategy - -class PoolingStrategyDeserializer : StdDeserializer(PoolingStrategy::class.java) { - override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): PoolingStrategy { - val node: JsonNode? = p?.codec?.readTree(p) - - val list = mutableListOf() - - if (node == null) throw ConfigurationException("Missing pooling strategy") - if (!node.isArray) throw ConfigurationException("Pooling strategy should be an array") - - - val arrayNode = node as ArrayNode - arrayNode.forEach { - val type = it.get("type").asText() - list.add( - deserializeStrategy(type) - ) - } - - return ComboPoolingStrategy(list) - } - - private fun deserializeStrategy(type: String?): PoolingStrategy { - return when (type) { - "omni" -> OmniPoolingStrategy() - "device-model" -> ModelPoolingStrategy() - "os-version" -> OperatingSystemVersionPoolingStrategy() - "manufacturer" -> ManufacturerPoolingStrategy() - "abi" -> AbiPoolingStrategy() - else -> throw ConfigurationException("Unrecognized pooling strategy $type") - } - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/ProbabilityBasedFlakinessStrategyDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/ProbabilityBasedFlakinessStrategyDeserializer.kt deleted file mode 100644 index 5cc51776d..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/ProbabilityBasedFlakinessStrategyDeserializer.kt +++ /dev/null @@ -1,50 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.core.TreeNode -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.fasterxml.jackson.databind.exc.InvalidFormatException -import com.malinskiy.marathon.cli.config.time.InstantTimeProvider -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.strategy.impl.flakiness.ProbabilityBasedFlakinessStrategy -import java.time.Duration -import java.time.Instant - -class ProbabilityBasedFlakinessStrategyDeserializer(private val instantTimeProvider: InstantTimeProvider) : - StdDeserializer(ProbabilityBasedFlakinessStrategy::class.java) { - override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): ProbabilityBasedFlakinessStrategy { - val codec = p?.codec as ObjectMapper - val node: JsonNode = codec.readTree(p) ?: throw ConfigurationException("Invalid sorting strategy") - - val minSuccessRate = node.findValue("minSuccessRate")?.asDouble() - ?: throw ConfigurationException("Missing minimum success rate value") - val maxCount = node.findValue("maxCount")?.asInt() - ?: throw ConfigurationException("Missing maximum count value") - - val timeLimitValue = node.findValue("timeLimit") - ?: throw ConfigurationException("Missing time limit value") - val instant = codec.treeToValueOrNull(timeLimitValue, Instant::class.java) - ?: codec.treeToValueOrNull(timeLimitValue, Duration::class.java)?.addToInstant(instantTimeProvider.referenceTime()) - ?: throw ConfigurationException("bbb") - - return ProbabilityBasedFlakinessStrategy( - minSuccessRate = minSuccessRate, - maxCount = maxCount, - timeLimit = instant - ) - } -} - -private fun Duration.addToInstant(instant: Instant): Instant = instant.plus(this) -private fun ObjectMapper.treeToValueOrNull(node: TreeNode, clazz: Class): T? { - val result: T - try { - result = treeToValue(node, clazz) - } catch (e: InvalidFormatException) { - return null - } - return result -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/RetentionPolicyConfigurationDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/RetentionPolicyConfigurationDeserializer.kt deleted file mode 100644 index b0254176a..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/RetentionPolicyConfigurationDeserializer.kt +++ /dev/null @@ -1,39 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.AnalyticsConfiguration - -class RetentionPolicyConfigurationDeserializer - : StdDeserializer( - AnalyticsConfiguration.InfluxDbConfiguration.RetentionPolicyConfiguration::class.java -) { - override fun deserialize( - p: JsonParser?, - ctxt: DeserializationContext? - ): AnalyticsConfiguration.InfluxDbConfiguration.RetentionPolicyConfiguration { - val node: JsonNode? = p?.codec?.readTree(p) - val name = node?.get("name")?.asText() - val duration = node?.get("duration")?.asText() - val shardDuration = node?.get("shardDuration")?.asText() - val replicationFactor = node?.get("replicationFactor")?.asInt() - val isDefault = node?.get("isDefault")?.asBoolean() - - if (name == null) throw ConfigurationException("RetentionPolicyConfigurationDeserializer: name should be specified") - if (duration == null) throw ConfigurationException("RetentionPolicyConfigurationDeserializer: duration should be specified") - if (shardDuration == null) throw ConfigurationException("RetentionPolicyConfigurationDeserializer: shardDuration should be specified") - if (replicationFactor == null) throw ConfigurationException("RetentionPolicyConfigurationDeserializer: replicationFactor should be specified") - if (isDefault == null) throw ConfigurationException("RetentionPolicyConfigurationDeserializer: isDefault should be specified") - - return AnalyticsConfiguration.InfluxDbConfiguration.RetentionPolicyConfiguration( - name, - duration, - shardDuration, - replicationFactor, - isDefault - ) - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/RetryStrategyDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/RetryStrategyDeserializer.kt deleted file mode 100644 index 4bc70a31f..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/RetryStrategyDeserializer.kt +++ /dev/null @@ -1,30 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.fasterxml.jackson.databind.node.ObjectNode -import com.fasterxml.jackson.module.kotlin.treeToValue -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.strategy.RetryStrategy -import com.malinskiy.marathon.execution.strategy.impl.retry.NoRetryStrategy -import com.malinskiy.marathon.execution.strategy.impl.retry.fixedquota.FixedQuotaRetryStrategy - -class RetryStrategyDeserializer : StdDeserializer(RetryStrategy::class.java) { - override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): RetryStrategy { - val codec = p?.codec as ObjectMapper - val node: JsonNode = codec.readTree(p) ?: throw ConfigurationException("Missing retry strategy") - val type = node.get("type").asText() - - return when (type) { - "no-retry" -> NoRetryStrategy() - "fixed-quota" -> { - (node as ObjectNode).remove("type") - return codec.treeToValue(node) - } - else -> throw ConfigurationException("Unrecognized retry strategy $type") - } - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/ShardingStrategyDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/ShardingStrategyDeserializer.kt deleted file mode 100644 index bb672ad81..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/ShardingStrategyDeserializer.kt +++ /dev/null @@ -1,30 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.fasterxml.jackson.databind.node.ObjectNode -import com.fasterxml.jackson.module.kotlin.treeToValue -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.strategy.ShardingStrategy -import com.malinskiy.marathon.execution.strategy.impl.sharding.CountShardingStrategy -import com.malinskiy.marathon.execution.strategy.impl.sharding.ParallelShardingStrategy - -class ShardingStrategyDeserializer : StdDeserializer(ShardingStrategy::class.java) { - override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): ShardingStrategy { - val codec = p?.codec as ObjectMapper - val node: JsonNode = codec.readTree(p) ?: throw ConfigurationException("Missing sharding strategy") - val type = node.get("type").asText() - - return when (type) { - "count" -> { - (node as ObjectNode).remove("type") - return codec.treeToValue(node) - } - "parallel" -> ParallelShardingStrategy() - else -> throw ConfigurationException("Unrecognized sharding strategy ${type}") - } - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/SortingStrategyDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/SortingStrategyDeserializer.kt deleted file mode 100644 index 59712a76c..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/SortingStrategyDeserializer.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.fasterxml.jackson.databind.node.ObjectNode -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.strategy.SortingStrategy -import com.malinskiy.marathon.execution.strategy.impl.sorting.ExecutionTimeSortingStrategy -import com.malinskiy.marathon.execution.strategy.impl.sorting.NoSortingStrategy -import com.malinskiy.marathon.execution.strategy.impl.sorting.RandomOrderSortingStrategy -import com.malinskiy.marathon.execution.strategy.impl.sorting.SuccessRateSortingStrategy - -class SortingStrategyDeserializer : StdDeserializer(SortingStrategy::class.java) { - override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): SortingStrategy { - val codec = p?.codec as ObjectMapper - val node: JsonNode = codec.readTree(p) ?: throw ConfigurationException("Missing sorting strategy") - val type = node.get("type").asText() - - return when (type) { - "no-sorting" -> NoSortingStrategy() - "random-order" -> RandomOrderSortingStrategy() - "success-rate" -> { - (node as ObjectNode).remove("type") - codec.treeToValue(node, SuccessRateSortingStrategy::class.java) - } - "execution-time" -> { - (node as ObjectNode).remove("type") - codec.treeToValue(node, ExecutionTimeSortingStrategy::class.java) - } - else -> throw ConfigurationException("Unrecognized sorting strategy $type") - } - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/TestFilterDeserializer.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/TestFilterDeserializer.kt deleted file mode 100644 index 8cb460264..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/deserialize/TestFilterDeserializer.kt +++ /dev/null @@ -1,54 +0,0 @@ -package com.malinskiy.marathon.cli.config.deserialize - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.deser.std.StdDeserializer -import com.fasterxml.jackson.databind.node.ObjectNode -import com.fasterxml.jackson.module.kotlin.treeToValue -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.AnnotationFilter -import com.malinskiy.marathon.execution.CompositionFilter -import com.malinskiy.marathon.execution.FullyQualifiedClassnameFilter -import com.malinskiy.marathon.execution.SimpleClassnameFilter -import com.malinskiy.marathon.execution.TestFilter -import com.malinskiy.marathon.execution.TestMethodFilter -import com.malinskiy.marathon.execution.TestPackageFilter - -class TestFilterDeserializer : StdDeserializer(TestFilter::class.java) { - override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): TestFilter { - val codec = p?.codec as ObjectMapper - val node: JsonNode = codec.readTree(p) ?: throw ConfigurationException("Missing filter strategy") - val type = node.get("type").asText() - - return when (type) { - "simple-class-name" -> { - (node as ObjectNode).remove("type") - codec.treeToValue(node) - } - "fully-qualified-class-name" -> { - (node as ObjectNode).remove("type") - codec.treeToValue(node) - } - "package" -> { - (node as ObjectNode).remove("type") - codec.treeToValue(node) - } - "annotation" -> { - (node as ObjectNode).remove("type") - codec.treeToValue(node) - } - "method" -> { - (node as ObjectNode).remove("type") - codec.treeToValue(node) - } - "composition" -> { - (node as ObjectNode).remove("type") - codec.treeToValue(node) - } - - else -> throw ConfigurationException("Unrecognized filter type $type") - } - } -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/time/InstantTimeProvider.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/time/InstantTimeProvider.kt deleted file mode 100644 index ddedde01c..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/time/InstantTimeProvider.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.malinskiy.marathon.cli.config.time - -import java.time.Instant - -interface InstantTimeProvider { - fun referenceTime(): Instant -} diff --git a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/time/InstantTimeProviderImpl.kt b/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/time/InstantTimeProviderImpl.kt deleted file mode 100644 index a98fbce61..000000000 --- a/cli/src/main/kotlin/com/malinskiy/marathon/cli/config/time/InstantTimeProviderImpl.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.malinskiy.marathon.cli.config.time - -import java.time.Instant - -class InstantTimeProviderImpl : InstantTimeProvider { - override fun referenceTime(): Instant = Instant.now() -} diff --git a/cli/src/test/kotlin/com/malinskiy/marathon/cli/args/FileAndroidConfigurationSpek.kt b/cli/src/test/kotlin/com/malinskiy/marathon/cli/args/FileAndroidConfigurationSpek.kt deleted file mode 100644 index d1d9a140a..000000000 --- a/cli/src/test/kotlin/com/malinskiy/marathon/cli/args/FileAndroidConfigurationSpek.kt +++ /dev/null @@ -1,88 +0,0 @@ -package com.malinskiy.marathon.cli.args - -import com.malinskiy.marathon.android.serial.SerialStrategy -import com.malinskiy.marathon.exceptions.ConfigurationException -import org.amshove.kluent.shouldBeEqualTo -import org.amshove.kluent.shouldThrow -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.dsl.it -import java.io.File - -object FileAndroidConfigurationSpek : Spek( - { - describe("FileAndroidConfiguration") { - val configuration by memoized { - FileAndroidConfiguration( - null, - null, - null, - File.createTempFile("foo", "bar"), - null, - null, - null, - null, - null, - null, - null, - SerialStrategy.AUTOMATIC - ) - } - - val env = File.createTempFile("foo", "bar") - val sdk = File.createTempFile("android", "sdk") - - group("androidSdk is null") { - it("should throw Exception if env android sdk also is null") { - { configuration.toAndroidConfiguration(null) } shouldThrow ConfigurationException::class - } - it("should use env android sdk if it is not null") { - configuration.toAndroidConfiguration(env).androidSdk shouldBeEqualTo env - } - } - group("android sdk is not null") { - it("should use android sdk instead of env if both exists") { - configuration.copy(androidSdk = sdk).toAndroidConfiguration(env).androidSdk shouldBeEqualTo sdk - } - } - group("test application output") { - it("should be null by default") { - configuration.toAndroidConfiguration(env).applicationOutput shouldBeEqualTo null - } - it("should be null if provided") { - configuration.copy(applicationOutput = env).toAndroidConfiguration(env).applicationOutput shouldBeEqualTo env - } - } - group("test application apk") { - it("should be equal") { - configuration.copy(testApplicationOutput = env).toAndroidConfiguration(env).testApplicationOutput shouldBeEqualTo env - } - } - group("auto grant permissions") { - it("should be false by default") { - configuration.toAndroidConfiguration(env).autoGrantPermission shouldBeEqualTo false - } - it("should be equal") { - configuration.copy(autoGrantPermission = false).toAndroidConfiguration(env).autoGrantPermission shouldBeEqualTo false - configuration.copy(autoGrantPermission = true).toAndroidConfiguration(env).autoGrantPermission shouldBeEqualTo true - } - } - group("adb init timeout millis") { - it("should be 30_000 by default") { - configuration.toAndroidConfiguration(env).adbInitTimeoutMillis shouldBeEqualTo 30_000 - } - it("should be equal") { - val timeout = 500_000 - configuration.copy(adbInitTimeoutMillis = timeout).toAndroidConfiguration(env).adbInitTimeoutMillis shouldBeEqualTo timeout - } - } - group("install options") { - it("should be empty string by default") { - configuration.toAndroidConfiguration(env).installOptions shouldBeEqualTo "" - } - it("should be equal if provided") { - configuration.copy(installOptions = "-d").toAndroidConfiguration(env).installOptions shouldBeEqualTo "-d" - } - } - } - }) diff --git a/cli/src/test/kotlin/com/malinskiy/marathon/cli/config/ConfigFactorySpec.kt b/cli/src/test/kotlin/com/malinskiy/marathon/cli/config/ConfigFactorySpec.kt deleted file mode 100644 index 93ca7b5a7..000000000 --- a/cli/src/test/kotlin/com/malinskiy/marathon/cli/config/ConfigFactorySpec.kt +++ /dev/null @@ -1,412 +0,0 @@ -package com.malinskiy.marathon.cli.config - -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.dataformat.yaml.YAMLFactory -import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule -import com.fasterxml.jackson.module.kotlin.KotlinModule -import com.malinskiy.marathon.android.AndroidConfiguration -import com.malinskiy.marathon.android.serial.SerialStrategy -import com.malinskiy.marathon.cache.config.Credentials -import com.malinskiy.marathon.cache.config.LocalCacheConfiguration -import com.malinskiy.marathon.cache.config.RemoteCacheConfiguration -import com.malinskiy.marathon.cli.args.EnvironmentConfiguration -import com.malinskiy.marathon.cli.args.environment.EnvironmentReader -import com.malinskiy.marathon.cli.config.time.InstantTimeProvider -import com.malinskiy.marathon.device.DeviceFeature -import com.malinskiy.marathon.exceptions.ConfigurationException -import com.malinskiy.marathon.execution.AnalyticsConfiguration -import com.malinskiy.marathon.execution.AnnotationFilter -import com.malinskiy.marathon.execution.CompositionFilter -import com.malinskiy.marathon.execution.FullyQualifiedClassnameFilter -import com.malinskiy.marathon.execution.SimpleClassnameFilter -import com.malinskiy.marathon.execution.TestMethodFilter -import com.malinskiy.marathon.execution.TestPackageFilter -import com.malinskiy.marathon.execution.strategy.impl.batching.FixedSizeBatchingStrategy -import com.malinskiy.marathon.execution.strategy.impl.batching.IsolateBatchingStrategy -import com.malinskiy.marathon.execution.strategy.impl.flakiness.IgnoreFlakinessStrategy -import com.malinskiy.marathon.execution.strategy.impl.flakiness.ProbabilityBasedFlakinessStrategy -import com.malinskiy.marathon.execution.strategy.impl.pooling.OmniPoolingStrategy -import com.malinskiy.marathon.execution.strategy.impl.pooling.parameterized.AbiPoolingStrategy -import com.malinskiy.marathon.execution.strategy.impl.pooling.parameterized.ComboPoolingStrategy -import com.malinskiy.marathon.execution.strategy.impl.pooling.parameterized.ManufacturerPoolingStrategy -import com.malinskiy.marathon.execution.strategy.impl.pooling.parameterized.ModelPoolingStrategy -import com.malinskiy.marathon.execution.strategy.impl.pooling.parameterized.OperatingSystemVersionPoolingStrategy -import com.malinskiy.marathon.execution.strategy.impl.retry.NoRetryStrategy -import com.malinskiy.marathon.execution.strategy.impl.retry.fixedquota.FixedQuotaRetryStrategy -import com.malinskiy.marathon.execution.strategy.impl.sharding.CountShardingStrategy -import com.malinskiy.marathon.execution.strategy.impl.sharding.ParallelShardingStrategy -import com.malinskiy.marathon.execution.strategy.impl.sorting.ExecutionTimeSortingStrategy -import com.malinskiy.marathon.execution.strategy.impl.sorting.NoSortingStrategy -import com.malinskiy.marathon.execution.strategy.impl.sorting.RandomOrderSortingStrategy -import com.malinskiy.marathon.execution.strategy.impl.sorting.SuccessRateSortingStrategy -import com.malinskiy.marathon.ios.IOSConfiguration -import ddmlibModule -import org.amshove.kluent.`it returns` -import org.amshove.kluent.mock -import org.amshove.kluent.`should be instance of` -import org.amshove.kluent.shouldBe -import org.amshove.kluent.shouldBeEmpty -import org.amshove.kluent.shouldBeEqualTo -import org.amshove.kluent.shouldContainAll -import org.amshove.kluent.shouldNotThrow -import org.amshove.kluent.shouldThrow -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.dsl.it -import org.mockito.kotlin.whenever -import java.io.File -import java.time.Duration -import java.time.Instant -import java.time.format.DateTimeFormatter - -object ConfigFactorySpec : Spek( - { - describe("ConfigFactory") { - val referenceInstant = Instant.ofEpochSecond(1000000) - val mockInstantTimeProvider = object : InstantTimeProvider { - override fun referenceTime(): Instant = referenceInstant - } - - lateinit var parser: ConfigFactory - beforeEachTest { - val mapper = ObjectMapper(YAMLFactory().disable(YAMLGenerator.Feature.USE_NATIVE_TYPE_ID)) - mapper.registerModule(DeserializeModule(mockInstantTimeProvider)) - .registerModule(KotlinModule()) - .registerModule(JavaTimeModule()) - parser = ConfigFactory(mapper) - } - - fun mockEnvironmentReader(path: String? = null): EnvironmentReader { - val environmentReader: EnvironmentReader = mock() - whenever(environmentReader.read()) `it returns` EnvironmentConfiguration(path?.let { File(it) }) - return environmentReader - } - - context("sample config 1") { - val file = File(ConfigFactorySpec::class.java.getResource("/fixture/config/sample_1.yaml").file) - - it("should deserialize") { - val configuration = parser.create(file, mockEnvironmentReader()) - - configuration.name shouldBeEqualTo "sample-app tests" - configuration.outputDir shouldBeEqualTo File("./marathon") - configuration.analyticsConfiguration shouldBeEqualTo AnalyticsConfiguration.InfluxDbConfiguration( - url = "http://influx.svc.cluster.local:8086", - user = "root", - password = "root", - dbName = "marathon", - retentionPolicyConfiguration = AnalyticsConfiguration.InfluxDbConfiguration.RetentionPolicyConfiguration.default - ) - configuration.poolingStrategy shouldBeEqualTo ComboPoolingStrategy( - listOf( - OmniPoolingStrategy(), - ModelPoolingStrategy(), - OperatingSystemVersionPoolingStrategy(), - ManufacturerPoolingStrategy(), - AbiPoolingStrategy() - ) - ) - configuration.shardingStrategy shouldBeEqualTo CountShardingStrategy(5) - configuration.sortingStrategy shouldBeEqualTo SuccessRateSortingStrategy( - Instant.from( - DateTimeFormatter.ISO_DATE_TIME.parse("2015-03-14T09:26:53.590Z") - ), false - ) - configuration.batchingStrategy shouldBeEqualTo FixedSizeBatchingStrategy(5) - configuration.flakinessStrategy shouldBeEqualTo ProbabilityBasedFlakinessStrategy( - 0.7, - 3, - Instant.from( - DateTimeFormatter.ISO_DATE_TIME.parse( - "2015-03-14T09:26:53.590Z" - ) - ) - ) - configuration.retryStrategy shouldBeEqualTo FixedQuotaRetryStrategy(100, 2) - SimpleClassnameFilter(".*".toRegex()) shouldBeEqualTo SimpleClassnameFilter(".*".toRegex()) - - configuration.cache.local shouldBeEqualTo LocalCacheConfiguration.Disabled - configuration.cache.remote shouldBeEqualTo RemoteCacheConfiguration.Disabled - - configuration.filteringConfiguration.whitelist shouldContainAll listOf( - SimpleClassnameFilter(".*".toRegex()), - FullyQualifiedClassnameFilter(".*".toRegex()), - TestMethodFilter(".*".toRegex()), - CompositionFilter( - listOf( - TestPackageFilter(".*".toRegex()), - TestMethodFilter(".*".toRegex()) - ), CompositionFilter.OPERATION.UNION - ) - ) - - configuration.filteringConfiguration.blacklist shouldContainAll listOf( - TestPackageFilter(".*".toRegex()), - AnnotationFilter(".*".toRegex()) - ) - configuration.testClassRegexes.map { it.toString() } shouldContainAll listOf("^((?!Abstract).)*Test$") - - // Regex doesn't have proper equals method. Need to check the patter itself - configuration.includeSerialRegexes.joinToString(separator = "") { it.pattern } shouldBeEqualTo """emulator-500[2,4]""".toRegex().pattern - configuration.excludeSerialRegexes.joinToString(separator = "") { it.pattern } shouldBeEqualTo """emulator-5002""".toRegex().pattern - configuration.ignoreFailures shouldBeEqualTo false - configuration.isCodeCoverageEnabled shouldBeEqualTo false - configuration.fallbackToScreenshots shouldBeEqualTo false - configuration.strictMode shouldBeEqualTo true - configuration.testBatchTimeoutMillis shouldBeEqualTo 20_000 - configuration.testOutputTimeoutMillis shouldBeEqualTo 30_000 - configuration.debug shouldBeEqualTo true - - configuration.vendorConfiguration shouldBeEqualTo AndroidConfiguration( - File("/local/android"), - File("kotlin-buildscript/build/outputs/apk/debug/kotlin-buildscript-debug.apk"), - File("kotlin-buildscript/build/outputs/apk/androidTest/debug/kotlin-buildscript-debug-androidTest.apk"), - listOf(ddmlibModule), - true, - mapOf("debug" to "false"), - true, - true, - 30_000, - "-d", - DeviceFeature.SCREENSHOT, - SerialStrategy.AUTOMATIC - ) - } - } - context("sample config 1 with custom retention policy") { - val file = - File(ConfigFactorySpec::class.java.getResource("/fixture/config/sample_1_rp.yaml").file) - - it("should deserialize") { - val configuration = parser.create(file, mockEnvironmentReader()) - configuration.analyticsConfiguration shouldBeEqualTo AnalyticsConfiguration.InfluxDbConfiguration( - url = "http://influx.svc.cluster.local:8086", - user = "root", - password = "root", - dbName = "marathon", - retentionPolicyConfiguration = AnalyticsConfiguration.InfluxDbConfiguration.RetentionPolicyConfiguration( - "rpMarathonTest", - "90d", - "1h", - 5, - false - ) - ) - } - } - - - context("config with custom local caching policy") { - val file = - File(ConfigFactorySpec::class.java.getResource("/fixture/config/sample_11_local_cache.yaml").file) - - it("should deserialize") { - val configuration = parser.create(file, mockEnvironmentReader()) - configuration.cache.local shouldBeEqualTo LocalCacheConfiguration.Enabled( - directory = File("~/.marathon/cache"), - removeUnusedEntriesAfterDays = 256 - ) - } - } - - context("config with custom remote caching policy") { - val file = - File(ConfigFactorySpec::class.java.getResource("/fixture/config/sample_12_remote_cache.yaml").file) - - it("should deserialize") { - val configuration = parser.create(file, mockEnvironmentReader()) - configuration.cache.remote shouldBeEqualTo RemoteCacheConfiguration.Enabled( - url = "https://test-cache.abc/cache", - credentials = Credentials( - userName = "test", - password = "abc" - ) - ) - } - } - - context("sample config 2") { - - val file = File(ConfigFactorySpec::class.java.getResource("/fixture/config/sample_2.yaml").file) - - it("should deserialize with minimal configuration") { - val configuration = parser.create(file, mockEnvironmentReader()) - - configuration.name shouldBeEqualTo "sample-app tests" - configuration.outputDir shouldBeEqualTo File("./marathon") - configuration.analyticsConfiguration shouldBeEqualTo AnalyticsConfiguration.DisabledAnalytics - configuration.poolingStrategy shouldBeEqualTo OmniPoolingStrategy() - configuration.shardingStrategy shouldBeEqualTo ParallelShardingStrategy() - configuration.sortingStrategy shouldBeEqualTo NoSortingStrategy() - configuration.batchingStrategy shouldBeEqualTo IsolateBatchingStrategy() - configuration.flakinessStrategy shouldBeEqualTo IgnoreFlakinessStrategy() - configuration.retryStrategy shouldBeEqualTo NoRetryStrategy() - SimpleClassnameFilter(".*".toRegex()) shouldBeEqualTo SimpleClassnameFilter(".*".toRegex()) - - configuration.filteringConfiguration.whitelist.shouldBeEmpty() - configuration.filteringConfiguration.blacklist.shouldBeEmpty() - - configuration.testClassRegexes.map { it.toString() } shouldContainAll listOf("^((?!Abstract).)*Test$") - - configuration.includeSerialRegexes shouldBeEqualTo emptyList() - configuration.excludeSerialRegexes shouldBeEqualTo emptyList() - configuration.ignoreFailures shouldBeEqualTo false - configuration.isCodeCoverageEnabled shouldBeEqualTo false - configuration.fallbackToScreenshots shouldBeEqualTo false - configuration.testBatchTimeoutMillis shouldBeEqualTo 900_000 - configuration.testOutputTimeoutMillis shouldBeEqualTo 60_000 - configuration.debug shouldBeEqualTo true - configuration.vendorConfiguration shouldBeEqualTo AndroidConfiguration( - File("/local/android"), - File("kotlin-buildscript/build/outputs/apk/debug/kotlin-buildscript-debug.apk"), - File("kotlin-buildscript/build/outputs/apk/androidTest/debug/kotlin-buildscript-debug-androidTest.apk"), - listOf(ddmlibModule), - false, - mapOf(), - false, - false, - 30_000, - "", - null, - SerialStrategy.AUTOMATIC - ) - } - } - - context("config with ios vendor configuration") { - val file = File(ConfigFactorySpec::class.java.getResource("/fixture/config/sample_3.yaml").file) - - it("should initialize a specific vendor configuration") { - val configuration = parser.create(file, mockEnvironmentReader()) - - configuration.vendorConfiguration shouldBeEqualTo IOSConfiguration( - derivedDataDir = file.parentFile.resolve("a"), - xctestrunPath = file.parentFile.resolve("a/Build/Products/UITesting_iphonesimulator11.0-x86_64.xctestrun"), - remoteUsername = "testuser", - remotePrivateKey = File("/home/testuser/.ssh/id_rsa"), - knownHostsPath = file.parentFile.resolve("known_hosts"), - remoteRsyncPath = "/usr/local/bin/rsync", - debugSsh = true, - alwaysEraseSimulators = false, - hideRunnerOutput = true, - compactOutput = true, - keepAliveIntervalMillis = 300000L, - devicesFile = file.parentFile.resolve("Testdevices") - ) - } - } - - context("configuration without an explicit remote rsync path") { - val file = File(ConfigFactorySpec::class.java.getResource("/fixture/config/sample_4.yaml").file) - - it("should initialize a default one") { - val configuration = parser.create(file, mockEnvironmentReader()) - - val iosConfiguration = configuration.vendorConfiguration as IOSConfiguration - iosConfiguration.remoteRsyncPath shouldBeEqualTo "/usr/bin/rsync" - } - } - - context("configuration without an explicit xctestrun path") { - val file = File(ConfigFactorySpec::class.java.getResource("/fixture/config/sample_5.yaml").file) - - it("should throw an exception") { - val create = { parser.create(file, mockEnvironmentReader()) } - - create shouldThrow ConfigurationException::class - } - } - - context("configuration without androidSdk value") { - val file = File(ConfigFactorySpec::class.java.getResource("/fixture/config/sample_6.yaml").file) - val environmentReader = mockEnvironmentReader("/android/home") - - it("should use value provided by environment") { - val configuration = parser.create(file, environmentReader) - - configuration.vendorConfiguration shouldBeEqualTo AndroidConfiguration( - environmentReader.read().androidSdk!!, - File("kotlin-buildscript/build/outputs/apk/debug/kotlin-buildscript-debug.apk"), - File("kotlin-buildscript/build/outputs/apk/androidTest/debug/kotlin-buildscript-debug-androidTest.apk"), - listOf(ddmlibModule), - false, - mapOf(), - false, - false, - 30_000, - "", - null, - SerialStrategy.HOSTNAME - ) - } - } - - context("configuration without androidSdk value") { - val file = File(ConfigFactorySpec::class.java.getResource("/fixture/config/sample_7.yaml").file) - - it("should throw an exception when ANDROID_HOME is not set") { - val create = { parser.create(file, mockEnvironmentReader(null)) } - - create shouldNotThrow ConfigurationException::class - } - } - - context("configuration with whitelist but no blacklist") { - val file = File(ConfigFactorySpec::class.java.getResource("/fixture/config/sample_8.yaml").file) - - it("should initialize an empty blacklist") { - val configuration = parser.create(file, mockEnvironmentReader()) - - configuration.filteringConfiguration.whitelist shouldBeEqualTo listOf( - SimpleClassnameFilter(".*".toRegex()) - ) - - configuration.filteringConfiguration.blacklist shouldBe emptyList() - } - } - - context("configuration with blacklist but no whitelist") { - val file = File(ConfigFactorySpec::class.java.getResource("/fixture/config/sample_9.yaml").file) - - it("should initialize an empty whitelist") { - val configuration = parser.create(file, mockEnvironmentReader()) - - configuration.filteringConfiguration.whitelist shouldBe emptyList() - - configuration.filteringConfiguration.blacklist shouldBeEqualTo listOf( - SimpleClassnameFilter(".*".toRegex()) - ) - } - } - - context("configuration time limits specified as Duration") { - val file = - File(ConfigFactorySpec::class.java.getResource("/fixture/config/sample_10.yaml").file) - - it("should be used as relative values") { - val configuration = parser.create(file, mockEnvironmentReader()) - - configuration.sortingStrategy `should be instance of` ExecutionTimeSortingStrategy::class - val sortingStrategy = configuration.sortingStrategy as ExecutionTimeSortingStrategy - sortingStrategy.timeLimit shouldBeEqualTo referenceInstant.minus(Duration.ofHours(1)) - - configuration.flakinessStrategy `should be instance of` ProbabilityBasedFlakinessStrategy::class - val flakinessStrategy = configuration.flakinessStrategy as ProbabilityBasedFlakinessStrategy - flakinessStrategy.timeLimit shouldBeEqualTo referenceInstant.minus(Duration.ofDays(30)) - } - } - - context("configuration with random sorting strategy") { - val file = - File(ConfigFactorySpec::class.java.getResource("/fixture/config/sample_random_sorting_strategy.yaml").file) - - it("strategy should be read correctly") { - val configuration = parser.create(file, mockEnvironmentReader()) - - configuration.sortingStrategy shouldBeEqualTo RandomOrderSortingStrategy() - } - } - } - }) diff --git a/cli/src/test/kotlin/com/malinskiy/marathon/cli/config/FileIOSConfigurationSpek.kt b/cli/src/test/kotlin/com/malinskiy/marathon/cli/config/FileIOSConfigurationSpek.kt deleted file mode 100644 index 39bb86704..000000000 --- a/cli/src/test/kotlin/com/malinskiy/marathon/cli/config/FileIOSConfigurationSpek.kt +++ /dev/null @@ -1,62 +0,0 @@ -package com.malinskiy.marathon.cli.config - -import com.malinskiy.marathon.cli.args.FileIOSConfiguration -import com.malinskiy.marathon.cli.args.FileListProvider -import com.malinskiy.marathon.exceptions.ConfigurationException -import org.amshove.kluent.shouldBeEqualTo -import org.amshove.kluent.shouldThrow -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.dsl.it -import java.io.File - -object FileIOSConfigurationSpek : Spek( - { - describe("Building an iOS file configuration") { - - val mockMarathonFileDir = File("") - val mockXctestrunFile = File("Build/uitesting.xctestrun") - var mockDerivedDataFiles = { emptySequence() } - val mockFileListProvider = object : FileListProvider { - override fun fileList(root: File): Iterable = mockDerivedDataFiles().asIterable() - } - - context("when xctestrun is not specified") { - val fileIOSConfiguration = FileIOSConfiguration( - derivedDataDir = File("a"), - xctestrunPath = null, - remoteUsername = "user", - remotePrivateKey = File("key"), - knownHostsPath = null, - sourceRoot = File("sourceRoot"), - fileListProvider = mockFileListProvider, - debugSsh = null, - alwaysEraseSimulators = true, - hideRunnerOutput = null, - devices = null - ) - - it("should search for such file under derived data folder") { - mockDerivedDataFiles = - { sequenceOf(File("."), mockXctestrunFile, File("runner.app")) } - - val iosConfiguration = - fileIOSConfiguration.toIOSConfiguration(mockMarathonFileDir, null) - - iosConfiguration.xctestrunPath shouldBeEqualTo mockXctestrunFile - } - - it("should throw an exception if such file is not available") { - mockDerivedDataFiles = { sequenceOf(File("."), File("runner.app")) } - - val thrower = { - val iosConfiguration = - fileIOSConfiguration.toIOSConfiguration(mockMarathonFileDir, null) - } - - thrower shouldThrow ConfigurationException::class - } - } - } - }) diff --git a/cli/src/test/resources/fixture/config/sample_1.yaml b/cli/src/test/resources/fixture/config/sample_1.yaml deleted file mode 100644 index b46a0a26e..000000000 --- a/cli/src/test/resources/fixture/config/sample_1.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: "sample-app tests" -outputDir: "./marathon" -analyticsConfiguration: - influx: - url: "http://influx.svc.cluster.local:8086" - user: "root" - password: "root" - dbName: "marathon" -poolingStrategy: - - type: "omni" - - type: "device-model" - - type: "os-version" - - type: "manufacturer" - - type: "abi" -shardingStrategy: - type: "count" - count: 5 -sortingStrategy: - type: "success-rate" - timeLimit: "2015-03-14T09:26:53.590Z" -batchingStrategy: - type: "fixed-size" - size: 5 -flakinessStrategy: - type: "probability" - minSuccessRate: 0.7 - maxCount: 3 - timeLimit: "2015-03-14T09:26:53.590Z" -retryStrategy: - type: "fixed-quota" - totalAllowedRetryQuota: 100 - retryPerTestQuota: 2 -filteringConfiguration: - whitelist: - - type: "simple-class-name" - regex: ".*" - - type: "fully-qualified-class-name" - regex: ".*" - - type: "method" - regex: ".*" - - type: "composition" - filters: - - type: "package" - regex: ".*" - - type: "method" - regex: ".*" - op: "UNION" - blacklist: - - type: "package" - regex: ".*" - - type: "annotation" - regex: ".*" -testClassRegexes: - - "^((?!Abstract).)*Test$" -includeSerialRegexes: - - "emulator-500[2,4]" -excludeSerialRegexes: - - "emulator-5002" -ignoreFailures: false -isCodeCoverageEnabled: false -fallbackToScreenshots: false -strictMode: true -testBatchTimeoutMillis: 20000 -testOutputTimeoutMillis: 30000 -debug: true -vendorConfiguration: - type: "Android" - androidSdk: "/local/android" - applicationApk: "kotlin-buildscript/build/outputs/apk/debug/kotlin-buildscript-debug.apk" - testApplicationApk: "kotlin-buildscript/build/outputs/apk/androidTest/debug/kotlin-buildscript-debug-androidTest.apk" - autoGrantPermission: true - applicationPmClear: true - testApplicationPmClear: true - instrumentationArgs: - debug: "false" - installOptions: "-d" - preferableRecorderType: "screenshot" diff --git a/cli/src/test/resources/fixture/config/sample_10.yaml b/cli/src/test/resources/fixture/config/sample_10.yaml deleted file mode 100644 index 75a07905b..000000000 --- a/cli/src/test/resources/fixture/config/sample_10.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: "sample-app tests" -outputDir: "./marathon" -vendorConfiguration: - type: "Android" - androidSdk: "/local/android" - applicationApk: "kotlin-buildscript/build/outputs/apk/debug/kotlin-buildscript-debug.apk" - testApplicationApk: "kotlin-buildscript/build/outputs/apk/androidTest/debug/kotlin-buildscript-debug-androidTest.apk" -sortingStrategy: - type: "execution-time" - percentile: 80.0 - timeLimit: "-PT1H" -flakinessStrategy: - type: "probability" - minSuccessRate: 0.7 - maxCount: 3 - timeLimit: "-P30D" diff --git a/cli/src/test/resources/fixture/config/sample_11_local_cache.yaml b/cli/src/test/resources/fixture/config/sample_11_local_cache.yaml deleted file mode 100644 index 576173f26..000000000 --- a/cli/src/test/resources/fixture/config/sample_11_local_cache.yaml +++ /dev/null @@ -1,11 +0,0 @@ -name: "sample-app tests" -outputDir: "./marathon" -vendorConfiguration: - type: "Android" - androidSdk: "/local/android" - applicationApk: "kotlin-buildscript/build/outputs/apk/debug/kotlin-buildscript-debug.apk" - testApplicationApk: "kotlin-buildscript/build/outputs/apk/androidTest/debug/kotlin-buildscript-debug-androidTest.apk" -cache: - local: - directory: "~/.marathon/cache" - removeUnusedEntriesAfterDays: 256 diff --git a/cli/src/test/resources/fixture/config/sample_12_remote_cache.yaml b/cli/src/test/resources/fixture/config/sample_12_remote_cache.yaml deleted file mode 100644 index 109d27ed2..000000000 --- a/cli/src/test/resources/fixture/config/sample_12_remote_cache.yaml +++ /dev/null @@ -1,13 +0,0 @@ -name: "sample-app tests" -outputDir: "./marathon" -vendorConfiguration: - type: "Android" - androidSdk: "/local/android" - applicationApk: "kotlin-buildscript/build/outputs/apk/debug/kotlin-buildscript-debug.apk" - testApplicationApk: "kotlin-buildscript/build/outputs/apk/androidTest/debug/kotlin-buildscript-debug-androidTest.apk" -cache: - remote: - url: "https://test-cache.abc/cache" - credentials: - userName: test - password: abc diff --git a/cli/src/test/resources/fixture/config/sample_1_rp.yaml b/cli/src/test/resources/fixture/config/sample_1_rp.yaml deleted file mode 100644 index df6c40c5e..000000000 --- a/cli/src/test/resources/fixture/config/sample_1_rp.yaml +++ /dev/null @@ -1,83 +0,0 @@ -name: "sample-app tests" -outputDir: "./marathon" -analyticsConfiguration: - influx: - url: "http://influx.svc.cluster.local:8086" - user: "root" - password: "root" - dbName: "marathon" - retentionPolicyConfiguration: - name: "rpMarathonTest" - duration: "90d" - shardDuration: "1h" - replicationFactor: 5 - isDefault: false -poolingStrategy: - - type: "omni" - - type: "device-model" - - type: "os-version" - - type: "manufacturer" - - type: "abi" -shardingStrategy: - type: "count" - count: 5 -sortingStrategy: - type: "success-rate" - timeLimit: "2015-03-14T09:26:53.590Z" -batchingStrategy: - type: "fixed-size" - size: 5 -flakinessStrategy: - type: "probability" - minSuccessRate: 0.7 - maxCount: 3 - timeLimit: "2015-03-14T09:26:53.590Z" -retryStrategy: - type: "fixed-quota" - totalAllowedRetryQuota: 100 - retryPerTestQuota: 2 -filteringConfiguration: - whitelist: - - type: "simple-class-name" - regex: ".*" - - type: "fully-qualified-class-name" - regex: ".*" - - type: "method" - regex: ".*" - - type: "composition" - filters: - - type: "package" - regex: ".*" - - type: "method" - regex: ".*" - op: "UNION" - blacklist: - - type: "package" - regex: ".*" - - type: "annotation" - regex: ".*" -testClassRegexes: - - "^((?!Abstract).)*Test$" -includeSerialRegexes: - - "emulator-500[2,4]" -excludeSerialRegexes: - - "emulator-5002" -ignoreFailures: false -isCodeCoverageEnabled: false -fallbackToScreenshots: false -strictMode: true -testBatchTimeoutMillis: 20000 -testOutputTimeoutMillis: 30000 -debug: true -vendorConfiguration: - type: "Android" - androidSdk: "/local/android" - applicationApk: "kotlin-buildscript/build/outputs/apk/debug/kotlin-buildscript-debug.apk" - testApplicationApk: "kotlin-buildscript/build/outputs/apk/androidTest/debug/kotlin-buildscript-debug-androidTest.apk" - autoGrantPermission: true - applicationPmClear: true - testApplicationPmClear: true - instrumentationArgs: - debug: "false" - installOptions: "-d" - preferableRecorderType: "screenshot" diff --git a/cli/src/test/resources/fixture/config/sample_2.yaml b/cli/src/test/resources/fixture/config/sample_2.yaml deleted file mode 100644 index 6cc627df2..000000000 --- a/cli/src/test/resources/fixture/config/sample_2.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: "sample-app tests" -outputDir: "./marathon" -vendorConfiguration: - type: "Android" - androidSdk: "/local/android" - applicationApk: "kotlin-buildscript/build/outputs/apk/debug/kotlin-buildscript-debug.apk" - testApplicationApk: "kotlin-buildscript/build/outputs/apk/androidTest/debug/kotlin-buildscript-debug-androidTest.apk" \ No newline at end of file diff --git a/cli/src/test/resources/fixture/config/sample_3.yaml b/cli/src/test/resources/fixture/config/sample_3.yaml deleted file mode 100644 index 5e2837185..000000000 --- a/cli/src/test/resources/fixture/config/sample_3.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: "sample-app tests" -outputDir: "./marathon" -vendorConfiguration: - type: "iOS" - xctestrunPath: "a/Build/Products/UITesting_iphonesimulator11.0-x86_64.xctestrun" - derivedDataDir: "a" - remoteUsername: "testuser" - remotePrivateKey: "/home/testuser/.ssh/id_rsa" - alwaysEraseSimulators: false - knownHostsPath: "known_hosts" - remoteRsyncPath: "/usr/local/bin/rsync" - debugSsh: true - hideRunnerOutput: true - compactOutput: true - keepAliveIntervalMillis: 300000 - devices: "Testdevices" diff --git a/cli/src/test/resources/fixture/config/sample_4.yaml b/cli/src/test/resources/fixture/config/sample_4.yaml deleted file mode 100644 index c0ecee837..000000000 --- a/cli/src/test/resources/fixture/config/sample_4.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: "sample-app tests" -outputDir: "./marathon" -vendorConfiguration: - type: "iOS" - xctestrunPath: "a/Build/Products/UITesting_iphonesimulator11.0-x86_64.xctestrun" - derivedDataDir: "a" - remoteUsername: "testuser" - remotePrivateKey: "/home/testuser/.ssh/id_rsa" - debugSsh: true diff --git a/cli/src/test/resources/fixture/config/sample_5.yaml b/cli/src/test/resources/fixture/config/sample_5.yaml deleted file mode 100644 index 144f0e5bd..000000000 --- a/cli/src/test/resources/fixture/config/sample_5.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: "sample-app tests" -outputDir: "./marathon" -vendorConfiguration: - type: "iOS" - derivedDataDir: "a" - remoteUsername: "testuser" - remotePrivateKey: "/home/testuser/.ssh/id_rsa" diff --git a/cli/src/test/resources/fixture/config/sample_6.yaml b/cli/src/test/resources/fixture/config/sample_6.yaml deleted file mode 100644 index a793526f3..000000000 --- a/cli/src/test/resources/fixture/config/sample_6.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: "sample-app tests" -outputDir: "./marathon" -vendorConfiguration: - type: "Android" - applicationApk: "kotlin-buildscript/build/outputs/apk/debug/kotlin-buildscript-debug.apk" - testApplicationApk: "kotlin-buildscript/build/outputs/apk/androidTest/debug/kotlin-buildscript-debug-androidTest.apk" - serialStrategy: "hostname" \ No newline at end of file diff --git a/cli/src/test/resources/fixture/config/sample_7.yaml b/cli/src/test/resources/fixture/config/sample_7.yaml deleted file mode 100644 index 86406efc1..000000000 --- a/cli/src/test/resources/fixture/config/sample_7.yaml +++ /dev/null @@ -1,6 +0,0 @@ -name: "sample-app tests" -outputDir: "./marathon" -vendorConfiguration: - type: "Android" - applicationApk: "kotlin-buildscript/build/outputs/apk/debug/kotlin-buildscript-debug.apk" - testApplicationApk: "kotlin-buildscript/build/outputs/apk/androidTest/debug/kotlin-buildscript-debug-androidTest.apk" \ No newline at end of file diff --git a/cli/src/test/resources/fixture/config/sample_8.yaml b/cli/src/test/resources/fixture/config/sample_8.yaml deleted file mode 100644 index 9f06c1080..000000000 --- a/cli/src/test/resources/fixture/config/sample_8.yaml +++ /dev/null @@ -1,11 +0,0 @@ -name: "sample-app tests" -outputDir: "./marathon" -vendorConfiguration: - type: "Android" - androidSdk: "/local/android" - applicationApk: "kotlin-buildscript/build/outputs/apk/debug/kotlin-buildscript-debug.apk" - testApplicationApk: "kotlin-buildscript/build/outputs/apk/androidTest/debug/kotlin-buildscript-debug-androidTest.apk" -filteringConfiguration: - whitelist: - - type: "simple-class-name" - regex: ".*" diff --git a/cli/src/test/resources/fixture/config/sample_9.yaml b/cli/src/test/resources/fixture/config/sample_9.yaml deleted file mode 100644 index ed54edcc3..000000000 --- a/cli/src/test/resources/fixture/config/sample_9.yaml +++ /dev/null @@ -1,11 +0,0 @@ -name: "sample-app tests" -outputDir: "./marathon" -vendorConfiguration: - type: "Android" - androidSdk: "/local/android" - applicationApk: "kotlin-buildscript/build/outputs/apk/debug/kotlin-buildscript-debug.apk" - testApplicationApk: "kotlin-buildscript/build/outputs/apk/androidTest/debug/kotlin-buildscript-debug-androidTest.apk" -filteringConfiguration: - blacklist: - - type: "simple-class-name" - regex: ".*" diff --git a/cli/src/test/resources/fixture/config/sample_random_sorting_strategy.yaml b/cli/src/test/resources/fixture/config/sample_random_sorting_strategy.yaml deleted file mode 100644 index aa2eb95c9..000000000 --- a/cli/src/test/resources/fixture/config/sample_random_sorting_strategy.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: "sample-app tests" -outputDir: "./marathon" -vendorConfiguration: - type: "Android" - androidSdk: "/local/android" - applicationApk: "kotlin-buildscript/build/outputs/apk/debug/kotlin-buildscript-debug.apk" - testApplicationApk: "kotlin-buildscript/build/outputs/apk/androidTest/debug/kotlin-buildscript-debug-androidTest.apk" -sortingStrategy: - type: "random-order" diff --git a/cli/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/cli/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker deleted file mode 100644 index 1f0955d45..000000000 --- a/cli/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker +++ /dev/null @@ -1 +0,0 @@ -mock-maker-inline diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 651feed0b..46e53ff7f 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -21,7 +21,6 @@ sourceSets { buildConfig { buildConfigField("String", "VERSION", "\"${Versions.marathon}\"") - buildConfigField("String?", "BUGSNAG_TOKEN", System.getenv("BUGSNAG_TOKEN")?.let { "\"$it\"" } ?: "null") } dependencies { @@ -31,7 +30,6 @@ dependencies { implementation(Libraries.allure) implementation(Libraries.allureEnvironment) - implementation(project(":analytics:usage")) implementation(Libraries.ktorClient) implementation(Libraries.ktorAuth) implementation(Libraries.ktorApacheClient) @@ -44,13 +42,10 @@ dependencies { implementation(Libraries.kotlinLogging) implementation(Libraries.slf4jAPI) implementation(Libraries.logbackClassic) - implementation(Libraries.influxDbClient) api(Libraries.koin) - api(Libraries.bugsnag) testImplementation(project(":vendor:vendor-test")) testImplementation(TestLibraries.kotlinCoroutinesTest) testImplementation(TestLibraries.testContainers) - testImplementation(TestLibraries.testContainersInflux) testImplementation(TestLibraries.ktorClientMock) testImplementation(TestLibraries.koin) } diff --git a/core/src/integrationTest/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxDbProviderIntegrationSpec.kt b/core/src/integrationTest/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxDbProviderIntegrationSpec.kt deleted file mode 100644 index 3f5d5c695..000000000 --- a/core/src/integrationTest/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxDbProviderIntegrationSpec.kt +++ /dev/null @@ -1,67 +0,0 @@ -package com.malinskiy.marathon.analytics.metrics.remote.influx - -import com.malinskiy.marathon.analytics.external.influx.InfluxDbProvider -import com.malinskiy.marathon.analytics.external.influx.InfluxMetricsProvider -import com.malinskiy.marathon.execution.AnalyticsConfiguration -import com.malinskiy.marathon.generateTest -import org.amshove.kluent.shouldBeEqualTo -import org.influxdb.InfluxDB -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.dsl.it -import java.time.Instant -import java.time.temporal.ChronoUnit - -class InfluxDbProviderIntegrationSpec : Spek( - { - val database = "marathonTest" - val rpName = "rpMarathon" - - val container = KInfluxDBContainer().withAuthEnabled(false) - - var thirdDbInstance: InfluxDB? = null - - beforeGroup { - container.start() - } - afterGroup { - thirdDbInstance?.close() - container.stop() - } - - describe("InfluxDbProvider") { - group("multiple creations") { - val test = generateTest() - it("should still have the same configured retention policy") { - val provider = InfluxDbProvider( - AnalyticsConfiguration.InfluxDbConfiguration( - url = container.url, - dbName = database, - password = "", - user = "root", - retentionPolicyConfiguration = AnalyticsConfiguration.InfluxDbConfiguration.RetentionPolicyConfiguration.default - ) - ) - val firstDbInstance = provider.createDb() - firstDbInstance.close() - - - val secondDbInstance = provider.createDb() - prepareData(secondDbInstance, test, database, rpName) - secondDbInstance.close() - - thirdDbInstance = provider.createDb() - - val metricsProvider = - InfluxMetricsProvider(InfluxDBDataSource(thirdDbInstance!!, database, rpName)) - - val result = metricsProvider.executionTime( - test, - 50.0, - Instant.now().minus(2, ChronoUnit.DAYS) - ) - result shouldBeEqualTo 5000.0 - } - } - } - }) diff --git a/core/src/integrationTest/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxMetricsProviderIntegrationSpec.kt b/core/src/integrationTest/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxMetricsProviderIntegrationSpec.kt deleted file mode 100644 index 8d50cbd97..000000000 --- a/core/src/integrationTest/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxMetricsProviderIntegrationSpec.kt +++ /dev/null @@ -1,221 +0,0 @@ -package com.malinskiy.marathon.analytics.metrics.remote.influx - -import com.malinskiy.marathon.analytics.external.influx.InfluxDbProvider -import com.malinskiy.marathon.analytics.external.influx.InfluxMetricsProvider -import com.malinskiy.marathon.device.DeviceStub -import com.malinskiy.marathon.device.toDeviceInfo -import com.malinskiy.marathon.execution.AnalyticsConfiguration -import com.malinskiy.marathon.execution.TestStatus -import com.malinskiy.marathon.generateTest -import com.malinskiy.marathon.test.Test -import com.malinskiy.marathon.test.toSafeTestName -import org.amshove.kluent.shouldBeEqualTo -import org.amshove.kluent.shouldBeInRange -import org.influxdb.InfluxDB -import org.influxdb.dto.Point -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.dsl.on -import org.jetbrains.spek.api.lifecycle.CachingMode -import java.time.Instant -import java.time.temporal.ChronoUnit -import java.util.concurrent.TimeUnit - -class InfluxMetricsProviderIntegrationSpec : Spek( - { - - val database = "marathonDb" - val rpName = "rpMarathon" - - val test = generateTest() - val container = KInfluxDBContainer().withAuthEnabled(false) - - val influxDB = memoized(mode = CachingMode.GROUP) { - val configuration = AnalyticsConfiguration.InfluxDbConfiguration( - url = container.url, - dbName = database, - user = "", - password = "", - retentionPolicyConfiguration = AnalyticsConfiguration.InfluxDbConfiguration.RetentionPolicyConfiguration.default - ) - InfluxDbProvider(configuration).createDb() - } - - beforeGroup { - container.start() - prepareData(influxDB.invoke(), test, database, rpName) - } - - afterGroup { - container.stop() - } - - val dataStore = memoized(mode = CachingMode.TEST) { - InfluxDBDataSource(influxDB.invoke(), database, rpName) - } - - val provider = memoized(mode = CachingMode.TEST) { - InfluxMetricsProvider(dataStore.invoke()) - } - - describe("InfluxMetricsProvider") { - on("empty db") { - it("success rate default value is 0.0") { - val result = provider.invoke().successRate(test, Instant.now()) - result shouldBeEqualTo 0.0 - } - it("execution time default value is 300_000.0") { - val result = provider.invoke().executionTime(test, 90.0, Instant.now()) - result shouldBeEqualTo 300_000.0 - } - } - group("execution time") { - it("50 percentile for last two days") { - val result = provider.invoke() - .executionTime(test, 50.0, Instant.now().minus(2, ChronoUnit.DAYS)) - result shouldBeEqualTo 5000.0 - } - it("90 percentile for last two days") { - val result = provider.invoke() - .executionTime(test, 90.0, Instant.now().minus(2, ChronoUnit.DAYS)) - result shouldBeEqualTo 9000.0 - } - it("50 percentile for 25 minutes") { - val result = provider.invoke().executionTime( - test, - 50.0, - Instant.now().minus(25, ChronoUnit.MINUTES) - ) - result shouldBeEqualTo 2000.0 - } - it("90 percentile for 25 minutes") { - val result = provider.invoke().executionTime( - test, - 90.0, - Instant.now().minus(35, ChronoUnit.MINUTES) - ) - result shouldBeEqualTo 4000.0 - } - } - group("test success rate") { - it("should return 1.0 for last 50 minutes") { - val result = provider.invoke() - .successRate(test, Instant.now().minus(50, ChronoUnit.MINUTES)) - result shouldBeEqualTo 1.0 - } - it("should return 0.7 for last 70 minutes") { - val result = provider.invoke() - .successRate(test, Instant.now().minus(70, ChronoUnit.MINUTES)) - result.shouldBeInRange(0.833, 0.834) - } - it("should return 0.5 for last 2 days") { - val result = provider.invoke() - .successRate(test, Instant.now().minus(2, ChronoUnit.DAYS)) - result shouldBeEqualTo 0.5 - } - } - } - }) - -fun prepareData(influxDb: InfluxDB, test: Test, database: String, rpName: String) { - val instant = Instant.now() - val device = DeviceStub() - val list = listOf( - TestData( - test = test, - device = device.toDeviceInfo(), - status = TestStatus.PASSED, - duration = 1_000, - whenWasSent = instant.minus(1, ChronoUnit.MINUTES) - ), - TestData( - test = test, - device = device.toDeviceInfo(), - status = TestStatus.PASSED, - duration = 2_000, - whenWasSent = instant.minus(10, ChronoUnit.MINUTES) - ), - TestData( - test = test, - device = device.toDeviceInfo(), - status = TestStatus.PASSED, - duration = 3_000, - whenWasSent = instant.minus(20, ChronoUnit.MINUTES) - ), - TestData( - test = test, - device = device.toDeviceInfo(), - status = TestStatus.PASSED, - duration = 4_000, - whenWasSent = instant.minus(30, ChronoUnit.MINUTES) - ), - TestData( - test = test, - device = device.toDeviceInfo(), - status = TestStatus.PASSED, - duration = 5_000, - whenWasSent = instant.minus(40, ChronoUnit.MINUTES) - ), - TestData( - test = test, - device = device.toDeviceInfo(), - status = TestStatus.FAILURE, - duration = 6_000, - whenWasSent = instant.minus(60, ChronoUnit.MINUTES) - ), - TestData( - test = test, - device = device.toDeviceInfo(), - status = TestStatus.FAILURE, - duration = 7_000, - whenWasSent = instant.minus(70, ChronoUnit.MINUTES) - ), - TestData( - test = test, - device = device.toDeviceInfo(), - status = TestStatus.FAILURE, - duration = 8_000, - whenWasSent = instant.minus(80, ChronoUnit.MINUTES) - ), - TestData( - test = test, - device = device.toDeviceInfo(), - status = TestStatus.FAILURE, - duration = 9_000, - whenWasSent = instant.minus(90, ChronoUnit.MINUTES) - ), - TestData( - test = test, - device = device.toDeviceInfo(), - status = TestStatus.FAILURE, - duration = 10_000, - whenWasSent = instant.minus(100, ChronoUnit.MINUTES) - ) - ) - list.forEach { - sendData(it, influxDb, database, rpName) - } - influxDb.flush() -} - -fun sendData( - item: TestData, - influxDB: InfluxDB, - database: String, - rpName: String -) { - influxDB.write(database, rpName, - Point.measurement("tests") - .time(item.whenWasSent.toEpochMilli(), TimeUnit.MILLISECONDS) - .tag("testname", item.test.toSafeTestName()) - .tag("package", item.test.pkg) - .tag("class", item.test.clazz) - .tag("method", item.test.method) - .tag("deviceSerial", item.device.serialNumber) - .addField("ignored", if (item.isIgnored) 1.0 else 0.0) - .addField("success", if (item.status == TestStatus.PASSED) 1.0 else 0.0) - .addField("duration", item.duration) - .build() - ) -} diff --git a/core/src/integrationTest/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/KInfluxDBContainer.kt b/core/src/integrationTest/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/KInfluxDBContainer.kt deleted file mode 100644 index 8aa1b9c27..000000000 --- a/core/src/integrationTest/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/KInfluxDBContainer.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.malinskiy.marathon.analytics.metrics.remote.influx - -import org.testcontainers.containers.InfluxDBContainer - -class KInfluxDBContainer : InfluxDBContainer() diff --git a/core/src/integrationTest/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/TestData.kt b/core/src/integrationTest/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/TestData.kt deleted file mode 100644 index f390f8157..000000000 --- a/core/src/integrationTest/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/TestData.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.malinskiy.marathon.analytics.metrics.remote.influx - -import com.malinskiy.marathon.device.DeviceInfo -import com.malinskiy.marathon.execution.TestStatus -import com.malinskiy.marathon.test.Test -import java.time.Instant - -data class TestData( - val test: Test, - val device: DeviceInfo, - val status: TestStatus, - val duration: Long, - val whenWasSent: Instant -) { - val isIgnored - get() = when (status) { - TestStatus.IGNORED, TestStatus.ASSUMPTION_FAILURE -> true - else -> false - } - -} diff --git a/core/src/main/kotlin/com/malinskiy/marathon/Marathon.kt b/core/src/main/kotlin/com/malinskiy/marathon/Marathon.kt index 3aa42903b..c267314d9 100644 --- a/core/src/main/kotlin/com/malinskiy/marathon/Marathon.kt +++ b/core/src/main/kotlin/com/malinskiy/marathon/Marathon.kt @@ -25,9 +25,6 @@ import com.malinskiy.marathon.report.logs.LogsProvider import com.malinskiy.marathon.test.Test import com.malinskiy.marathon.test.toTestName import com.malinskiy.marathon.time.Timer -import com.malinskiy.marathon.usageanalytics.TrackActionType -import com.malinskiy.marathon.usageanalytics.UsageAnalytics -import com.malinskiy.marathon.usageanalytics.tracker.Event import com.malinskiy.marathon.vendor.VendorConfiguration import kotlinx.coroutines.runBlocking import org.koin.core.context.stopKoin @@ -124,7 +121,6 @@ class Marathon( override suspend fun start() { configureLogging(configuration.vendorConfiguration) - trackAnalytics(configuration) testParser = loadTestParser(configuration.vendorConfiguration) deviceProvider = loadDeviceProvider(configuration.vendorConfiguration) @@ -228,16 +224,4 @@ class Marathon( val flakinessShard = flakinessStrategy.process(shard, analytics) return strictRunProcessor.processShard(flakinessShard) } - - private fun trackAnalytics(configuration: Configuration) { - UsageAnalytics.USAGE_TRACKER.run { - trackEvent(Event(TrackActionType.VendorConfiguration, configuration.vendorConfiguration.javaClass.name)) - trackEvent(Event(TrackActionType.PoolingStrategy, configuration.poolingStrategy.javaClass.name)) - trackEvent(Event(TrackActionType.ShardingStrategy, configuration.shardingStrategy.javaClass.name)) - trackEvent(Event(TrackActionType.SortingStrategy, configuration.sortingStrategy.javaClass.name)) - trackEvent(Event(TrackActionType.RetryStrategy, configuration.retryStrategy.javaClass.name)) - trackEvent(Event(TrackActionType.BatchingStrategy, configuration.batchingStrategy.javaClass.name)) - trackEvent(Event(TrackActionType.FlakinessStrategy, configuration.flakinessStrategy.javaClass.name)) - } - } } diff --git a/core/src/main/kotlin/com/malinskiy/marathon/analytics/TrackerFactory.kt b/core/src/main/kotlin/com/malinskiy/marathon/analytics/TrackerFactory.kt index e34f2ca71..c5bc4c0d4 100644 --- a/core/src/main/kotlin/com/malinskiy/marathon/analytics/TrackerFactory.kt +++ b/core/src/main/kotlin/com/malinskiy/marathon/analytics/TrackerFactory.kt @@ -1,14 +1,11 @@ package com.malinskiy.marathon.analytics import com.google.gson.Gson -import com.malinskiy.marathon.analytics.external.influx.InfluxDbProvider -import com.malinskiy.marathon.analytics.external.influx.InfluxDbTracker import com.malinskiy.marathon.analytics.internal.pub.Track import com.malinskiy.marathon.analytics.internal.sub.DelegatingTrackerInternal import com.malinskiy.marathon.analytics.internal.sub.ExecutionReportGenerator import com.malinskiy.marathon.analytics.internal.sub.TrackerInternal import com.malinskiy.marathon.cache.test.CacheTestResultsTracker -import com.malinskiy.marathon.execution.AnalyticsConfiguration.InfluxDbConfiguration import com.malinskiy.marathon.execution.Configuration import com.malinskiy.marathon.io.AttachmentManager import com.malinskiy.marathon.io.FileManager @@ -22,8 +19,8 @@ import com.malinskiy.marathon.report.junit.FinalJUnitReporter import com.malinskiy.marathon.report.junit.JUnitReporter import com.malinskiy.marathon.report.junit.JUnitWriter import com.malinskiy.marathon.report.listener.ListenerReporter -import com.malinskiy.marathon.report.logs.LogsProvider import com.malinskiy.marathon.report.logs.LogReportTestEventInflator +import com.malinskiy.marathon.report.logs.LogsProvider import com.malinskiy.marathon.report.raw.RawJsonReporter import com.malinskiy.marathon.report.stdout.StdoutReporter import com.malinskiy.marathon.report.summary.TestSummaryFormatter @@ -50,12 +47,6 @@ internal class TrackerFactory( fun create(): TrackerInternal { val defaultTrackers = mutableListOf(createExecutionReportGenerator()) - if (configuration.analyticsConfiguration is InfluxDbConfiguration) { - val config = configuration.analyticsConfiguration - val influxDbTracker = createInfluxDbTracker(config) - influxDbTracker?.let { defaultTrackers.add(it) } - } - val delegatingTrackerInternal = DelegatingTrackerInternal(defaultTrackers) val mappingTracker = MappingTracker(delegatingTrackerInternal) @@ -66,16 +57,6 @@ internal class TrackerFactory( return delegatingTrackerInternal } - private fun createInfluxDbTracker(config: InfluxDbConfiguration): InfluxDbTracker? { - val db = try { - InfluxDbProvider(config).createDb() - } catch (e: Exception) { - log.warn(e) { "Failed to reach InfluxDB at ${config.url}" } - null - } - return db?.let { InfluxDbTracker(it, config.dbName, config.retentionPolicyConfiguration.name) } - } - private fun createExecutionReportGenerator(): ExecutionReportGenerator { val testResultDescriptionFactory = TestSummaryFormatter() val testEventInflators = { diff --git a/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/AnalyticsFactory.kt b/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/AnalyticsFactory.kt index 97a022dda..5ae95e2f6 100644 --- a/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/AnalyticsFactory.kt +++ b/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/AnalyticsFactory.kt @@ -1,10 +1,8 @@ package com.malinskiy.marathon.analytics.external -import com.malinskiy.marathon.execution.Configuration +class AnalyticsFactory { -class AnalyticsFactory(configuration: Configuration) { - - private val metricsFactory = MetricsProviderFactory(configuration) + private val metricsFactory = MetricsProviderFactory() fun create(): Analytics = Analytics(metricsFactory.create()) } diff --git a/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/MetricsProviderFactory.kt b/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/MetricsProviderFactory.kt index d5b5f4646..749f98f83 100644 --- a/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/MetricsProviderFactory.kt +++ b/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/MetricsProviderFactory.kt @@ -1,17 +1,5 @@ package com.malinskiy.marathon.analytics.external -import com.malinskiy.marathon.analytics.external.influx.InfluxMetricsProvider -import com.malinskiy.marathon.execution.AnalyticsConfiguration -import com.malinskiy.marathon.execution.Configuration - -internal class MetricsProviderFactory(configuration: Configuration) { - private val configuration = configuration.analyticsConfiguration - - fun create(): MetricsProvider { - return if (configuration is AnalyticsConfiguration.InfluxDbConfiguration) { - InfluxMetricsProvider.createWithFallback(configuration, NoOpMetricsProvider()) - } else { - NoOpMetricsProvider() - } - } +internal class MetricsProviderFactory { + fun create(): MetricsProvider = NoOpMetricsProvider() } diff --git a/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/influx/InfluxDbProvider.kt b/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/influx/InfluxDbProvider.kt deleted file mode 100644 index 87492860f..000000000 --- a/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/influx/InfluxDbProvider.kt +++ /dev/null @@ -1,49 +0,0 @@ -package com.malinskiy.marathon.analytics.external.influx - -import com.malinskiy.marathon.execution.AnalyticsConfiguration -import okhttp3.OkHttpClient -import org.influxdb.InfluxDB -import org.influxdb.InfluxDBFactory -import java.util.concurrent.TimeUnit - -const val TIMEOUT_SEC = 60L - -class InfluxDbProvider(configuration: AnalyticsConfiguration.InfluxDbConfiguration) { - - private val url = configuration.url - private val user = configuration.user - private val password = configuration.password - private val dbName = configuration.dbName - private val retentionPolicyConfiguration = configuration.retentionPolicyConfiguration - - fun createDb(): InfluxDB { - val okHttpBuilder = OkHttpClient.Builder() - .connectTimeout(TIMEOUT_SEC, TimeUnit.SECONDS) - .readTimeout(TIMEOUT_SEC, TimeUnit.SECONDS) - .writeTimeout(TIMEOUT_SEC, TimeUnit.SECONDS) - - val influxDb = if (user.isNotEmpty() && password.isNotEmpty()) { - InfluxDBFactory.connect(url, user, password, okHttpBuilder) - } else { - InfluxDBFactory.connect(url, okHttpBuilder) - } - influxDb.setLogLevel(InfluxDB.LogLevel.BASIC) - - val rpName = retentionPolicyConfiguration.name - if (!influxDb.databaseExists(dbName)) { - influxDb.createDatabase(dbName) - - val duration = retentionPolicyConfiguration.duration - val shardDuration = retentionPolicyConfiguration.shardDuration - val replicationFactor = retentionPolicyConfiguration.replicationFactor - val isDefault = retentionPolicyConfiguration.isDefault - - influxDb.createRetentionPolicy(rpName, dbName, duration, shardDuration, replicationFactor, isDefault) - } - - influxDb.setDatabase(dbName) - influxDb.setRetentionPolicy(rpName) - influxDb.enableBatch() - return influxDb - } -} diff --git a/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/influx/InfluxDbTracker.kt b/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/influx/InfluxDbTracker.kt deleted file mode 100644 index 1a8ca0cd2..000000000 --- a/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/influx/InfluxDbTracker.kt +++ /dev/null @@ -1,41 +0,0 @@ -package com.malinskiy.marathon.analytics.external.influx - -import com.malinskiy.marathon.analytics.internal.sub.TestEvent -import com.malinskiy.marathon.analytics.internal.sub.TrackerInternalAdapter -import com.malinskiy.marathon.execution.TestStatus -import com.malinskiy.marathon.test.toSafeTestName -import org.influxdb.InfluxDB -import org.influxdb.dto.Point -import java.util.concurrent.TimeUnit - -internal class InfluxDbTracker(private val influxDb: InfluxDB, - private val dbName: String, - private val rpName: String) : TrackerInternalAdapter() { - - override fun trackTest(event: TestEvent) { - //Report only success and failure - if (event.testResult.status in arrayOf(TestStatus.FAILURE, TestStatus.PASSED)) { - - val testResult = event.testResult - val device = event.device - - influxDb.write(dbName, rpName, - Point.measurement("tests") - .time(System.currentTimeMillis(), TimeUnit.MILLISECONDS) - .tag("testname", testResult.test.toSafeTestName()) - .tag("package", testResult.test.pkg) - .tag("class", testResult.test.clazz) - .tag("method", testResult.test.method) - .tag("deviceSerial", device.serialNumber) - .addField("ignored", if (testResult.isIgnored) 1.0 else 0.0) - .addField("success", if (testResult.status == TestStatus.PASSED) 1.0 else 0.0) - .addField("duration", testResult.durationMillis()) - .build() - ) - } - } - - override fun close() { - influxDb.close() - } -} \ No newline at end of file diff --git a/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/influx/InfluxMetricsProvider.kt b/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/influx/InfluxMetricsProvider.kt deleted file mode 100644 index f68265e10..000000000 --- a/core/src/main/kotlin/com/malinskiy/marathon/analytics/external/influx/InfluxMetricsProvider.kt +++ /dev/null @@ -1,110 +0,0 @@ -package com.malinskiy.marathon.analytics.external.influx - -import com.malinskiy.marathon.analytics.external.MetricsProvider -import com.malinskiy.marathon.analytics.metrics.remote.RemoteDataSource -import com.malinskiy.marathon.analytics.metrics.remote.influx.InfluxDBDataSource -import com.malinskiy.marathon.execution.AnalyticsConfiguration -import com.malinskiy.marathon.execution.withRetry -import com.malinskiy.marathon.log.MarathonLogging -import com.malinskiy.marathon.test.Test -import com.malinskiy.marathon.test.toSafeTestName -import kotlinx.coroutines.runBlocking -import java.time.Instant - -private data class MeasurementKey(val key: Double = Double.NaN, val limit: Instant) - -private class MeasurementValues(private val values: Map) { - fun get(testName: String): Double? { - return values[testName] - } -} - -private const val RETRY_DELAY: Long = 50L - - -class InfluxMetricsProvider(private val remoteDataStore: RemoteDataSource) : MetricsProvider { - - private val logger = MarathonLogging.logger(InfluxMetricsProvider::class.java.simpleName) - - private val successRateMeasurements = mutableMapOf() - private val executionTimeMeasurements = mutableMapOf() - - private fun emptyMeasurementValues() = MeasurementValues(emptyMap()) - - override fun successRate(test: Test, limit: Instant): Double { - val key = MeasurementKey(limit = limit) - - if (!successRateMeasurements.containsKey(key)) { - successRateMeasurements[key] = runCatching { - fetchSuccessRateData(limit) - }.onFailure { - logger.warn { "Cannot fetch success rate from database" } - }.fold({ list -> - MeasurementValues(list.associateBy({ it.testName }, { it.mean })) - }, { - emptyMeasurementValues() - }) - } - - val testName = test.toSafeTestName() - return successRateMeasurements[key]?.get(testName) ?: { - logger.warn { "No success rate found for $testName. Using 0 i.e. fails all the time" } - 0.0 - }() - } - - private fun fetchSuccessRateData(limit: Instant) = runBlocking { - withRetry(3, RETRY_DELAY) { - remoteDataStore.requestAllSuccessRates(limit) - } - } - - - override fun executionTime( - test: Test, - percentile: Double, - limit: Instant - ): Double { - val key = MeasurementKey(percentile, limit) - if (!executionTimeMeasurements.containsKey(key)) { - executionTimeMeasurements[key] = runCatching { - fetchExecutionTime(percentile, limit) - }.onFailure { - logger.warn { "Cannot fetch execution time from database" } - }.fold({ list -> - logger.warn { list } - MeasurementValues(list.associateBy({ it.testName }, { it.percentile })) - }, { - emptyMeasurementValues() - }) - } - val testName = test.toSafeTestName() - return executionTimeMeasurements[key]?.get(testName) ?: { - logger.warn { "No execution time found for $testName. Using 300_000 seconds i.e. long test" } - 300_000.0 - }() - } - - private fun fetchExecutionTime(percentile: Double, limit: Instant) = runBlocking { - withRetry(3, RETRY_DELAY) { - remoteDataStore.requestAllExecutionTimes(percentile, limit) - } - } - - override fun close() { - remoteDataStore.close() - } - - companion object { - fun createWithFallback(configuration: AnalyticsConfiguration.InfluxDbConfiguration, fallback: MetricsProvider): MetricsProvider { - return try { - val db = InfluxDbProvider(configuration).createDb() - val dataSource = InfluxDBDataSource(db, configuration.dbName, configuration.retentionPolicyConfiguration.name) - InfluxMetricsProvider(dataSource) - } catch (e: Exception) { - fallback - } - } - } -} - diff --git a/core/src/main/kotlin/com/malinskiy/marathon/analytics/metrics/remote/RemoteDataSource.kt b/core/src/main/kotlin/com/malinskiy/marathon/analytics/metrics/remote/RemoteDataSource.kt deleted file mode 100644 index e75262ade..000000000 --- a/core/src/main/kotlin/com/malinskiy/marathon/analytics/metrics/remote/RemoteDataSource.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.malinskiy.marathon.analytics.metrics.remote - -import java.time.Instant - -data class ExecutionTime( - val testName: String, - var percentile: Double -) - -data class SuccessRate( - val testName: String, - val mean: Double -) - -interface RemoteDataSource { - fun requestAllSuccessRates(limit: Instant): List - fun requestAllExecutionTimes(percentile: Double, limit: Instant): List - fun close() -} \ No newline at end of file diff --git a/core/src/main/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxDBDataSource.kt b/core/src/main/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxDBDataSource.kt deleted file mode 100644 index 856ba6204..000000000 --- a/core/src/main/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxDBDataSource.kt +++ /dev/null @@ -1,77 +0,0 @@ -package com.malinskiy.marathon.analytics.metrics.remote.influx - -import com.malinskiy.marathon.analytics.metrics.remote.ExecutionTime -import com.malinskiy.marathon.analytics.metrics.remote.RemoteDataSource -import com.malinskiy.marathon.analytics.metrics.remote.SuccessRate -import org.influxdb.InfluxDB -import org.influxdb.annotation.Column -import org.influxdb.annotation.Measurement -import org.influxdb.dto.Query -import org.influxdb.impl.InfluxDBResultMapper -import java.time.Instant - - -class InfluxDBDataSource( - private val influxDb: InfluxDB, - private val dbName: String, - private val retentionPolicy: String -) : RemoteDataSource { - - @Measurement(name = "tests") - class InfluxExecutionTime( - @Column(name = "testname", tag = true) var testName: String? = null, - @Column(name = "percentile") var percentile: Double? = null - ) - - @Measurement(name = "tests") - class InfluxSuccessRate( - @Column(name = "testname", tag = true) var testName: String? = null, - @Column(name = "mean") var mean: Double? = null - ) - - - private val mapper = InfluxDBResultMapper() - - override fun requestAllSuccessRates(limit: Instant): List { - val query = Query( - """ - SELECT MEAN("success") - FROM "$retentionPolicy"."tests" - WHERE time >= '$limit' - GROUP BY "testname" - """.trimIndent(), dbName - ) - val results = influxDb.query(query) - - return mapper.toPOJO(results, InfluxSuccessRate::class.java).filter { - it.testName != null && it.mean != null - }.map { - SuccessRate(it.testName!!, it.mean!!) - } - } - - override fun requestAllExecutionTimes( - percentile: Double, - limit: Instant - ): List { - val results = influxDb.query( - Query( - """ - SELECT PERCENTILE("duration",$percentile) - FROM "$retentionPolicy"."tests" - WHERE time >= '$limit' - GROUP BY "testname" - """.trimIndent(), dbName - ) - ) - return mapper.toPOJO(results, InfluxExecutionTime::class.java).filter { - it.testName != null && it.percentile != null - }.map { - ExecutionTime(it.testName!!, it.percentile!!) - } - } - - override fun close() { - influxDb.close() - } -} \ No newline at end of file diff --git a/core/src/main/kotlin/com/malinskiy/marathon/config/AppType.kt b/core/src/main/kotlin/com/malinskiy/marathon/config/AppType.kt deleted file mode 100644 index d6a71563c..000000000 --- a/core/src/main/kotlin/com/malinskiy/marathon/config/AppType.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.malinskiy.marathon.config - -enum class AppType(val value: String) { - CLI("cli"), - GRADLE_PLUGIN("gradle-plugin") -} \ No newline at end of file diff --git a/core/src/main/kotlin/com/malinskiy/marathon/di/Modules.kt b/core/src/main/kotlin/com/malinskiy/marathon/di/Modules.kt index 072ded598..afa04eb2a 100644 --- a/core/src/main/kotlin/com/malinskiy/marathon/di/Modules.kt +++ b/core/src/main/kotlin/com/malinskiy/marathon/di/Modules.kt @@ -39,7 +39,7 @@ import java.time.Clock val analyticsModule = module { single { Track() } single { TrackerFactory(get(), get(), get(), get(), get(), get(), get(), get()).create() } - single { AnalyticsFactory(get()).create() } + single { AnalyticsFactory().create() } } val cacheModule = module { diff --git a/core/src/main/kotlin/com/malinskiy/marathon/exceptions/BugsnagExceptionsReporter.kt b/core/src/main/kotlin/com/malinskiy/marathon/exceptions/BugsnagExceptionsReporter.kt deleted file mode 100644 index fa8067ced..000000000 --- a/core/src/main/kotlin/com/malinskiy/marathon/exceptions/BugsnagExceptionsReporter.kt +++ /dev/null @@ -1,29 +0,0 @@ -package com.malinskiy.marathon.exceptions - -import com.bugsnag.Bugsnag -import com.malinskiy.marathon.config.AppType -import com.malinskiy.marathon.core.BuildConfig -import java.util.* - -class BugsnagExceptionsReporter : ExceptionsReporter { - private val bugsnag: Bugsnag? by lazy { - val bugsnagToken = BuildConfig.BUGSNAG_TOKEN - if (bugsnagToken.isNullOrEmpty()) { - null - } else { - val bytes = Base64.getDecoder().decode(bugsnagToken) - Bugsnag(String(bytes)) - } - } - - override fun start(appType: AppType) { - bugsnag?.apply { - setAppType(appType.value) - setAppVersion(BuildConfig.VERSION) - } - } - - override fun end() { - bugsnag?.close() - } -} diff --git a/core/src/main/kotlin/com/malinskiy/marathon/exceptions/ExceptionsReporter.kt b/core/src/main/kotlin/com/malinskiy/marathon/exceptions/ExceptionsReporter.kt deleted file mode 100644 index 2d7de4573..000000000 --- a/core/src/main/kotlin/com/malinskiy/marathon/exceptions/ExceptionsReporter.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.malinskiy.marathon.exceptions - -import com.malinskiy.marathon.config.AppType - -interface ExceptionsReporter { - fun start(appType: AppType) - fun end() -} diff --git a/core/src/main/kotlin/com/malinskiy/marathon/execution/AnalyticsConfiguration.kt b/core/src/main/kotlin/com/malinskiy/marathon/execution/AnalyticsConfiguration.kt deleted file mode 100644 index 195fcb9e6..000000000 --- a/core/src/main/kotlin/com/malinskiy/marathon/execution/AnalyticsConfiguration.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.malinskiy.marathon.execution - -sealed class AnalyticsConfiguration { - object DisabledAnalytics : AnalyticsConfiguration() - data class InfluxDbConfiguration( - val url: String, - val user: String, - val password: String, - val dbName: String, - val retentionPolicyConfiguration: RetentionPolicyConfiguration - ) : AnalyticsConfiguration() { - data class RetentionPolicyConfiguration( - val name: String, - val duration: String, - val shardDuration: String, - val replicationFactor: Int, - val isDefault: Boolean - ) { - companion object { - val default: RetentionPolicyConfiguration = RetentionPolicyConfiguration("rpMarathon", "30d", "30m", 2, true) - } - } - } -} diff --git a/core/src/main/kotlin/com/malinskiy/marathon/execution/Configuration.kt b/core/src/main/kotlin/com/malinskiy/marathon/execution/Configuration.kt index c56c6d397..85f4af172 100644 --- a/core/src/main/kotlin/com/malinskiy/marathon/execution/Configuration.kt +++ b/core/src/main/kotlin/com/malinskiy/marathon/execution/Configuration.kt @@ -25,7 +25,6 @@ data class Configuration constructor( val outputDir: File, val customAnalyticsTracker: Tracker?, - val analyticsConfiguration: AnalyticsConfiguration, val poolingStrategy: PoolingStrategy, val shardingStrategy: ShardingStrategy, val sortingStrategy: SortingStrategy, @@ -54,16 +53,13 @@ data class Configuration constructor( val noDevicesTimeoutMillis: Long, val debug: Boolean, - val vendorConfiguration: VendorConfiguration, - - val analyticsTracking: Boolean + val vendorConfiguration: VendorConfiguration ) { constructor( name: String, outputDir: File, - analyticsConfiguration: AnalyticsConfiguration?, customAnalyticsTracker: Tracker?, poolingStrategy: PoolingStrategy?, shardingStrategy: ShardingStrategy?, @@ -93,16 +89,13 @@ data class Configuration constructor( noDevicesTimeoutMillis: Long?, debug: Boolean?, - vendorConfiguration: VendorConfiguration, - - analyticsTracking: Boolean? + vendorConfiguration: VendorConfiguration ) : this( name = name, outputDir = outputDir, customAnalyticsTracker = customAnalyticsTracker, - analyticsConfiguration = analyticsConfiguration ?: AnalyticsConfiguration.DisabledAnalytics, poolingStrategy = poolingStrategy ?: OmniPoolingStrategy(), shardingStrategy = shardingStrategy ?: ParallelShardingStrategy(), sortingStrategy = sortingStrategy ?: NoSortingStrategy(), @@ -127,15 +120,13 @@ data class Configuration constructor( testOutputTimeoutMillis = testOutputTimeoutMillis ?: DEFAULT_OUTPUT_TIMEOUT_MILLIS, noDevicesTimeoutMillis = noDevicesTimeoutMillis ?: DEFAULT_NO_DEVICES_TIMEOUT_MILLIS, debug = debug ?: true, - vendorConfiguration = vendorConfiguration, - analyticsTracking = analyticsTracking ?: false + vendorConfiguration = vendorConfiguration ) fun toMap() = mapOf( "name" to name, "outputDir" to outputDir.absolutePath, - "analyticsConfiguration" to analyticsConfiguration.toString(), "pooling" to poolingStrategy.toString(), "sharding" to shardingStrategy.toString(), "sorting" to sortingStrategy.toString(), @@ -156,7 +147,6 @@ data class Configuration constructor( "testOutputTimeoutMillis" to testOutputTimeoutMillis.toString(), "noDevicesTimeoutMillis" to noDevicesTimeoutMillis.toString(), "debug" to debug.toString(), - "vendorConfiguration" to vendorConfiguration.toString(), - "analyticsTracking" to analyticsTracking.toString() + "vendorConfiguration" to vendorConfiguration.toString() ) } diff --git a/core/src/test/kotlin/com/malinskiy/marathon/analytics/metrics/MetricsProviderFactoryTest.kt b/core/src/test/kotlin/com/malinskiy/marathon/analytics/metrics/MetricsProviderFactoryTest.kt index 54a51018b..cf17bed56 100644 --- a/core/src/test/kotlin/com/malinskiy/marathon/analytics/metrics/MetricsProviderFactoryTest.kt +++ b/core/src/test/kotlin/com/malinskiy/marathon/analytics/metrics/MetricsProviderFactoryTest.kt @@ -2,8 +2,6 @@ package com.malinskiy.marathon.analytics.metrics import com.malinskiy.marathon.analytics.external.MetricsProviderFactory import com.malinskiy.marathon.analytics.external.NoOpMetricsProvider -import com.malinskiy.marathon.execution.AnalyticsConfiguration -import com.malinskiy.marathon.test.factory.configuration import org.amshove.kluent.shouldBeInstanceOf import org.junit.jupiter.api.Test @@ -11,27 +9,7 @@ class MetricsProviderFactoryTest { @Test fun shouldReturnNoopProviderWhenDisabled() { - val configuration = configuration { - analyticsConfiguration = AnalyticsConfiguration.DisabledAnalytics - } - val factory = MetricsProviderFactory(configuration) - val metricsProvider = factory.create() - metricsProvider shouldBeInstanceOf NoOpMetricsProvider::class - } - - @Test - fun shouldReturnNoopProviderWhenConfigurationIsInvalid() { - val analyticsConfiguration = AnalyticsConfiguration.InfluxDbConfiguration( - "host", - "user", - "password", - "db", - AnalyticsConfiguration.InfluxDbConfiguration.RetentionPolicyConfiguration.default - ) - val configuration = configuration { - this.analyticsConfiguration = analyticsConfiguration - } - val factory = MetricsProviderFactory(configuration) + val factory = MetricsProviderFactory() val metricsProvider = factory.create() metricsProvider shouldBeInstanceOf NoOpMetricsProvider::class } diff --git a/core/src/test/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxDBDataSourceTest.kt b/core/src/test/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxDBDataSourceTest.kt deleted file mode 100644 index bce5d5b7c..000000000 --- a/core/src/test/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxDBDataSourceTest.kt +++ /dev/null @@ -1,160 +0,0 @@ -package com.malinskiy.marathon.analytics.metrics.remote.influx - -import org.amshove.kluent.shouldBeEqualTo -import org.influxdb.InfluxDB -import org.influxdb.dto.Query -import org.influxdb.dto.QueryResult -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.dsl.it -import org.mockito.kotlin.any -import org.mockito.kotlin.eq -import org.mockito.kotlin.mock -import org.mockito.kotlin.whenever -import java.time.Instant - -class InfluxDBDataSourceSpec : Spek( - { - describe("InfluxMetricsProvider") { - it("should return actual value of success rate") { - val influxDb = mock() - val provider = InfluxDBDataSource(influxDb, "test", "rpMarathon") - - val queryResult = QueryResult().apply { - results = listOf( - QueryResult.Result().apply { - series = listOf( - QueryResult.Series().apply { - name = "tests" - columns = listOf("time", "mean") - tags = - mapOf("testname" to "com.example.SingleTest.method") - values = listOf( - listOf("2019-08-24T08:25:09.219Z", 0.5) - ) - } - ) - } - ) - } - whenever(influxDb.query(any())).thenReturn(queryResult) - - val rate = provider.requestAllSuccessRates(Instant.now()) - - rate.size shouldBeEqualTo 1 - rate[0].mean shouldBeEqualTo 0.5 - rate[0].testName shouldBeEqualTo "com.example.SingleTest.method" - } - - it("should return actual value of execution time") { - val influxDb = mock() - val provider = InfluxDBDataSource(influxDb, "test", "rpMarathon") - - val queryResult = QueryResult().apply { - results = listOf( - QueryResult.Result().apply { - series = listOf( - QueryResult.Series().apply { - name = "tests" - columns = listOf("time", "percentile") - tags = - mapOf("testname" to "com.example.SingleTest.method") - values = listOf( - listOf("2019-08-24T08:25:09.219Z", 5000.0) - ) - } - ) - } - ) - } - whenever(influxDb.query(any())).thenReturn(queryResult) - - val rate = provider.requestAllExecutionTimes(99.0, Instant.now()) - - rate.size shouldBeEqualTo 1 - rate[0].testName shouldBeEqualTo "com.example.SingleTest.method" - rate[0].percentile shouldBeEqualTo 5000.0 - } - } - - describe("InfluxMetricsProvider with non default retention policy") { - it("should return actual value of success rate") { - val influxDb = mock() - val provider = InfluxDBDataSource(influxDb, "test", "blah") - - val queryResult = QueryResult().apply { - results = listOf( - QueryResult.Result().apply { - series = listOf( - QueryResult.Series().apply { - name = "tests" - columns = listOf("time", "mean") - tags = - mapOf("testname" to "com.example.SingleTest.method") - values = listOf( - listOf("2019-08-24T08:25:09.219Z", 0.5) - ) - } - ) - } - ) - } - - val query = Query( - """ - SELECT MEAN("success") - FROM "blah"."tests" - WHERE time >= '2019-08-24T08:25:09.219Z' - GROUP BY "testname" - """.trimIndent(), "test" - ) - - whenever(influxDb.query(eq(query))).thenReturn(queryResult) - - val rate = provider.requestAllSuccessRates(Instant.parse("2019-08-24T08:25:09.219Z")) - - rate.size shouldBeEqualTo 1 - rate[0].mean shouldBeEqualTo 0.5 - rate[0].testName shouldBeEqualTo "com.example.SingleTest.method" - } - - it("should return actual value of execution time") { - val influxDb = mock() - val provider = InfluxDBDataSource(influxDb, "test", "blah") - - val queryResult = QueryResult().apply { - results = listOf( - QueryResult.Result().apply { - series = listOf( - QueryResult.Series().apply { - name = "tests" - columns = listOf("time", "percentile") - tags = - mapOf("testname" to "com.example.SingleTest.method") - values = listOf( - listOf("2019-08-24T08:25:09.219Z", 5000.0) - ) - } - ) - } - ) - } - - val query = Query( - """ - SELECT PERCENTILE("duration",99.0) - FROM "blah"."tests" - WHERE time >= '2019-08-24T08:25:09.219Z' - GROUP BY "testname" - """.trimIndent(), "test" - ) - whenever(influxDb.query(eq(query))).thenReturn(queryResult) - - val rate = provider.requestAllExecutionTimes(99.0, Instant.parse("2019-08-24T08:25:09.219Z")) - - rate.size shouldBeEqualTo 1 - rate[0].testName shouldBeEqualTo "com.example.SingleTest.method" - rate[0].percentile shouldBeEqualTo 5000.0 - } - } - }) diff --git a/core/src/test/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxMetricsProviderSpek.kt b/core/src/test/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxMetricsProviderSpek.kt deleted file mode 100644 index f47f4d708..000000000 --- a/core/src/test/kotlin/com/malinskiy/marathon/analytics/metrics/remote/influx/InfluxMetricsProviderSpek.kt +++ /dev/null @@ -1,110 +0,0 @@ -package com.malinskiy.marathon.analytics.metrics.remote.influx - -import com.malinskiy.marathon.analytics.external.influx.InfluxMetricsProvider -import com.malinskiy.marathon.analytics.metrics.remote.ExecutionTime -import com.malinskiy.marathon.analytics.metrics.remote.RemoteDataSource -import com.malinskiy.marathon.analytics.metrics.remote.SuccessRate -import com.malinskiy.marathon.generateTest -import com.malinskiy.marathon.test.toSafeTestName -import org.amshove.kluent.mock -import org.amshove.kluent.shouldBeEqualTo -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.it -import org.mockito.kotlin.eq -import org.mockito.kotlin.verify -import org.mockito.kotlin.verifyNoMoreInteractions -import org.mockito.kotlin.whenever -import java.time.Instant - -class InfluxMetricsProviderSpek : Spek( - { - group("Execution time") { - it("Return from cache if present with the same params") { - val dataStore = mock() - val provider = InfluxMetricsProvider(dataStore) - val test = generateTest() - val requestPercentile = 90.0 - val resultTime = 100.5 - val limit = Instant.now() - val list = - listOf(ExecutionTime(test.toSafeTestName(), resultTime), ExecutionTime("test", 80.0)) - whenever( - dataStore.requestAllExecutionTimes( - eq(requestPercentile), - eq(limit) - ) - ).thenReturn(list) - provider.executionTime(test, requestPercentile, limit) shouldBeEqualTo resultTime - verify(dataStore).requestAllExecutionTimes(eq(requestPercentile), eq(limit)) - verifyNoMoreInteractions(dataStore) - provider.executionTime(test, requestPercentile, limit) shouldBeEqualTo resultTime - } - it("Call again if missing in cache because of new params") { - val dataStore = mock() - val provider = InfluxMetricsProvider(dataStore) - val test = generateTest() - val firstPercent = 80.0 - val firstTime = 900.0 - val firstLimit = Instant.now().minusSeconds(60) - val firstList = - listOf(ExecutionTime(test.toSafeTestName(), firstTime), ExecutionTime("test", 80.0)) - whenever( - dataStore.requestAllExecutionTimes( - eq(firstPercent), - eq(firstLimit) - ) - ).thenReturn(firstList) - provider.executionTime(test, firstPercent, firstLimit) shouldBeEqualTo firstTime - verify(dataStore).requestAllExecutionTimes(eq(firstPercent), eq(firstLimit)) - - val secondLimit = Instant.now() - val secondPercent = 90.0 - val secondTime = 1500.0 - val secondList = - listOf(ExecutionTime(test.toSafeTestName(), secondTime), ExecutionTime("test", 90.0)) - whenever( - dataStore.requestAllExecutionTimes( - eq(secondPercent), - eq(secondLimit) - ) - ).thenReturn(secondList) - provider.executionTime(test, secondPercent, secondLimit) shouldBeEqualTo secondTime - verify(dataStore).requestAllExecutionTimes(eq(secondPercent), eq(secondLimit)) - } - } - group("Success rate") { - it("Return from cache if present with the same params") { - val dataStore = mock() - val provider = InfluxMetricsProvider(dataStore) - val test = generateTest() - val mean = 90.0 - val limit = Instant.now() - val list = listOf(SuccessRate(test.toSafeTestName(), mean), SuccessRate("test", 80.0)) - whenever(dataStore.requestAllSuccessRates(limit)).thenReturn(list) - provider.successRate(test, limit) shouldBeEqualTo mean - verify(dataStore).requestAllSuccessRates(eq(limit)) - verifyNoMoreInteractions(dataStore) - provider.successRate(test, limit) shouldBeEqualTo mean - } - it("Call again if missing in cache because of new params") { - val dataStore = mock() - val provider = InfluxMetricsProvider(dataStore) - val test = generateTest() - val firstMean = 90.0 - val firstLimit = Instant.now().minusSeconds(60) - val firstList = - listOf(SuccessRate(test.toSafeTestName(), firstMean), SuccessRate("test", 80.0)) - whenever(dataStore.requestAllSuccessRates(firstLimit)).thenReturn(firstList) - provider.successRate(test, firstLimit) shouldBeEqualTo firstMean - verify(dataStore).requestAllSuccessRates(eq(firstLimit)) - - val secondLimit = Instant.now() - val secondMean = 80.0 - val secondList = - listOf(SuccessRate(test.toSafeTestName(), secondMean), SuccessRate("test", 90.0)) - whenever(dataStore.requestAllSuccessRates(secondLimit)).thenReturn(secondList) - provider.successRate(test, secondLimit) shouldBeEqualTo secondMean - verify(dataStore).requestAllSuccessRates(eq(secondLimit)) - } - } - }) diff --git a/marathon-gradle-plugin/build.gradle.kts b/marathon-gradle-plugin/build.gradle.kts index 40a91245a..c5d45bcdc 100644 --- a/marathon-gradle-plugin/build.gradle.kts +++ b/marathon-gradle-plugin/build.gradle.kts @@ -25,5 +25,4 @@ dependencies { implementation(project(":vendor:vendor-android:ddmlib")) implementation(Libraries.androidCommon) implementation(BuildPlugins.androidGradle) - implementation(project(":analytics:usage")) } diff --git a/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/AnalyticsConfig.kt b/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/AnalyticsConfig.kt deleted file mode 100644 index ea47f5846..000000000 --- a/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/AnalyticsConfig.kt +++ /dev/null @@ -1,52 +0,0 @@ -package com.malinskiy.marathon - -import com.malinskiy.marathon.execution.AnalyticsConfiguration -import com.malinskiy.marathon.execution.AnalyticsConfiguration.InfluxDbConfiguration.RetentionPolicyConfiguration -import groovy.lang.Closure - -class AnalyticsConfig { - var influx: InfluxConfig? = null - - fun influx(closure: Closure<*>) { - influx = InfluxConfig() - closure.delegate = influx - closure.call() - } - - fun influx(block: InfluxConfig.() -> Unit) { - influx = InfluxConfig().also(block) - } -} - -class InfluxConfig { - var url: String = "" - var user: String = "" - var password: String = "" - var dbName: String = "" - var retentionPolicy: RetentionPolicy? = null -} - -class RetentionPolicy { - var name: String = "rpMarathon" - var duration: String = "30d" - var shardDuration: String = "30m" - var replicationFactor: Int = 2 - var isDefault: Boolean = true -} - -fun AnalyticsConfig.toAnalyticsConfiguration(): AnalyticsConfiguration { - return influx?.let { - AnalyticsConfiguration.InfluxDbConfiguration( - dbName = it.dbName, - user = it.user, - password = it.password, - url = it.url, - retentionPolicyConfiguration = it.retentionPolicy?.toRetentionPolicy() - ?: RetentionPolicyConfiguration.default - ) - } ?: AnalyticsConfiguration.DisabledAnalytics -} - -private fun RetentionPolicy.toRetentionPolicy(): RetentionPolicyConfiguration { - return RetentionPolicyConfiguration(name, duration, shardDuration, replicationFactor, isDefault) -} diff --git a/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/ConfigurationFactory.kt b/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/ConfigurationFactory.kt index 262cee6cd..79b4990f6 100644 --- a/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/ConfigurationFactory.kt +++ b/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/ConfigurationFactory.kt @@ -40,7 +40,6 @@ private fun createConfiguration( ): Configuration = Configuration( name = name, outputDir = output, - analyticsConfiguration = extensionConfig.analyticsConfiguration?.toAnalyticsConfiguration(), customAnalyticsTracker = extensionConfig.customAnalyticsTracker, poolingStrategy = extensionConfig.poolingStrategy?.toStrategy(), shardingStrategy = extensionConfig.shardingStrategy?.toStrategy(), @@ -66,8 +65,7 @@ private fun createConfiguration( testOutputTimeoutMillis = extensionConfig.testOutputTimeoutMillis, noDevicesTimeoutMillis = extensionConfig.noDevicesTimeoutMillis, debug = extensionConfig.debug, - vendorConfiguration = createAndroidConfiguration(extensionConfig, applicationApk, instrumentationApk, sdkDirectory), - analyticsTracking = extensionConfig.analyticsTracking + vendorConfiguration = createAndroidConfiguration(extensionConfig, applicationApk, instrumentationApk, sdkDirectory) ) private fun getOutputDirectory(project: Project, extensionConfig: MarathonExtension): File = diff --git a/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/MarathonExtension.kt b/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/MarathonExtension.kt index 3c836f68b..5163dc0dd 100644 --- a/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/MarathonExtension.kt +++ b/marathon-gradle-plugin/src/main/kotlin/com/malinskiy/marathon/MarathonExtension.kt @@ -7,7 +7,6 @@ import groovy.lang.Closure open class MarathonExtension { var customAnalyticsTracker: Tracker? = null - var analyticsConfiguration: AnalyticsConfig? = null var poolingStrategy: PoolingStrategyConfiguration? = null var shardingStrategy: ShardingStrategyConfiguration? = null @@ -53,8 +52,6 @@ open class MarathonExtension { var preferableRecorderType: DeviceFeature? = null - var analyticsTracking: Boolean = false - //Android specific for now var autoGrantPermission: Boolean? = null var instrumentationArgs: MutableMap = mutableMapOf() @@ -64,10 +61,6 @@ open class MarathonExtension { cache = CachePluginConfiguration().also(block) } - fun analytics(block: AnalyticsConfig.() -> Unit) { - analyticsConfiguration = AnalyticsConfig().also(block) - } - fun batchingStrategy(block: BatchingStrategyConfiguration.() -> Unit) { batchingStrategy = BatchingStrategyConfiguration().also(block) } @@ -111,12 +104,6 @@ open class MarathonExtension { closure.call() } - fun analytics(closure: Closure<*>) { - analyticsConfiguration = AnalyticsConfig() - closure.delegate = analyticsConfiguration - closure.call() - } - fun batchingStrategy(closure: Closure<*>) { batchingStrategy = BatchingStrategyConfiguration() closure.delegate = batchingStrategy diff --git a/sample/android-app/Marathonfile b/sample/android-app/Marathonfile index a8d9d8c09..0b12194cf 100644 --- a/sample/android-app/Marathonfile +++ b/sample/android-app/Marathonfile @@ -5,11 +5,10 @@ retryStrategy: totalAllowedRetryQuota: 100 retryPerTestQuota: 2 vendorConfiguration: - type: "Android" applicationApk: "app/build/outputs/apk/debug/app-debug.apk" testApplicationApk: "app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk" autoGrantPermission: true instrumentationArgs: debug: "false" applicationPmClear: true - testApplicationPmClear: true \ No newline at end of file + testApplicationPmClear: true diff --git a/sample/android-library/Marathonfile b/sample/android-library/Marathonfile index 0f4b18520..078399d5e 100644 --- a/sample/android-library/Marathonfile +++ b/sample/android-library/Marathonfile @@ -1,6 +1,5 @@ name: "sample-library-project tests" outputDir: "build/reports/marathon" vendorConfiguration: - type: "Android" testApplicationApk: "library/build/outputs/apk/androidTest/debug/library-debug-androidTest.apk" - autoGrantPermission: true \ No newline at end of file + autoGrantPermission: true diff --git a/sample/ios-app/.gitignore b/sample/ios-app/.gitignore deleted file mode 100644 index c4611e83e..000000000 --- a/sample/ios-app/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ - -# Created by https://www.gitignore.io/api/xcode -# Edit at https://www.gitignore.io/?templates=xcode - -### Xcode ### -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## User settings -xcuserdata/ - -## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) -*.xcscmblueprint -*.xccheckout - -## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) -build/ -DerivedData/ -*.moved-aside -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 - -### Xcode Patch ### -*.xcodeproj/* -!*.xcodeproj/project.pbxproj -!*.xcodeproj/xcshareddata/ -!*.xcworkspace/contents.xcworkspacedata -/*.gcno -**/xcshareddata/WorkspaceSettings.xcsettings - -# End of https://www.gitignore.io/api/xcode - -derived-data/** diff --git a/sample/ios-app/Marathondevices.template b/sample/ios-app/Marathondevices.template deleted file mode 100644 index 5919bc280..000000000 --- a/sample/ios-app/Marathondevices.template +++ /dev/null @@ -1,2 +0,0 @@ -- host: "localhost" - udid: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" diff --git a/sample/ios-app/Marathonfile b/sample/ios-app/Marathonfile deleted file mode 100644 index afc6a2738..000000000 --- a/sample/ios-app/Marathonfile +++ /dev/null @@ -1,22 +0,0 @@ -name: "sample-ios-app tests" -outputDir: "derived-data/Marathon" -testClassRegexes: ["^((?!Abstract).)*Tests$"] -poolingStrategy: - - type: "device-model" - - type: "os-version" - - type: "omni" -batchingStrategy: - type: "fixed-size" - size: 5 -debug: true -filteringConfiguration: - whitelist: - - type: "simple-class-name" - regex: "StoryboardTests" -vendorConfiguration: - type: "iOS" - derivedDataDir: "derived-data" - sourceRoot: "sample-appUITests" - knownHostsPath: ${HOME}/.ssh/known_hosts - remoteUsername: ${USER} - remotePrivateKey: ${HOME}/.ssh/marathon diff --git a/sample/ios-app/build-for-testing.sh b/sample/ios-app/build-for-testing.sh deleted file mode 100755 index f46ca66b8..000000000 --- a/sample/ios-app/build-for-testing.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -usage() { - echo 1>&2 -e "Usage: bash" "${BASH_SOURCE##*/} " - echo 1>&2 - echo 1>&2 -e "To list available simulators, run $(tput bold)xcrun simctl list devices$(tput sgr0)" - echo 1>&2 -} - -get_available_udid() { - if command -v jq 2>&1 1>/dev/null; then - xcrun simctl list devices -j | jq -r '.devices | flatten | .[] | select(.availability | match("(?&2 -e "$(tput setaf 1)ERROR: $(tput bold)xcodebuild$(tput sgr0) $(tput setaf 1)not found$(tput sgr0)" - exit 1 -fi - -if [[ -z $DESTINATION_SIMULATOR_ID ]]; then - if [[ -n $DESTINATION_SIMULATOR_NAME ]]; then - DESTINATION_SIMULATOR_ID="$(get_available_udid)" - fi -fi - -XCODEBUILD_DESTINATION="${1:-${DESTINATION_SIMULATOR_ID}}" -if [[ -z ${XCODEBUILD_DESTINATION} ]]; then - echo 1>&2 -e "$(tput setaf 1)ERROR: Required simulator UDID is missing.$(tput sgr0)" - echo 1>&2 - usage - exit 1 -fi - -$XCODEBUILD build-for-testing -derivedDataPath derived-data -workspace sample-app.xcworkspace -scheme UITesting -sdk iphonesimulator -destination "platform=iOS Simulator,id=$XCODEBUILD_DESTINATION" diff --git a/sample/ios-app/derived-data/Build/Products/EEE7D1D8-E6D6-4D0A-9531-F955F4EA3523.xctestrun b/sample/ios-app/derived-data/Build/Products/EEE7D1D8-E6D6-4D0A-9531-F955F4EA3523.xctestrun deleted file mode 100644 index c2ddfadcd..000000000 --- a/sample/ios-app/derived-data/Build/Products/EEE7D1D8-E6D6-4D0A-9531-F955F4EA3523.xctestrun +++ /dev/null @@ -1,74 +0,0 @@ - - - - - sample-appUITests - - BundleIdentifiersForCrashReportEmphasis - - com.agoda.sample-app - com.agoga.sample-appUITests - - TestHostBundleIdentifier - com.apple.test.sample-appUITests-Runner - UITargetAppMainThreadCheckerEnabled - - ToolchainsSettingValue - - - UserAttachmentLifetime - deleteOnSuccess - CommandLineArguments - - - TestHostPath - __TESTROOT__/Debug-iphonesimulator/sample-appUITests-Runner.app - UITargetAppCommandLineArguments - - - DependentProductPaths - - __TESTROOT__/Debug-iphonesimulator/sample-app.app - __TESTROOT__/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest - - IsXCTRunnerHostedTestBundle - - ProductModuleName - sample_appUITests - EnvironmentVariables - - OS_ACTIVITY_DT_MODE - YES - TEST_HTTP_SERVER_PORT - 64708 - - TestBundlePath - __TESTHOST__/PlugIns/sample-appUITests.xctest - IsUITestBundle - - UITargetAppPath - __TESTROOT__/Debug-iphonesimulator/sample-app.app - SystemAttachmentLifetime - deleteOnSuccess - TestingEnvironmentVariables - - DYLD_LIBRARY_PATH - __TESTROOT__/Debug-iphonesimulator:__PLATFORMS__/iPhoneSimulator.platform/Developer/Library/Frameworks:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 11.1.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks - DYLD_FRAMEWORK_PATH - __TESTROOT__/Debug-iphonesimulator:__PLATFORMS__/iPhoneSimulator.platform/Developer/Library/Frameworks:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 11.1.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks - MTC_CRASH_ON_REPORT - 1 - XCODE_DBG_XPC_EXCLUSIONS - com.apple.dt.xctestSymbolicator - DYLD_INSERT_LIBRARIES - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 11.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib - - SkipTestIdentifiers - - SkippedSuite - StoryboardTests/testDisabledButton - MoreTests/testDismissModal - - - - \ No newline at end of file diff --git a/sample/ios-app/ios-app-setup.sh b/sample/ios-app/ios-app-setup.sh deleted file mode 100644 index 0ba427827..000000000 --- a/sample/ios-app/ios-app-setup.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env bash - -set -e - -sudo su <<'EOF' -echo "Verifying sshd is enabled..." -sshd_status=$(systemsetup -getremotelogin) -if [[ $string == *": On"* ]]; then - echo "Ok" -else - systemsetup -setremotelogin on - echo "Ok" -fi -EOF - -echo "" -echo "Verifying private key is created" - -if [[ -f "$HOME/.ssh/marathon" ]]; then - echo "Ok" -else - ssh-keygen -m PEM -t rsa -b 4096 -C "$USER@localhost" -f ~/.ssh/marathon -q -N "" - echo "Ok" -fi - -echo "" -echo "Verifying private key is accepted" -status=$(ssh -o BatchMode=yes -o ConnectTimeout=5 "$USER@localhost" echo ok 2>&1) || true -case $status in -ok) echo "Ok" ;; -*) - ssh-copy-id -i ~/.ssh/marathon "$USER@localhost" - echo "Ok" - ;; -esac - -echo "" -echo "Select the simulator to use:" -if [[ -f "Marathondevices" ]]; then - chosen_sim_udid=$(cat Marathondevices | head -2 | tail -1 | egrep -o '[0-9ABCDEF-]+') - echo "Found Marathondevices file. Assuming that we're still using simulator with UDID=$chosen_sim_udid" - echo "If that's not the case - remove the Marathondevices file" - echo "Ok" -else - simlist=$(xcrun simctl list devices -j | jq -r '.devices | flatten | to_entries | map({name: .value.name, id: .key}) | flatten | map("[\(.id)]: \(.name)") | .[]' | pr -2 -t - | sed '/^$/d') - echo "$simlist" - read -p "Enter simulator id:" simid - chosen_sim_udid=$(xcrun simctl list devices -j | jq -r '.devices | flatten | to_entries | .['"$simid"'] | .value.udid') - echo "Chosen simulator UDID: $chosen_sim_udid" - echo "$(pwd)" - sed 's/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/'"$chosen_sim_udid"'/g' Marathondevices.template >Marathondevices - - echo "Ok" -fi - -echo "" -echo "Building the app for simulator:" -bash build-for-testing.sh "$chosen_sim_udid" diff --git a/sample/ios-app/sample-app.xcodeproj/project.pbxproj b/sample/ios-app/sample-app.xcodeproj/project.pbxproj deleted file mode 100644 index c3524363f..000000000 --- a/sample/ios-app/sample-app.xcodeproj/project.pbxproj +++ /dev/null @@ -1,471 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 124DFB0A21411E07005B650A /* MoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124DFB0921411E07005B650A /* MoreTests.swift */; }; - 124DFB0C2141322E005B650A /* SkippedSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124DFB0B2141322E005B650A /* SkippedSuite.swift */; }; - 1271DC9A21351C6D002B8D3E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1271DC9921351C6D002B8D3E /* AppDelegate.swift */; }; - 1271DC9F21351C6D002B8D3E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1271DC9D21351C6D002B8D3E /* Main.storyboard */; }; - 1271DCA121351C6D002B8D3E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1271DCA021351C6D002B8D3E /* Assets.xcassets */; }; - 1271DCA421351C6D002B8D3E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1271DCA221351C6D002B8D3E /* LaunchScreen.storyboard */; }; - 1271DCBA21351C6D002B8D3E /* StoryboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1271DCB921351C6D002B8D3E /* StoryboardTests.swift */; }; - 12872C4D21A6A595005543BA /* CrashingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12872C4C21A6A595005543BA /* CrashingTests.swift */; }; - DA32B580214D224E004D00BC /* FailingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA32B57F214D224E004D00BC /* FailingTests.swift */; }; - DA387D99214C37FA00109B63 /* FlakyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA387D98214C37FA00109B63 /* FlakyTests.swift */; }; - DA387D9B214C39AB00109B63 /* BooleanExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA387D9A214C39AB00109B63 /* BooleanExtensions.swift */; }; - DA387D9D214C3A4F00109B63 /* SlowTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA387D9C214C3A4F00109B63 /* SlowTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1271DCB621351C6D002B8D3E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1271DC8E21351C6D002B8D3E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1271DC9521351C6D002B8D3E; - remoteInfo = "sample-app"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 124DFB0921411E07005B650A /* MoreTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoreTests.swift; sourceTree = ""; }; - 124DFB0B2141322E005B650A /* SkippedSuite.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SkippedSuite.swift; sourceTree = ""; }; - 1271DC9621351C6D002B8D3E /* sample-app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "sample-app.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1271DC9921351C6D002B8D3E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 1271DC9E21351C6D002B8D3E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 1271DCA021351C6D002B8D3E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 1271DCA321351C6D002B8D3E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 1271DCA521351C6D002B8D3E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1271DCB521351C6D002B8D3E /* sample-appUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "sample-appUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1271DCB921351C6D002B8D3E /* StoryboardTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoryboardTests.swift; sourceTree = ""; }; - 1271DCBB21351C6D002B8D3E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 12872C4C21A6A595005543BA /* CrashingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrashingTests.swift; sourceTree = ""; }; - DA32B57F214D224E004D00BC /* FailingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FailingTests.swift; sourceTree = ""; }; - DA387D98214C37FA00109B63 /* FlakyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlakyTests.swift; sourceTree = ""; }; - DA387D9A214C39AB00109B63 /* BooleanExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BooleanExtensions.swift; sourceTree = ""; }; - DA387D9C214C3A4F00109B63 /* SlowTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SlowTests.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1271DC9321351C6D002B8D3E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1271DCB221351C6D002B8D3E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1271DC8D21351C6D002B8D3E = { - isa = PBXGroup; - children = ( - 1271DC9821351C6D002B8D3E /* sample-app */, - 1271DCB821351C6D002B8D3E /* sample-appUITests */, - 1271DC9721351C6D002B8D3E /* Products */, - ); - sourceTree = ""; - }; - 1271DC9721351C6D002B8D3E /* Products */ = { - isa = PBXGroup; - children = ( - 1271DC9621351C6D002B8D3E /* sample-app.app */, - 1271DCB521351C6D002B8D3E /* sample-appUITests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 1271DC9821351C6D002B8D3E /* sample-app */ = { - isa = PBXGroup; - children = ( - 1271DC9921351C6D002B8D3E /* AppDelegate.swift */, - 1271DC9D21351C6D002B8D3E /* Main.storyboard */, - 1271DCA021351C6D002B8D3E /* Assets.xcassets */, - 1271DCA221351C6D002B8D3E /* LaunchScreen.storyboard */, - 1271DCA521351C6D002B8D3E /* Info.plist */, - ); - path = "sample-app"; - sourceTree = ""; - }; - 1271DCB821351C6D002B8D3E /* sample-appUITests */ = { - isa = PBXGroup; - children = ( - 124DFB0921411E07005B650A /* MoreTests.swift */, - 124DFB0B2141322E005B650A /* SkippedSuite.swift */, - 1271DCB921351C6D002B8D3E /* StoryboardTests.swift */, - 12872C4C21A6A595005543BA /* CrashingTests.swift */, - 1271DCBB21351C6D002B8D3E /* Info.plist */, - DA387D98214C37FA00109B63 /* FlakyTests.swift */, - DA32B57F214D224E004D00BC /* FailingTests.swift */, - DA387D9A214C39AB00109B63 /* BooleanExtensions.swift */, - DA387D9C214C3A4F00109B63 /* SlowTests.swift */, - ); - path = "sample-appUITests"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1271DC9521351C6D002B8D3E /* sample-app */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1271DCBE21351C6D002B8D3E /* Build configuration list for PBXNativeTarget "sample-app" */; - buildPhases = ( - 1271DC9221351C6D002B8D3E /* Sources */, - 1271DC9321351C6D002B8D3E /* Frameworks */, - 1271DC9421351C6D002B8D3E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "sample-app"; - productName = "sample-app"; - productReference = 1271DC9621351C6D002B8D3E /* sample-app.app */; - productType = "com.apple.product-type.application"; - }; - 1271DCB421351C6D002B8D3E /* sample-appUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1271DCC421351C6D002B8D3E /* Build configuration list for PBXNativeTarget "sample-appUITests" */; - buildPhases = ( - 1271DCB121351C6D002B8D3E /* Sources */, - 1271DCB221351C6D002B8D3E /* Frameworks */, - 1271DCB321351C6D002B8D3E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 1271DCB721351C6D002B8D3E /* PBXTargetDependency */, - ); - name = "sample-appUITests"; - productName = "sample-appUITests"; - productReference = 1271DCB521351C6D002B8D3E /* sample-appUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 1271DC8E21351C6D002B8D3E /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 0920; - ORGANIZATIONNAME = "Panforov, Yurii (Agoda)"; - TargetAttributes = { - 1271DC9521351C6D002B8D3E = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Automatic; - }; - 1271DCB421351C6D002B8D3E = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Automatic; - TestTargetID = 1271DC9521351C6D002B8D3E; - }; - }; - }; - buildConfigurationList = 1271DC9121351C6D002B8D3E /* Build configuration list for PBXProject "sample-app" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 1271DC8D21351C6D002B8D3E; - productRefGroup = 1271DC9721351C6D002B8D3E /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1271DC9521351C6D002B8D3E /* sample-app */, - 1271DCB421351C6D002B8D3E /* sample-appUITests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1271DC9421351C6D002B8D3E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1271DCA421351C6D002B8D3E /* LaunchScreen.storyboard in Resources */, - 1271DCA121351C6D002B8D3E /* Assets.xcassets in Resources */, - 1271DC9F21351C6D002B8D3E /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1271DCB321351C6D002B8D3E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1271DC9221351C6D002B8D3E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1271DC9A21351C6D002B8D3E /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1271DCB121351C6D002B8D3E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 12872C4D21A6A595005543BA /* CrashingTests.swift in Sources */, - DA387D9B214C39AB00109B63 /* BooleanExtensions.swift in Sources */, - 124DFB0A21411E07005B650A /* MoreTests.swift in Sources */, - DA387D9D214C3A4F00109B63 /* SlowTests.swift in Sources */, - 124DFB0C2141322E005B650A /* SkippedSuite.swift in Sources */, - DA32B580214D224E004D00BC /* FailingTests.swift in Sources */, - DA387D99214C37FA00109B63 /* FlakyTests.swift in Sources */, - 1271DCBA21351C6D002B8D3E /* StoryboardTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1271DCB721351C6D002B8D3E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 1271DC9521351C6D002B8D3E /* sample-app */; - targetProxy = 1271DCB621351C6D002B8D3E /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 1271DC9D21351C6D002B8D3E /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 1271DC9E21351C6D002B8D3E /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 1271DCA221351C6D002B8D3E /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 1271DCA321351C6D002B8D3E /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 1271DCBC21351C6D002B8D3E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 1271DCBD21351C6D002B8D3E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 1271DCBF21351C6D002B8D3E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = XV56FT9363; - INFOPLIST_FILE = "sample-app/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.agoda.sample-app"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 1271DCC021351C6D002B8D3E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = XV56FT9363; - INFOPLIST_FILE = "sample-app/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.agoda.sample-app"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 1271DCC521351C6D002B8D3E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = XV56FT9363; - INFOPLIST_FILE = "sample-appUITests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.agoga.sample-appUITests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = "sample-app"; - }; - name = Debug; - }; - 1271DCC621351C6D002B8D3E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = XV56FT9363; - INFOPLIST_FILE = "sample-appUITests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.agoga.sample-appUITests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = "sample-app"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1271DC9121351C6D002B8D3E /* Build configuration list for PBXProject "sample-app" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1271DCBC21351C6D002B8D3E /* Debug */, - 1271DCBD21351C6D002B8D3E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1271DCBE21351C6D002B8D3E /* Build configuration list for PBXNativeTarget "sample-app" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1271DCBF21351C6D002B8D3E /* Debug */, - 1271DCC021351C6D002B8D3E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1271DCC421351C6D002B8D3E /* Build configuration list for PBXNativeTarget "sample-appUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1271DCC521351C6D002B8D3E /* Debug */, - 1271DCC621351C6D002B8D3E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 1271DC8E21351C6D002B8D3E /* Project object */; -} diff --git a/sample/ios-app/sample-app.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/sample/ios-app/sample-app.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 6a9d64381..000000000 --- a/sample/ios-app/sample-app.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/sample/ios-app/sample-app.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/sample/ios-app/sample-app.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/sample/ios-app/sample-app.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/sample/ios-app/sample-app.xcodeproj/xcshareddata/xcschemes/UITesting.xcscheme b/sample/ios-app/sample-app.xcodeproj/xcshareddata/xcschemes/UITesting.xcscheme deleted file mode 100644 index 612c2bf5e..000000000 --- a/sample/ios-app/sample-app.xcodeproj/xcshareddata/xcschemes/UITesting.xcscheme +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sample/ios-app/sample-app.xcworkspace/contents.xcworkspacedata b/sample/ios-app/sample-app.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 2bb18a66c..000000000 --- a/sample/ios-app/sample-app.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/sample/ios-app/sample-app.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/sample/ios-app/sample-app.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/sample/ios-app/sample-app.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/sample/ios-app/sample-app/AppDelegate.swift b/sample/ios-app/sample-app/AppDelegate.swift deleted file mode 100644 index 56389acfc..000000000 --- a/sample/ios-app/sample-app/AppDelegate.swift +++ /dev/null @@ -1,28 +0,0 @@ -// @copyright Agoda Services Co. Ltd. - -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - return true - } -} - -class DismissSegue: UIStoryboardSegue { - override func perform() { - guard let presentingViewController = source.presentingViewController else { - return - } - presentingViewController.dismiss(animated: true, completion: nil) - } -} - -class ViewController: UIViewController { - @IBAction func crash() { - fatalError() - } -} diff --git a/sample/ios-app/sample-app/Assets.xcassets/AppIcon.appiconset/Contents.json b/sample/ios-app/sample-app/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index dfc5acac6..000000000 --- a/sample/ios-app/sample-app/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "images": [ - { - "idiom": "iphone", - "size": "20x20", - "scale": "2x" - }, - { - "idiom": "iphone", - "size": "20x20", - "scale": "3x" - }, - { - "idiom": "iphone", - "size": "29x29", - "scale": "2x" - }, - { - "idiom": "iphone", - "size": "29x29", - "scale": "3x" - }, - { - "idiom": "iphone", - "size": "40x40", - "scale": "2x" - }, - { - "idiom": "iphone", - "size": "40x40", - "scale": "3x" - }, - { - "idiom": "iphone", - "size": "60x60", - "scale": "2x" - }, - { - "idiom": "iphone", - "size": "60x60", - "scale": "3x" - }, - { - "idiom": "ipad", - "size": "20x20", - "scale": "1x" - }, - { - "idiom": "ipad", - "size": "20x20", - "scale": "2x" - }, - { - "idiom": "ipad", - "size": "29x29", - "scale": "1x" - }, - { - "idiom": "ipad", - "size": "29x29", - "scale": "2x" - }, - { - "idiom": "ipad", - "size": "40x40", - "scale": "1x" - }, - { - "idiom": "ipad", - "size": "40x40", - "scale": "2x" - }, - { - "idiom": "ipad", - "size": "76x76", - "scale": "1x" - }, - { - "idiom": "ipad", - "size": "76x76", - "scale": "2x" - }, - { - "idiom": "ipad", - "size": "83.5x83.5", - "scale": "2x" - }, - { - "idiom": "ios-marketing", - "size": "1024x1024", - "scale": "1x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/sample/ios-app/sample-app/Base.lproj/LaunchScreen.storyboard b/sample/ios-app/sample-app/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f83f6fd58..000000000 --- a/sample/ios-app/sample-app/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sample/ios-app/sample-app/Base.lproj/Main.storyboard b/sample/ios-app/sample-app/Base.lproj/Main.storyboard deleted file mode 100644 index 4cbbe2fbf..000000000 --- a/sample/ios-app/sample-app/Base.lproj/Main.storyboard +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sample/ios-app/sample-app/Info.plist b/sample/ios-app/sample-app/Info.plist deleted file mode 100644 index 16be3b681..000000000 --- a/sample/ios-app/sample-app/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/sample/ios-app/sample-appUITests/BooleanExtensions.swift b/sample/ios-app/sample-appUITests/BooleanExtensions.swift deleted file mode 100644 index 02201247c..000000000 --- a/sample/ios-app/sample-appUITests/BooleanExtensions.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// BooleanExtensions.swift -// sample-appUITests -// -// Created by Anton Malinskiy on 9/15/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import Foundation - -extension Bool { - static func random() -> Bool { - return arc4random_uniform(2) == 0 - } -} diff --git a/sample/ios-app/sample-appUITests/CrashingTests.swift b/sample/ios-app/sample-appUITests/CrashingTests.swift deleted file mode 100644 index 44d0095fd..000000000 --- a/sample/ios-app/sample-appUITests/CrashingTests.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// CrashingTests.swift -// sample-appUITests -// -// Created by Panforov, Yurii (Agoda) on 22/11/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import XCTest - -class CrashingTests: XCTestCase { - - private var app: XCUIApplication! - - override func setUp() { - super.setUp() - - continueAfterFailure = false - - app = XCUIApplication() - app.launch() - } - - override func tearDown() { - app = nil - - super.tearDown() - } - - func testButton() { - let button = app.buttons.element(boundBy: 2) - XCTAssertTrue(button.waitForExistence()) - XCTAssertTrue(button.isHittable) - - button.tap() - - XCTAssertTrue(button.waitForExistence()) - } -} - -private let standardTimeout: TimeInterval = 30.0 -private extension XCUIElement { - @discardableResult - func waitForExistence() -> Bool { - return waitForExistence(timeout: standardTimeout) - } -} - diff --git a/sample/ios-app/sample-appUITests/FailingTests.swift b/sample/ios-app/sample-appUITests/FailingTests.swift deleted file mode 100644 index fe9b511df..000000000 --- a/sample/ios-app/sample-appUITests/FailingTests.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// Failingtest.swift -// sample-appUITests -// -// Created by Anton Malinskiy on 9/15/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import XCTest - -class FailingTests: XCTestCase { - - private var app: XCUIApplication! - - override func setUp() { - super.setUp() - - continueAfterFailure = true - - app = XCUIApplication() - app.launch() - } - - override func tearDown() { - app = nil - - super.tearDown() - } - - func testAlwaysFailing() { - XCTAssertTrue(false) - } - -} - -private let standardTimeout: TimeInterval = 30.0 -private extension XCUIElement { - @discardableResult - func waitForExistence() -> Bool { - return waitForExistence(timeout: standardTimeout) - } -} diff --git a/sample/ios-app/sample-appUITests/FlakyTests.swift b/sample/ios-app/sample-appUITests/FlakyTests.swift deleted file mode 100644 index bd8bbf618..000000000 --- a/sample/ios-app/sample-appUITests/FlakyTests.swift +++ /dev/null @@ -1,83 +0,0 @@ -// -// AbstractFailingTests.swift -// sample-appUITests -// -// Created by Anton Malinskiy on 9/15/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import Foundation -import XCTest - -class FlakyTests: XCTestCase { - - private var app: XCUIApplication! - - override func setUp() { - super.setUp() - - continueAfterFailure = true - - app = XCUIApplication() - app.launch() - } - - override func tearDown() { - app = nil - - super.tearDown() - } - - func testTextFlaky() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky1() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky2() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky3() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky4() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky5() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky6() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky7() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky8() { - usleep(100) - XCTAssertTrue(Bool.random()) - } -} - -private let standardTimeout: TimeInterval = 30.0 -private extension XCUIElement { - @discardableResult - func waitForExistence() -> Bool { - return waitForExistence(timeout: standardTimeout) - } -} diff --git a/sample/ios-app/sample-appUITests/Info.plist b/sample/ios-app/sample-appUITests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/sample/ios-app/sample-appUITests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/sample/ios-app/sample-appUITests/MoreTests.swift b/sample/ios-app/sample-appUITests/MoreTests.swift deleted file mode 100644 index f7043e79f..000000000 --- a/sample/ios-app/sample-appUITests/MoreTests.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// sample_appUITests.swift -// sample-appUITests -// -// Created by Panforov, Yurii (Agoda) on 28/8/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import XCTest - -class MoreTests: XCTestCase { - - private var app: XCUIApplication! - - override func setUp() { - super.setUp() - - continueAfterFailure = false - - app = XCUIApplication() - app.launch() - } - - override func tearDown() { - app = nil - - super.tearDown() - } - - func testPresentModal() { - let button = app.buttons.element(boundBy: 1) - button.waitForExistence() - button.tap() - - let modalLabelPredicate = NSPredicate(format: "%K == %@", "label", "Modal Label") - let modalLabel = app.staticTexts.element(matching: modalLabelPredicate) - XCTAssertTrue(modalLabel.exists) - } - - - func testDismissModal() { - let button = app.buttons.element(boundBy: 1) - button.tap() - - let dismissButtonPredicate = NSPredicate(format: "%K == %@", "label", "Close") - let dismissButton = app.buttons.element(matching: dismissButtonPredicate) - dismissButton.tap() - - let dismissedLabel = app.staticTexts.firstMatch - XCTAssertEqual(dismissedLabel.label, "Label") - } -} - -private let standardTimeout: TimeInterval = 30.0 -private extension XCUIElement { - @discardableResult - func waitForExistence() -> Bool { - return waitForExistence(timeout: standardTimeout) - } -} diff --git a/sample/ios-app/sample-appUITests/SkippedSuite.swift b/sample/ios-app/sample-appUITests/SkippedSuite.swift deleted file mode 100644 index c45dc1612..000000000 --- a/sample/ios-app/sample-appUITests/SkippedSuite.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// sample_appUITests.swift -// sample-appUITests -// -// Created by Panforov, Yurii (Agoda) on 28/8/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import XCTest - -class SkippedSuite: XCTestCase { - - private var app: XCUIApplication! - - override func setUp() { - super.setUp() - - continueAfterFailure = false - - app = XCUIApplication() - app.launch() - } - - override func tearDown() { - app = nil - - super.tearDown() - } - - func testTruth() { - XCTAssertTrue(true) - } - - - func testLies() { - XCTAssertFalse(false) - } -} - diff --git a/sample/ios-app/sample-appUITests/SlowTests.swift b/sample/ios-app/sample-appUITests/SlowTests.swift deleted file mode 100644 index 8c1d6d37c..000000000 --- a/sample/ios-app/sample-appUITests/SlowTests.swift +++ /dev/null @@ -1,102 +0,0 @@ -// -// SlowTests.swift -// sample-appUITests -// -// Created by Anton Malinskiy on 9/15/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -// -// AbstractFailingTests.swift -// sample-appUITests -// -// Created by Anton Malinskiy on 9/15/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import Foundation -import XCTest - -class SlowTests: XCTestCase { - - private var app: XCUIApplication! - - override func setUp() { - super.setUp() - - continueAfterFailure = true - - app = XCUIApplication() - app.launch() - } - - override func tearDown() { - app = nil - - super.tearDown() - } - - func testTextSlow() { - sleep(5) - let button = app.buttons.firstMatch - button.waitForExistence() - button.tap() - - let label = app.staticTexts.firstMatch - label.waitForExistence() - XCTAssertEqual(label.label, "Label") - } - - func testTextSlow1() { - sleep(5) - let button = app.buttons.firstMatch - button.waitForExistence() - button.tap() - - let label = app.staticTexts.firstMatch - label.waitForExistence() - XCTAssertEqual(label.label, "Label") - } - - func testTextSlow2() { - sleep(5) - let button = app.buttons.firstMatch - button.waitForExistence() - button.tap() - - let label = app.staticTexts.firstMatch - label.waitForExistence() - XCTAssertEqual(label.label, "Label") - } - - func testTextSlow3() { - sleep(5) - let button = app.buttons.firstMatch - button.waitForExistence() - button.tap() - - let label = app.staticTexts.firstMatch - label.waitForExistence() - XCTAssertEqual(label.label, "Label") - } - - func testTextSlow4() { - sleep(5) - let button = app.buttons.firstMatch - button.waitForExistence() - button.tap() - - let label = app.staticTexts.firstMatch - label.waitForExistence() - XCTAssertEqual(label.label, "Label") - } -} - -private let standardTimeout: TimeInterval = 30.0 -private extension XCUIElement { - @discardableResult - func waitForExistence() -> Bool { - return waitForExistence(timeout: standardTimeout) - } -} - diff --git a/sample/ios-app/sample-appUITests/StoryboardTests.swift b/sample/ios-app/sample-appUITests/StoryboardTests.swift deleted file mode 100644 index 66b007ee2..000000000 --- a/sample/ios-app/sample-appUITests/StoryboardTests.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// sample_appUITests.swift -// sample-appUITests -// -// Created by Panforov, Yurii (Agoda) on 28/8/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import XCTest - -class StoryboardTests: XCTestCase { - - private var app: XCUIApplication! - - override func setUp() { - super.setUp() - - continueAfterFailure = false - - app = XCUIApplication() - app.launch() - } - - override func tearDown() { - app = nil - - super.tearDown() - } - - func testButton() { - let button = app.buttons.firstMatch - XCTAssertTrue(button.waitForExistence()) - XCTAssertTrue(button.isHittable) - - button.tap() - - let label = app.staticTexts.firstMatch - XCTAssertTrue(label.waitForExistence()) - } - - func testDisabledButton() { - let button = app.buttons.firstMatch - XCTAssertTrue(button.waitForExistence()) - XCTAssertTrue(button.isHittable) - } - - func testLabel() { - let button = app.buttons.firstMatch - button.waitForExistence() - button.tap() - - let label = app.staticTexts.firstMatch - label.waitForExistence() - XCTAssertEqual(label.label, "Label") - } - - func disabledTestButton() { - let button = app.buttons.firstMatch - button.tap() - - let label = app.staticTexts.firstMatch - XCTAssertEqual(label.label, "Label") - } -} - -private let standardTimeout: TimeInterval = 30.0 -private extension XCUIElement { - @discardableResult - func waitForExistence() -> Bool { - return waitForExistence(timeout: standardTimeout) - } -} - diff --git a/settings.gradle.kts b/settings.gradle.kts index 431d1ad1a..93ea3702b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -15,12 +15,7 @@ rootProject.name = "marathon" include("core") include("vendor:vendor-android:base") include("vendor:vendor-android:ddmlib") -include("vendor:vendor-android:adam") -include("vendor:vendor-ios") include("vendor:vendor-test") include("marathon-gradle-plugin") include("report:html-report") include("report:execution-timeline") -include("cli") -include(":analytics:usage") -//include("vendor:adam") diff --git a/vendor/vendor-android/adam/build.gradle.kts b/vendor/vendor-android/adam/build.gradle.kts deleted file mode 100644 index 2302c0b8f..000000000 --- a/vendor/vendor-android/adam/build.gradle.kts +++ /dev/null @@ -1,23 +0,0 @@ -plugins { - `java-library` - id("org.jetbrains.kotlin.jvm") - id("org.jetbrains.dokka") -} - -dependencies { - implementation(Libraries.allure) - implementation(Libraries.kotlinCoroutines) - implementation(Libraries.kotlinLogging) - implementation(Libraries.ddmlib) - implementation(Libraries.dexTestParser) - implementation(Libraries.axmlParser) - implementation(Libraries.jacksonAnnotations) - implementation(Libraries.scalr) - implementation(project(":core")) - implementation(Libraries.logbackClassic) - testImplementation(project(":vendor:vendor-test")) - testImplementation(TestLibraries.koin) -} - -Deployment.initialize(project) -Testing.configure(project) diff --git a/vendor/vendor-android/base/src/test/kotlin/com/malinskiy/marathon/android/AndroidTestParserSpek.kt b/vendor/vendor-android/base/src/test/kotlin/com/malinskiy/marathon/android/AndroidTestParserSpek.kt index 0c296c47a..743679733 100644 --- a/vendor/vendor-android/base/src/test/kotlin/com/malinskiy/marathon/android/AndroidTestParserSpek.kt +++ b/vendor/vendor-android/base/src/test/kotlin/com/malinskiy/marathon/android/AndroidTestParserSpek.kt @@ -22,7 +22,6 @@ class AndroidTestParserSpek : Spek( name = "", outputDir = File(""), customAnalyticsTracker = null, - analyticsConfiguration = null, poolingStrategy = null, shardingStrategy = null, sortingStrategy = null, @@ -52,8 +51,7 @@ class AndroidTestParserSpek : Spek( androidSdk = File(""), applicationOutput = File(""), testApplicationOutput = apkFile - ), - analyticsTracking = false + ) ) val componentInfo = AndroidComponentInfoExtractor().extract(configuration) diff --git a/vendor/vendor-android/ddmlib/src/test/kotlin/com/malinskiy/marathon/android/AndroidDeviceTestRunnerSpek.kt b/vendor/vendor-android/ddmlib/src/test/kotlin/com/malinskiy/marathon/android/AndroidDeviceTestRunnerSpek.kt index 3695d8c8b..8757f5337 100644 --- a/vendor/vendor-android/ddmlib/src/test/kotlin/com/malinskiy/marathon/android/AndroidDeviceTestRunnerSpek.kt +++ b/vendor/vendor-android/ddmlib/src/test/kotlin/com/malinskiy/marathon/android/AndroidDeviceTestRunnerSpek.kt @@ -54,7 +54,6 @@ class AndroidDeviceTestRunnerSpek : Spek( val configuration = Configuration( name = "", outputDir = output, - analyticsConfiguration = null, customAnalyticsTracker = null, poolingStrategy = null, shardingStrategy = null, @@ -85,8 +84,7 @@ class AndroidDeviceTestRunnerSpek : Spek( applicationOutput = File(""), testApplicationOutput = apkFile, implementationModules = emptyList() - ), - analyticsTracking = false + ) ) val componentInfo = AndroidComponentInfoExtractor().extract(configuration) val ignoredTest = diff --git a/vendor/vendor-ios/build.gradle.kts b/vendor/vendor-ios/build.gradle.kts deleted file mode 100644 index 47226a611..000000000 --- a/vendor/vendor-ios/build.gradle.kts +++ /dev/null @@ -1,27 +0,0 @@ -plugins { - `java-library` - id("org.jetbrains.kotlin.jvm") - id("org.jetbrains.dokka") -} - -dependencies { - implementation(Libraries.kotlinCoroutines) - implementation(Libraries.kotlinLogging) - implementation(Libraries.kotlinReflect) - implementation(Libraries.slf4jAPI) - implementation(Libraries.logbackClassic) - implementation(Libraries.ddPlist) - implementation(Libraries.guava) - implementation(Libraries.rsync4j) - implementation(Libraries.sshj) - implementation(Libraries.gson) - implementation(Libraries.jacksonKotlin) - implementation(Libraries.jacksonYaml) - implementation(Libraries.jansi) - implementation(project(":core")) - implementation(Libraries.apacheCommonsText) - testImplementation(TestLibraries.testContainers) -} - -Deployment.initialize(project) -Testing.configure(project) diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/DerivedDataManager.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/DerivedDataManager.kt deleted file mode 100644 index c5b5c38e9..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/DerivedDataManager.kt +++ /dev/null @@ -1,146 +0,0 @@ -package com.malinskiy.marathon.ios - -import com.github.fracpete.processoutput4j.output.CollectingProcessOutput -import com.github.fracpete.rsync4j.RSync -import com.malinskiy.marathon.execution.Configuration -import com.malinskiy.marathon.extension.relativePathTo -import com.malinskiy.marathon.log.MarathonLogging -import java.io.File -import java.io.FileNotFoundException -import java.util.concurrent.ConcurrentHashMap -import java.util.concurrent.locks.Lock -import java.util.concurrent.locks.ReentrantLock -import kotlin.concurrent.withLock - -class DerivedDataManager(val configuration: Configuration) { - companion object { - private val hostnameLocksMap = ConcurrentHashMap() - } - - private val logger = MarathonLogging.logger(javaClass.simpleName) - - private val iosConfiguration: IOSConfiguration = configuration.vendorConfiguration as IOSConfiguration - -// val productsDir: File -// get() = iosConfiguration.derivedDataDir.resolve(PRODUCTS_PATH) -// -// val xctestrunFile: File -// get() = iosConfiguration.xctestrunPath - - init { - if (configuration.debug) { - logger.debug(rsyncVersion) - } - if (!iosConfiguration.remotePrivateKey.exists()) { - throw FileNotFoundException("Private key not found at ${iosConfiguration.remotePrivateKey}") - } -// if (xctestrunFile.relativePathTo(productsDir) != xctestrunFile.name) { -// throw FileNotFoundException("xctestrun file must be located in build products directory.") -// } - } - - private val rsyncVersion: String - get() { - val output = CollectingProcessOutput() - output.monitor(RSync().source("/tmp").destination("/tmp").version(true).builder()) - return output.stdOut.replace("""(?s)\n.*\z""".toRegex(), "") - } - - fun sendSynchronized(localPath: File, remotePath: String, hostName: String, port: Int) { - hostnameLocksMap.getOrPut(hostName) { ReentrantLock() }.withLock { - send(localPath, remotePath, hostName, port) - } - } - - fun send(localPath: File, remotePath: String, hostName: String, port: Int) { - val source = if (localPath.isDirectory) { - localPath.absolutePathWithTrailingSeparator - } else { - localPath.absolutePath - } - val destination = "$hostName:$remotePath" - - val sshString = getSshString(port) - val rsync = getRsyncBase() - .rsh(sshString) - .source(source) - .destination(destination) - - val output = CollectingProcessOutput() - output.monitor(rsync.builder()) - if (output.exitCode != 0) { - if (output.stdErr.isNotEmpty()) { - logger.error(output.stdErr) - } - } - } - - fun receive(remotePath: String, hostName: String, port: Int, localPath: File): Int { - val source = "$hostName:$remotePath" - val destination = if (localPath.isDirectory) { - localPath.absolutePathWithTrailingSeparator - } else { - localPath.absolutePath - } - - val sshString = getSshString(port) - val rsync = getRsyncBase() - .rsh(sshString) - .source(source) - .destination(destination) - - val output = CollectingProcessOutput() - output.timeOut = 30 - output.monitor(rsync.builder()) - if (output.exitCode != 0) { - if (output.stdErr.isNotEmpty()) { - logger.error(output.stdErr) - } - } - return output.exitCode - } - - private fun getRsyncBase(): RSync { - return RSync() - .a() - .partial(true) - .partialDir(".rsync-partial") - .delayUpdates(true) - .rsyncPath(iosConfiguration.remoteRsyncPath) - .verbose(configuration.debug) - } - - private fun getSshString(port: Int): String { - return "ssh -o 'StrictHostKeyChecking no' -F /dev/null " + - "-i ${iosConfiguration.remotePrivateKey} " + - "-l ${iosConfiguration.remoteUsername} " + - "-p ${port.toString()} " + - when (configuration.debug && iosConfiguration.debugSsh) { - true -> "-vvv" - else -> "" - } - } -} - -private val File.absolutePathWithTrailingSeparator: String - get() { - return absolutePath.dropLastWhile { it == File.separatorChar } + File.separatorChar - } - -private fun RSync.a(): RSync { - return this - .recursive(true) - .links(true) - .perms(true) - .times(true) - .group(true) - .owner(true) - .devices(true) - .specials(true) -} - -private fun File.isDescendantOf(dir: File): Boolean { - if (!dir.exists() || !dir.isDirectory) return false - - return canonicalFile.toPath().toAbsolutePath().startsWith(dir.canonicalFile.toPath().toAbsolutePath()) -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/HealthChangeListener.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/HealthChangeListener.kt deleted file mode 100644 index bd68a2eb7..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/HealthChangeListener.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.malinskiy.marathon.ios - -interface HealthChangeListener { - suspend fun onDisconnect(device: IOSDevice) -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSComponentCacheKeyProvider.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSComponentCacheKeyProvider.kt deleted file mode 100644 index 0cd268b44..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSComponentCacheKeyProvider.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.malinskiy.marathon.ios - -import com.malinskiy.marathon.cache.test.key.ComponentCacheKeyProvider -import com.malinskiy.marathon.execution.ComponentInfo - -class IOSComponentCacheKeyProvider : ComponentCacheKeyProvider { - - override suspend fun getCacheKey(componentInfo: ComponentInfo): String { - TODO() - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSComponentInfo.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSComponentInfo.kt deleted file mode 100644 index ccd9538bf..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSComponentInfo.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.malinskiy.marathon.ios - -import com.malinskiy.marathon.execution.ComponentInfo -import java.io.File - -data class IOSComponentInfo( - val xctestrunPath: File, - val derivedDataDir: File, - val sourceRoot: File = File("."), - override val name: String = "root" -) : ComponentInfo { - - val productsDir = derivedDataDir.resolve(PRODUCTS_PATH) - - private companion object { - private const val PRODUCTS_PATH = "Build/Products" - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSComponentInfoExtractor.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSComponentInfoExtractor.kt deleted file mode 100644 index e30474e8b..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSComponentInfoExtractor.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.malinskiy.marathon.ios - -import com.malinskiy.marathon.execution.ComponentInfo -import com.malinskiy.marathon.execution.ComponentInfoExtractor -import com.malinskiy.marathon.execution.Configuration - -class IOSComponentInfoExtractor : ComponentInfoExtractor { - - override fun extract(configuration: Configuration): ComponentInfo { - val iosConfiguration = configuration.vendorConfiguration as IOSConfiguration - - return IOSComponentInfo( - iosConfiguration.xctestrunPath, - iosConfiguration.derivedDataDir, - iosConfiguration.sourceRoot, - configuration.name - ) - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSConfiguration.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSConfiguration.kt deleted file mode 100644 index 64a6dad76..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSConfiguration.kt +++ /dev/null @@ -1,44 +0,0 @@ -package com.malinskiy.marathon.ios - -import com.malinskiy.marathon.cache.test.key.ComponentCacheKeyProvider -import com.malinskiy.marathon.device.DeviceFeature -import com.malinskiy.marathon.device.DeviceProvider -import com.malinskiy.marathon.execution.ComponentInfoExtractor -import com.malinskiy.marathon.execution.TestParser -import com.malinskiy.marathon.ios.di.iosModule -import com.malinskiy.marathon.log.MarathonLogConfigurator -import com.malinskiy.marathon.vendor.VendorConfiguration -import org.koin.core.KoinComponent -import org.koin.core.get -import java.io.File - -data class IOSConfiguration( - val derivedDataDir: File, - val xctestrunPath: File, - val remoteUsername: String, - val remotePrivateKey: File, - val knownHostsPath: File?, - val remoteRsyncPath: String, - val debugSsh: Boolean, - val alwaysEraseSimulators: Boolean, - val hideRunnerOutput: Boolean = false, - val compactOutput: Boolean = false, - val keepAliveIntervalMillis: Long = 0L, - val devicesFile: File? = null, - val sourceRoot: File = File(".") -) : VendorConfiguration, KoinComponent { - - override fun testParser(): TestParser? = get() - - override fun deviceProvider(): DeviceProvider? = get() - - override fun componentInfoExtractor(): ComponentInfoExtractor? = get() - - override fun componentCacheKeyProvider(): ComponentCacheKeyProvider? = get() - - override fun logConfigurator(): MarathonLogConfigurator? = IOSLogConfigurator() - - override fun preferableRecorderType(): DeviceFeature? = null - - override fun modules() = listOf(iosModule) -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSDevice.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSDevice.kt deleted file mode 100644 index 97c9a56a8..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSDevice.kt +++ /dev/null @@ -1,387 +0,0 @@ -package com.malinskiy.marathon.ios - - -import com.google.gson.Gson -import com.malinskiy.marathon.analytics.internal.pub.Track -import com.malinskiy.marathon.device.Device -import com.malinskiy.marathon.device.DeviceFeature -import com.malinskiy.marathon.device.DevicePoolId -import com.malinskiy.marathon.device.NetworkState -import com.malinskiy.marathon.device.OperatingSystem -import com.malinskiy.marathon.exceptions.DeviceLostException -import com.malinskiy.marathon.execution.Configuration -import com.malinskiy.marathon.execution.StrictRunChecker -import com.malinskiy.marathon.execution.TestBatchResults -import com.malinskiy.marathon.execution.progress.ProgressReporter -import com.malinskiy.marathon.io.FileManager -import com.malinskiy.marathon.ios.cmd.remote.SshjCommandExecutor -import com.malinskiy.marathon.ios.cmd.remote.SshjCommandUnresponsiveException -import com.malinskiy.marathon.ios.cmd.remote.exec -import com.malinskiy.marathon.ios.cmd.remote.execOrNull -import com.malinskiy.marathon.ios.device.RemoteSimulator -import com.malinskiy.marathon.ios.device.RemoteSimulatorFeatureProvider -import com.malinskiy.marathon.ios.logparser.IOSDeviceLogParser -import com.malinskiy.marathon.ios.logparser.formatter.TestLogPackageNameFormatter -import com.malinskiy.marathon.ios.logparser.parser.DeviceFailureException -import com.malinskiy.marathon.ios.logparser.parser.DeviceFailureReason -import com.malinskiy.marathon.ios.simctl.Simctl -import com.malinskiy.marathon.ios.xctestrun.Xctestrun -import com.malinskiy.marathon.log.MarathonLogging -import com.malinskiy.marathon.test.TestBatch -import com.malinskiy.marathon.time.Timer -import kotlinx.coroutines.CompletableDeferred -import kotlinx.coroutines.CoroutineName -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Job -import kotlinx.coroutines.newFixedThreadPoolContext -import kotlinx.coroutines.withContext -import net.schmizz.sshj.connection.ConnectionException -import net.schmizz.sshj.connection.channel.OpenFailException -import net.schmizz.sshj.transport.TransportException -import java.io.IOException -import java.net.InetAddress -import java.net.UnknownHostException -import java.util.concurrent.TimeoutException -import kotlin.coroutines.CoroutineContext - -class IOSDevice( - val simulator: RemoteSimulator, - connectionAttempt: Int, - configuration: IOSConfiguration, - val gson: Gson, - private val track: Track, - private val healthChangeListener: HealthChangeListener, - private val strictRunChecker: StrictRunChecker, - private val timer: Timer -) : Device, CoroutineScope { - - val udid = simulator.udid - val connectionId = "$udid@${simulator.host}-$connectionAttempt" - private val deviceContext = newFixedThreadPoolContext(1, connectionId) - - override val coroutineContext: CoroutineContext - get() = deviceContext + Job() - - val logger = MarathonLogging.logger(IOSDevice::class.java.simpleName) - - val hostCommandExecutor: SshjCommandExecutor - - val name: String? - private val runtime: String? - private val deviceType: String? - - init { - val hostAddress = simulator.host.toInetAddressOrNull() - if (hostAddress == null) { - deviceContext.close() - throw DeviceFailureException(DeviceFailureReason.UnreachableHost) - } - hostCommandExecutor = try { - SshjCommandExecutor( - connectionId = connectionId, - hostAddress = hostAddress, - remoteUsername = simulator.username ?: configuration.remoteUsername, - remotePrivateKey = configuration.remotePrivateKey, - knownHostsPath = configuration.knownHostsPath, - verbose = configuration.debugSsh - ) - } catch (e: DeviceFailureException) { - deviceContext.close() - throw e - } - - val simctl = Simctl() - val device = try { - simctl.list(this, gson).find { it.udid == udid } - } catch (e: DeviceFailureException) { - dispose() - throw e - } - runtime = device?.runtime - name = device?.name - deviceType = try { - simctl.deviceType(this) - } catch (e: DeviceFailureException) { - dispose() - throw e - } - } - - override val operatingSystem: OperatingSystem - get() = OperatingSystem(runtime ?: "Unknown") - override val serialNumber: String = "$udid@${simulator.host}" - - override val model: String - get() = deviceType ?: "Unknown" - override val manufacturer: String - get() = "Apple" - override val networkState: NetworkState - get() = when (healthy) { - true -> NetworkState.CONNECTED - false -> NetworkState.DISCONNECTED - } - override val deviceFeatures: Collection by lazy { - RemoteSimulatorFeatureProvider.deviceFeatures(this) - } - override var healthy: Boolean = true - private set - override val abi: String - get() = "Simulator" - - var failureReason: DeviceFailureReason? = null - private set - - override suspend fun execute( - configuration: Configuration, - devicePoolId: DevicePoolId, - testBatch: TestBatch, - deferred: CompletableDeferred, - progressReporter: ProgressReporter - ) = withContext(coroutineContext + CoroutineName("execute")) { - val iosConfiguration = configuration.vendorConfiguration as IOSConfiguration - val iosTestJob = testBatch.componentInfo as IOSComponentInfo - val fileManager = FileManager(configuration.outputDir) - - if (iosConfiguration.alwaysEraseSimulators) { - hostCommandExecutor.execOrNull( - "xcrun simctl shutdown $udid", - configuration.testBatchTimeoutMillis, - configuration.testOutputTimeoutMillis - ) - hostCommandExecutor.execOrNull( - "xcrun simctl erase $udid", - configuration.testBatchTimeoutMillis, - configuration.testOutputTimeoutMillis - ) - } - - val remoteXcresultPath = RemoteFileManager.remoteXcresultFile(this@IOSDevice) - val remoteXctestrunFile = RemoteFileManager.remoteXctestrunFile(this@IOSDevice) - val remoteDir = remoteXctestrunFile.parent - - logger.debug("Remote xctestrun = $remoteXctestrunFile") - - val xctestrun = Xctestrun(iosTestJob.xctestrunPath) - val packageNameFormatter = TestLogPackageNameFormatter(xctestrun.productModuleName, xctestrun.targetName) - - logger.debug("Tests = ${testBatch.tests.toList()}") - - val logParser = IOSDeviceLogParser( - this@IOSDevice, - packageNameFormatter, - devicePoolId, - testBatch, - deferred, - progressReporter, - iosConfiguration.hideRunnerOutput, - strictRunChecker, - timer - ) - - val command = - listOf( - "cd '$remoteDir';", - "NSUnbufferedIO=YES", - "xcodebuild test-without-building", - "-xctestrun ${remoteXctestrunFile.path}", - testBatch.toXcodebuildArguments(), - "-destination 'platform=iOS simulator,id=$udid' ;", - "exit" - ) - .joinToString(" ") - .also { logger.debug("\u001b[1m$it\u001b[0m") } - - val exitStatus = try { - hostCommandExecutor.execInto( - command, - configuration.testBatchTimeoutMillis, - configuration.testOutputTimeoutMillis, - logParser::onLine - ) - } catch (e: SshjCommandUnresponsiveException) { - logger.error("No output from remote shell") - disconnectAndThrow(e) - } catch (e: TimeoutException) { - logger.error("Connection timeout") - disconnectAndThrow(e) - } catch (e: ConnectionException) { - logger.error("ConnectionException") - disconnectAndThrow(e) - } catch (e: TransportException) { - logger.error("TransportException") - disconnectAndThrow(e) - } catch (e: OpenFailException) { - logger.error("Unable to open session") - disconnectAndThrow(e) - } catch (e: IllegalStateException) { - logger.error("Unable to start a new SSH session. Client is disconnected") - disconnectAndThrow(e) - } catch (e: DeviceFailureException) { - logger.error("Execution failed because ${e.reason}") - failureReason = e.reason - disconnectAndThrow(e) - } finally { - logParser.close() - - if (!healthy) { - logger.debug("Last log before device termination") - logger.debug(logParser.getLastLog()) - } - - if (logParser.diagnosticLogPaths.isNotEmpty()) - logger.info("Diagnostic logs available at ${logParser.diagnosticLogPaths}") - - if (logParser.sessionResultPaths.isNotEmpty()) - logger.info("Session results available at ${logParser.sessionResultPaths}") - } - - // 70 = no devices - // 65 = ** TEST EXECUTE FAILED **: crash - logger.debug("Finished test batch execution with exit status $exitStatus") - } - - private suspend fun disconnectAndThrow(cause: Throwable) { - healthy = false - healthChangeListener.onDisconnect(this) - throw DeviceLostException(cause) - } - - private var derivedDataManager: DerivedDataManager? = null - override suspend fun prepare(configuration: Configuration) = withContext(coroutineContext + CoroutineName("prepare")) { - val iosConfiguration = configuration.vendorConfiguration as IOSConfiguration - - track.trackDevicePreparing(this@IOSDevice) { - RemoteFileManager.createRemoteDirectory(this@IOSDevice) - - val derivedDataManager = DerivedDataManager(configuration) - - // TODO: should be done before each test execution -// val remoteXctestrunFile = RemoteFileManager.remoteXctestrunFile(this@IOSDevice) -// val xctestrunFile = prepareXctestrunFile(derivedDataManager, remoteXctestrunFile) - -// derivedDataManager.sendSynchronized( -// localPath = xctestrunFile, -// remotePath = remoteXctestrunFile.absolutePath, -// hostName = hostCommandExecutor.hostAddress.hostName, -// port = hostCommandExecutor.port -// ) -// -// derivedDataManager.sendSynchronized( -// localPath = derivedDataManager.productsDir, -// remotePath = RemoteFileManager.remoteDirectory(this@IOSDevice).path, -// hostName = hostCommandExecutor.hostAddress.hostName, -// port = hostCommandExecutor.port -// ) - - this@IOSDevice.derivedDataManager = derivedDataManager - - terminateRunningSimulators() - if (!iosConfiguration.alwaysEraseSimulators) { - try { - hostCommandExecutor.exec( - "xcrun simctl shutdown $udid", - configuration.testBatchTimeoutMillis, - configuration.testOutputTimeoutMillis - ) - } catch (e: Exception) { - logger.warn("Exception shutting down remote simulator $e") - } - try { - hostCommandExecutor.exec( - "xcrun simctl erase $udid", - configuration.testBatchTimeoutMillis, - configuration.testOutputTimeoutMillis - ) - } catch (e: Exception) { - logger.warn("Exception erasing remote simulator $e") - } - } - disableHardwareKeyboard() - } - } - - private fun terminateRunningSimulators() { - val result = hostCommandExecutor.execOrNull("/usr/bin/pkill -9 -l -f '$udid'") - if (result?.exitStatus == 0) { - logger.trace("Terminated loaded simulators") - } else { - logger.debug("Failed to terminate loaded simulators ${result?.stdout}") - } - - val ps = hostCommandExecutor.execOrNull("/bin/ps | /usr/bin/grep '$udid'")?.stdout ?: "" - if (ps.isNotBlank()) { - logger.debug(ps) - } - } - - private fun disableHardwareKeyboard() { - val result = - hostCommandExecutor.execOrNull( - "/usr/libexec/PlistBuddy -c 'Add :DevicePreferences:$udid:ConnectHardwareKeyboard bool false' /Users/master/Library/Preferences/com.apple.iphonesimulator.plist" + - "|| /usr/libexec/PlistBuddy -c 'Set :DevicePreferences:$udid:ConnectHardwareKeyboard false' /Users/master/Library/Preferences/com.apple.iphonesimulator.plist" - ) - if (result?.exitStatus == 0) { - logger.trace("Disabled hardware keyboard") - } else { - logger.debug("Failed to disable hardware keyboard ${result?.stdout}") - } - } - - override fun dispose() { - logger.debug("Disposing device") - try { - hostCommandExecutor.close() - } catch (e: Exception) { - logger.debug("Error disconnecting ssh: $e") - } - - try { - deviceContext.close() - } catch (e: Exception) { - logger.debug("Error closing context: $e") - } - } - - override fun toString(): String { - return "IOSDevice" - } - - private val deviceIdentifier: String - get() = "${hostCommandExecutor.hostAddress.hostAddress}:$udid" - -// private fun prepareXctestrunFile(derivedDataManager: DerivedDataManager, remoteXctestrunFile: File): File { -// val remotePort = RemoteSimulatorFeatureProvider.availablePort(this) -// .also { logger.info("Using TCP port $it on device $deviceIdentifier") } -// -// val xctestrun = Xctestrun(derivedDataManager.xctestrunFile) -// xctestrun.environment("TEST_HTTP_SERVER_PORT", "$remotePort") -// -// return derivedDataManager.xctestrunFile.resolveSibling(remoteXctestrunFile.name) -// .also { it.writeBytes(xctestrun.toXMLByteArray()) } -// } -} - -private const val REACHABILITY_TIMEOUT_MILLIS = 5000 -private fun String.toInetAddressOrNull(): InetAddress? { - val logger = MarathonLogging.logger(IOSDevice::class.java.simpleName) - val address = try { - InetAddress.getByName(this) - } catch (e: UnknownHostException) { - logger.error("Error resolving host $this: $e") - return null - } - return if (try { - address.isReachable(REACHABILITY_TIMEOUT_MILLIS) - } catch (e: IOException) { - logger.error("Error checking reachability of $this: $e") - false - } - ) { - address - } else { - null - } -} - -private fun TestBatch.toXcodebuildArguments(): String = - tests.joinToString(separator = " ") { "-only-testing:\"${it.pkg}/${it.clazz}/${it.method}\"" } diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSDeviceProvider.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSDeviceProvider.kt deleted file mode 100644 index 49774f82c..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSDeviceProvider.kt +++ /dev/null @@ -1,69 +0,0 @@ -package com.malinskiy.marathon.ios - -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.dataformat.yaml.YAMLFactory -import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator -import com.fasterxml.jackson.module.kotlin.KotlinModule -import com.google.gson.GsonBuilder -import com.malinskiy.marathon.actor.unboundedChannel -import com.malinskiy.marathon.analytics.internal.pub.Track -import com.malinskiy.marathon.device.DeviceProvider -import com.malinskiy.marathon.execution.StrictRunChecker -import com.malinskiy.marathon.ios.device.LocalListSimulatorProvider -import com.malinskiy.marathon.ios.device.SimulatorProvider -import com.malinskiy.marathon.ios.simctl.model.SimctlDeviceList -import com.malinskiy.marathon.ios.simctl.model.SimctlDeviceListDeserializer -import com.malinskiy.marathon.log.MarathonLogging -import com.malinskiy.marathon.time.Timer -import com.malinskiy.marathon.vendor.VendorConfiguration -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.channels.Channel -import kotlinx.coroutines.newFixedThreadPoolContext -import kotlinx.coroutines.withContext -import kotlin.coroutines.CoroutineContext - -class IOSDeviceProvider( - private val track: Track, - private val strictRunChecker: StrictRunChecker, - private val timer: Timer -) : DeviceProvider, CoroutineScope { - - private val dispatcher = newFixedThreadPoolContext(1, "IOSDeviceProvider") - override val coroutineContext: CoroutineContext - get() = dispatcher - - private val logger = MarathonLogging.logger(IOSDeviceProvider::class.java.simpleName) - - private var simulatorProvider: SimulatorProvider? = null - - override val deviceInitializationTimeoutMillis: Long = 300_000 - override suspend fun initialize(vendorConfiguration: VendorConfiguration) { - if (vendorConfiguration !is IOSConfiguration) { - throw IllegalStateException("Invalid configuration $vendorConfiguration") - } - - logger.debug("Initializing IOSDeviceProvider") - - val gson = GsonBuilder().registerTypeAdapter(SimctlDeviceList::class.java, SimctlDeviceListDeserializer()) - .create() - - val mapper = ObjectMapper(YAMLFactory().disable(YAMLGenerator.Feature.USE_NATIVE_TYPE_ID)) - .registerModule(KotlinModule()) - - simulatorProvider = - LocalListSimulatorProvider(coroutineContext, channel, vendorConfiguration, mapper, gson, track, strictRunChecker, timer) - simulatorProvider?.start() - } - - override suspend fun terminate() { - withContext(coroutineContext) { - logger.debug { "Terminating IOS device provider" } - simulatorProvider?.stop() - channel.close() - } - dispatcher.close() - } - - private val channel: Channel = unboundedChannel() - override fun subscribe() = channel -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSLogConfigurator.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSLogConfigurator.kt deleted file mode 100644 index 099ae68ce..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSLogConfigurator.kt +++ /dev/null @@ -1,64 +0,0 @@ -package com.malinskiy.marathon.ios - -import ch.qos.logback.classic.Level -import ch.qos.logback.classic.Logger -import ch.qos.logback.classic.LoggerContext -import ch.qos.logback.classic.PatternLayout -import ch.qos.logback.classic.spi.ILoggingEvent -import ch.qos.logback.core.ConsoleAppender -import ch.qos.logback.core.encoder.LayoutWrappingEncoder -import com.malinskiy.marathon.log.MarathonLogConfigurator -import com.malinskiy.marathon.report.timeline.TimelineSummaryProvider -import com.malinskiy.marathon.vendor.VendorConfiguration -import net.schmizz.sshj.DefaultConfig -import net.schmizz.sshj.common.KeyType -import net.schmizz.sshj.transport.kex.Curve25519SHA256 -import net.schmizz.sshj.transport.random.BouncyCastleRandom -import org.slf4j.LoggerFactory - -class IOSLogConfigurator : MarathonLogConfigurator { - override fun configure(vendorConfiguration: VendorConfiguration) { - val iosConfiguration = vendorConfiguration as? IOSConfiguration - - val loggerContext = LoggerFactory.getILoggerFactory() as LoggerContext - - val compactOutput = iosConfiguration?.compactOutput ?: false - val layout = PatternLayout() - layout.pattern = if (compactOutput) { - "%highlight(%.-1level [%thread] <%logger{48}> %msg%n)" - } else { - "%highlight(%.-1level %d{HH:mm:ss.SSS} [%thread] <%logger{40}> %msg%n)" - } - layout.context = loggerContext - layout.start(); - - val encoder = LayoutWrappingEncoder() - encoder.context = loggerContext - encoder.layout = layout - - val consoleAppender = ConsoleAppender() - consoleAppender.isWithJansi = true - consoleAppender.context = loggerContext - consoleAppender.name = "ios-custom-console-appender" - consoleAppender.encoder = encoder - consoleAppender.start() - - val rootLogger = loggerContext.getLogger(Logger.ROOT_LOGGER_NAME) - - // replace the default appenders - rootLogger.detachAndStopAllAppenders() - rootLogger.addAppender(consoleAppender) - - // silence the noise - listOf( - TimelineSummaryProvider::class.java.simpleName, - Curve25519SHA256::class.java.name, - BouncyCastleRandom::class.java.name, - DefaultConfig::class.java.name, - KeyType::class.java.name, - "net.schmizz.sshj.common.ECDSAVariationsAdapter" - ).forEach { - loggerContext.getLogger(it).level = Level.ERROR - } - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSTestParser.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSTestParser.kt deleted file mode 100644 index 2c6e1d321..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/IOSTestParser.kt +++ /dev/null @@ -1,83 +0,0 @@ -package com.malinskiy.marathon.ios - -import com.malinskiy.marathon.execution.ComponentInfo -import com.malinskiy.marathon.execution.TestParser -import com.malinskiy.marathon.ios.xctestrun.Xctestrun -import com.malinskiy.marathon.log.MarathonLogging -import com.malinskiy.marathon.test.Test -import java.io.File - -class IOSTestParser : TestParser { - private val swiftTestClassRegex = """class ([^:\s]+)\s*:\s*XCTestCase""".toRegex() - private val swiftTestMethodRegex = """^.*func\s+(test[^(\s]*)\s*\(.*$""".toRegex() - - private val logger = MarathonLogging.logger(IOSTestParser::class.java.simpleName) - - /** - * Looks up test methods running a text search in swift files. Considers classes that explicitly inherit - * from `XCTestCase` and method names starting with `test`. Scans all swift files found under `sourceRoot` - * specified in Marathonfile. When not specified, starts in working directory. Result excludes any tests - * marked as skipped in `xctestrun` file. - */ - override suspend fun extract(componentInfo: ComponentInfo): List { - val iOsTestJob = componentInfo as? IOSComponentInfo - ?: throw IllegalStateException("Expected IOS component info") - - if (!iOsTestJob.sourceRoot.isDirectory) { - throw IllegalArgumentException("Expected a directory at $iOsTestJob.sourceRoot") - } - - val xctestrun = Xctestrun(iOsTestJob.xctestrunPath) - val targetName = xctestrun.targetName - - val swiftFilesWithTests = iOsTestJob - .sourceRoot - .listFiles("swift") - .filter(swiftTestClassRegex) - - val implementedTests = mutableListOf() - for (file in swiftFilesWithTests) { - var testClassName: String? = null - for (line in file.readLines()) { - val className = line.firstMatchOrNull(swiftTestClassRegex) - val methodName = line.firstMatchOrNull(swiftTestMethodRegex) - - if (className != null) { - testClassName = className - } - - if (testClassName != null && methodName != null) { - implementedTests.add(Test(targetName, testClassName, methodName, emptyList(), componentInfo)) - } - } - } - - val filteredTests = implementedTests.filter { !xctestrun.isSkipped(it) } - - logger.trace { filteredTests.map { "${it.clazz}.${it.method}" }.joinToString() } - logger.info { "Found ${filteredTests.size} tests in ${swiftFilesWithTests.count()} files" } - - return filteredTests - } -} - -private fun Sequence.filter(contentsRegex: Regex): Sequence { - return filter { it.contains(contentsRegex) } -} - -private fun File.listFiles(extension: String): Sequence { - return walkTopDown().filter { it.extension == extension } -} - -private val MatchResult.firstGroup: String? - get() { - return groupValues.get(1) - } - -private fun String.firstMatchOrNull(regex: Regex): String? { - return regex.find(this)?.firstGroup -} - -private fun File.contains(contentsRegex: Regex): Boolean { - return inputStream().bufferedReader().lineSequence().any { it.contains(contentsRegex) } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/RemoteFileManager.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/RemoteFileManager.kt deleted file mode 100644 index ea7e4cfc0..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/RemoteFileManager.kt +++ /dev/null @@ -1,74 +0,0 @@ -package com.malinskiy.marathon.ios - -import com.malinskiy.marathon.ios.cmd.remote.CommandResult -import com.malinskiy.marathon.log.MarathonLogging -import com.malinskiy.marathon.test.Test -import java.io.File -import java.util.* - -object RemoteFileManager { - - private val logger = MarathonLogging.logger(javaClass.simpleName) - - private const val OUTPUT_DIR = "/tmp/marathon" - - fun remoteDirectory(device: IOSDevice): File = File(OUTPUT_DIR) - - fun createRemoteDirectory(device: IOSDevice) { - executeCommand( - device, - """mkdir -p "${remoteDirectory(device)}"""", - "Could not create remote directory ${remoteDirectory(device)}" - ) - } - - fun removeRemoteDirectory(device: IOSDevice) { - executeCommand( - device, - """rm -rf "${remoteDirectory(device)}"""", - "Unable to remove directory ${remoteDirectory(device)}" - ) - } - - fun remoteXctestrunFile(device: IOSDevice): File = remoteFile(device, File(xctestrunFileName(device))) - fun remoteXcresultFile(device: IOSDevice): File = remoteFile(device, File(xcresultFileName(device))) - - private fun xctestrunFileName(device: IOSDevice): String = "${device.udid}.xctestrun" - private fun xcresultFileName(device: IOSDevice): String = "${device.udid}.${UUID.randomUUID().toString().uppercase()}.xcresult" - - private fun remoteFile(device: IOSDevice, file: File): File = remoteDirectory(device = device).resolve(file) - - private fun executeCommand(device: IOSDevice, command: String, errorMessage: String): String? { - var output: CommandResult? = null - try { - output = device.hostCommandExecutor.execBlocking(command) - } catch (e: Exception) { - logger.error(errorMessage, e) - } - - if (output == null || output.exitStatus != 0) { - logger.error(errorMessage) - } - - if (output != null) { - if (output.stderr.isNotEmpty()) { - logger.error(output.stderr) - } - if (output.stdout.isNotEmpty()) { - logger.info(output.stdout) - return output.stdout - } - } - return null - } - - fun remoteVideoForTest(test: Test): String { - return remoteFileForTest(videoFileName(test)) - } - - private fun remoteFileForTest(filename: String): String { - return "$OUTPUT_DIR/$filename" - } - - private fun videoFileName(test: Test): String = "${test.pkg}-${test.clazz}-${test.method}.mp4" -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/CommandExecutor.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/CommandExecutor.kt deleted file mode 100644 index 4e86eb1fa..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/CommandExecutor.kt +++ /dev/null @@ -1,49 +0,0 @@ -package com.malinskiy.marathon.ios.cmd.remote - -import com.malinskiy.marathon.log.MarathonLogging -import java.io.Closeable - -interface CommandExecutor : Closeable { - companion object { - val DEFAULT_SSH_CONNECTION_TIMEOUT_MILLIS: Long - get() = 900000L - val DEFAULT_SSH_NO_OUTPUT_TIMEOUT_MILLIS: Long - get() = 45000L - } - - fun startSession(command: String): CommandSession - - fun execBlocking( - command: String, - maxExecutionDurationMillis: Long = DEFAULT_SSH_CONNECTION_TIMEOUT_MILLIS, - testOutputTimeoutMillis: Long = DEFAULT_SSH_NO_OUTPUT_TIMEOUT_MILLIS - ): CommandResult - - suspend fun execInto( - command: String, - maxExecutionDurationMillis: Long = DEFAULT_SSH_CONNECTION_TIMEOUT_MILLIS, - testOutputTimeoutMillis: Long = DEFAULT_SSH_NO_OUTPUT_TIMEOUT_MILLIS, - onLine: (String) -> Unit - ): Int? -} - -suspend fun CommandExecutor.exec( - command: String, - maxExecutionDurationMillis: Long = CommandExecutor.DEFAULT_SSH_CONNECTION_TIMEOUT_MILLIS, - testOutputTimeoutMillis: Long = CommandExecutor.DEFAULT_SSH_NO_OUTPUT_TIMEOUT_MILLIS -) { - execInto(command, maxExecutionDurationMillis, testOutputTimeoutMillis) { } -} - -fun CommandExecutor.execOrNull( - command: String, - maxExecutionDurationMillis: Long = CommandExecutor.DEFAULT_SSH_CONNECTION_TIMEOUT_MILLIS, - testOutputTimeoutMillis: Long = CommandExecutor.DEFAULT_SSH_NO_OUTPUT_TIMEOUT_MILLIS -): CommandResult? = - try { - execBlocking(command, maxExecutionDurationMillis, testOutputTimeoutMillis) - } catch (e: Exception) { - MarathonLogging.logger(this::class.java.simpleName).warn("Exception caught executing $command: $e"); - null - } - diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/CommandResult.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/CommandResult.kt deleted file mode 100644 index 398153364..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/CommandResult.kt +++ /dev/null @@ -1,4 +0,0 @@ -package com.malinskiy.marathon.ios.cmd.remote - -data class CommandResult(val stdout: String, val stderr: String, val exitStatus: Int) - diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/CommandSession.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/CommandSession.kt deleted file mode 100644 index 60c12feb4..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/CommandSession.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.malinskiy.marathon.ios.cmd.remote - -import java.io.Closeable -import java.io.InputStream -import java.io.OutputStream - -interface CommandSession : Closeable { - val inputStream: InputStream - val errorStream: InputStream - val outputStream: OutputStream - - fun kill() - - val isEOF: Boolean - val isOpen: Boolean - - val exitStatus: Int? -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandException.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandException.kt deleted file mode 100644 index 1b386694c..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandException.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.malinskiy.marathon.ios.cmd.remote - -class SshjCommandException : RuntimeException { - constructor(cause: Throwable) : super(cause) - constructor(message: String) : super(message) -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandExecutor.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandExecutor.kt deleted file mode 100644 index a07ece26a..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandExecutor.kt +++ /dev/null @@ -1,271 +0,0 @@ -package com.malinskiy.marathon.ios.cmd.remote - -import ch.qos.logback.classic.Level -import com.malinskiy.marathon.ios.logparser.parser.DeviceFailureException -import com.malinskiy.marathon.ios.logparser.parser.DeviceFailureReason -import com.malinskiy.marathon.log.MarathonLogging -import kotlinx.coroutines.CoroutineName -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.TimeoutCancellationException -import kotlinx.coroutines.async -import kotlinx.coroutines.awaitAll -import kotlinx.coroutines.delay -import kotlinx.coroutines.isActive -import kotlinx.coroutines.newSingleThreadContext -import kotlinx.coroutines.runBlocking -import kotlinx.coroutines.withContext -import kotlinx.coroutines.withTimeout -import net.schmizz.keepalive.KeepAlive -import net.schmizz.keepalive.KeepAliveProvider -import net.schmizz.sshj.DefaultConfig -import net.schmizz.sshj.SSHClient -import net.schmizz.sshj.common.LoggerFactory -import net.schmizz.sshj.connection.ConnectionException -import net.schmizz.sshj.connection.ConnectionImpl -import net.schmizz.sshj.transport.TransportException -import org.slf4j.Logger -import java.io.File -import java.io.IOException -import java.io.InputStream -import java.net.ConnectException -import java.net.InetAddress -import java.util.concurrent.TimeoutException -import kotlin.coroutines.CoroutineContext -import kotlin.math.min - -private const val DEFAULT_PORT = 22 -private const val SLEEP_DURATION_MILLIS = 15L - -class SshjCommandExecutor( - connectionId: String, - val hostAddress: InetAddress, - val remoteUsername: String, - val remotePrivateKey: File, - val port: Int = DEFAULT_PORT, - val knownHostsPath: File? = null, - keepAliveIntervalMillis: Long = 0L, - verbose: Boolean = false -) : CommandExecutor, CoroutineScope { - - private val dispatcher = newSingleThreadContext("$connectionId-ssh") - override val coroutineContext: CoroutineContext - get() = dispatcher - private val ssh: SSHClient - - init { - val config = DefaultConfig() - val loggerFactory = object : LoggerFactory { - override fun getLogger(clazz: Class<*>?): Logger { - val name = clazz?.simpleName ?: SshjCommandExecutor::class.java.simpleName - return MarathonLogging.logger( - name = name, - level = if (verbose) { - Level.DEBUG - } else { - Level.ERROR - } - ) - } - - override fun getLogger(name: String?): Logger = MarathonLogging.logger( - name = name ?: "", - level = if (verbose) { - Level.DEBUG - } else { - Level.ERROR - } - ) - } - config.loggerFactory = loggerFactory - if (keepAliveIntervalMillis > 0) { - config.keepAliveProvider = object : KeepAliveProvider() { - override fun provide(connection: ConnectionImpl): KeepAlive { - return SshjCommandKeepAlive(connection, hostAddress.toString()) - } - }; - } - - try { - ssh = SSHClient(config) - if (keepAliveIntervalMillis > 0) { - ssh.connection.keepAlive.keepAliveInterval = (keepAliveIntervalMillis / 1000).toInt() - } - knownHostsPath?.let { ssh.loadKnownHosts(it) } - ssh.loadKnownHosts() - val keys = ssh.loadKeys(remotePrivateKey.path) - ssh.connect(hostAddress, port) - ssh.authPublickey(remoteUsername, keys) - } catch (e: TransportException) { - throw DeviceFailureException(DeviceFailureReason.Unknown, e) - } catch (e: ConnectException) { - throw DeviceFailureException(DeviceFailureReason.Unknown, e) - } - } - - private val logger by lazy { - MarathonLogging.logger(SshjCommandExecutor::class.java.simpleName) - } - - override fun startSession(command: String): CommandSession = SshjCommandSession(command, ssh) - - override fun close() { - dispatcher.use { - try { - if (ssh.isConnected) { - ssh.disconnect() - } - } catch (e: IOException) { - logger.warn("Error disconnecting $e") - } - } - } - - private class OutputTimeoutException : RuntimeException() - - private suspend fun exec( - inContext: CoroutineContext, - command: String, - maxExecutionDurationMillis: Long, - testOutputTimeoutMillis: Long, - onLine: (String) -> Unit - ): Int? = withContext(context = inContext) { - val session = try { - startSession(command) - } catch (e: ConnectionException) { - logger.error("Unable to start a remote shell session $command") - throw DeviceFailureException(DeviceFailureReason.Unknown, e) - } catch (e: TransportException) { - logger.error("Error starting a remote shell session $command") - throw DeviceFailureException(DeviceFailureReason.Unknown, e) - } - - val startTime = System.currentTimeMillis() - logger.trace("Execution starts at ${startTime}ms") - logger.trace(command) - - try { - val executionTimeout = if (maxExecutionDurationMillis == 0L) Long.MAX_VALUE else maxExecutionDurationMillis - withTimeout(executionTimeout) { - - val timeoutWaiter = SshjCommandOutputWaiterImpl(testOutputTimeoutMillis, SLEEP_DURATION_MILLIS) - val isSessionReadable = { session.isOpen and !session.isEOF } - - awaitAll( - async(CoroutineName("stdout reader")) { - readLines(session.inputStream, - isSessionReadable, - { - timeoutWaiter.update() - onLine(it) - } - ) - }, - async(CoroutineName("stderr reader")) { - readLines(session.errorStream, - isSessionReadable, - { - timeoutWaiter.update() - onLine(it) - } - ) - }, - async(CoroutineName("Timeout waiter")) { - while (isActive and isSessionReadable()) { - if (timeoutWaiter.isExpired) { - throw OutputTimeoutException() - } - timeoutWaiter.wait() - } - } - ) - } - } catch (e: TimeoutCancellationException) { - try { - session.kill() - } catch (e: TransportException) { - } - - throw TimeoutException(e.message) - } catch (e: OutputTimeoutException) { - try { - session.kill() - } catch (e: TransportException) { - } - - throw SshjCommandUnresponsiveException("Remote command \n\u001b[1m$command\u001b[0mdid not send any output over ${testOutputTimeoutMillis}ms") - } finally { - try { - session.close() - } catch (e: IOException) { - } catch (e: TransportException) { - } catch (e: ConnectionException) { - } - } - logger.trace("Execution completed after ${System.currentTimeMillis() - startTime}ms") - session.exitStatus - } - - private suspend fun readLines(inputStream: InputStream, canRead: () -> Boolean, onLine: (String) -> Unit) { - SshjCommandOutputLineBuffer(onLine).use { lineBuffer -> - val byteArray = ByteArray(16384) - while (isActive) { - val available = inputStream.available() - // available value is expected to indicate an estimated number of bytes - // that can be read without blocking (actual count may be smaller). - // - // when requesting a zero length, reading from sshj's [ChannelInputStream] - // blocks. to accurately handle no output timeout, check if session has - // received EOF. - // - val count = when { - available > 0 -> inputStream.read(byteArray, 0, min(available, byteArray.size)) - else -> 0 - } - // if there was nothing to read - if (count == 0) { - // if session received EOF or has been closed, reading stops - if (!canRead()) { - logger.trace("Remote command output completed") - break - } - // sleep for a moment - delay(SLEEP_DURATION_MILLIS) - } else { - lineBuffer.append(byteArray, count) - } - - // immediately send any full lines for parsing - lineBuffer.flush() - } - } - } - - override suspend fun execInto( - command: String, - maxExecutionDurationMillis: Long, - testOutputTimeoutMillis: Long, - onLine: (String) -> Unit - ): Int? = - exec( - coroutineContext, - command, - maxExecutionDurationMillis, - testOutputTimeoutMillis, - onLine - ) - - override fun execBlocking( - command: String, - maxExecutionDurationMillis: Long, - testOutputTimeoutMillis: Long - ): CommandResult = runBlocking(coroutineContext + CoroutineName("execBlocking")) { - val lines = arrayListOf() - val exitStatus = exec( - coroutineContext, - command, - maxExecutionDurationMillis, - testOutputTimeoutMillis - ) { lines.add(it) } - CommandResult(lines.joinToString("\n"), "", exitStatus ?: 1) - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandKeepAlive.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandKeepAlive.kt deleted file mode 100644 index bf4a7806d..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandKeepAlive.kt +++ /dev/null @@ -1,50 +0,0 @@ -package com.malinskiy.marathon.ios.cmd.remote - -import net.schmizz.concurrent.Promise -import net.schmizz.keepalive.KeepAlive -import net.schmizz.sshj.common.DisconnectReason -import net.schmizz.sshj.common.SSHPacket -import net.schmizz.sshj.connection.ConnectionException -import net.schmizz.sshj.connection.ConnectionImpl -import net.schmizz.sshj.transport.TransportException -import java.util.* - -class SshjCommandKeepAlive(conn: ConnectionImpl, hostname: String) : KeepAlive(conn, "$hostname keep-alive") { - - /** The max number of keep-alives that should be unanswered before killing the connection. */ - @get:Synchronized - @set:Synchronized - var maxAliveCount = 5 - - /** The queue of promises. */ - private val queue = LinkedList>() - - @Throws(TransportException::class, ConnectionException::class) - override fun doKeepAlive() { - // Ensure the service is set... This means that the key exchange is done and the connection is up. - if (conn == conn.transport.service) { - emptyQueue(queue) - checkMaxReached(queue) - queue.add(conn.sendGlobalRequest("keepalive@openssh.com", true, ByteArray(0))) - } - } - - @Throws(ConnectionException::class) - private fun checkMaxReached(queue: Queue>) { - if (queue.size >= maxAliveCount) { - throw ConnectionException( - DisconnectReason.CONNECTION_LOST, - java.lang.String.format("Did not receive any keep-alive response for %s seconds", maxAliveCount * keepAliveInterval) - ) - } - } - - private fun emptyQueue(queue: Queue>) { - var peek: Promise? = queue.peek() - while (peek != null && peek.isFulfilled) { - log.debug("Received response from server to our keep-alive.") - queue.remove() - peek = queue.peek() - } - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputLineBuffer.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputLineBuffer.kt deleted file mode 100644 index 96880af80..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputLineBuffer.kt +++ /dev/null @@ -1,63 +0,0 @@ -package com.malinskiy.marathon.ios.cmd.remote - -import java.io.Closeable - -class SshjCommandOutputLineBuffer(private val onLine: (String) -> Unit) : Closeable { - private val stringBuffer = StringBuffer(16384) - - fun append(bytes: ByteArray) = append(bytes, bytes.size) - - fun append(bytes: ByteArray, count: Int) = stringBuffer.append(String(bytes, 0, count)) - - - fun flush() { - val lines = arrayListOf() - synchronized(stringBuffer) { - stringBuffer.normalizeEOL() - while (stringBuffer.isNotEmpty() && stringBuffer.contains('\n')) { - val line = stringBuffer.takeWhile { it != '\n' } - stringBuffer.deleteWhile { it != '\n' }.deleteCharAt(0) - lines.add(line.toString()) - } - } - lines.forEach(onLine) - } - - fun drain() { - // ensure the last line will be flushed - synchronized(stringBuffer) { - if (stringBuffer.isNotEmpty()) { - val last = stringBuffer.last() - if (last != '\r' && last != '\n') { - stringBuffer.append('\n') - } - } - } - flush() - } - - override fun close() = drain() -} - -private fun StringBuffer.deleteWhile(predicate: (Char) -> Boolean): StringBuffer { - while (this.isNotEmpty() && predicate(this.first())) { - this.deleteCharAt(0) - } - return this -} - -// replaces both \r and \r\n with a single \n -private fun StringBuffer.normalizeEOL(): StringBuffer { - var index = 0 - while (index < length) { - if (index + 1 < length && get(index) == '\r' && get(index + 1) == '\n') { - deleteCharAt(index) - } else { - if (get(index) == '\r') { - setCharAt(index, '\n') - } - index++ - } - } - return this -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputWaiter.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputWaiter.kt deleted file mode 100644 index d02537c60..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputWaiter.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.malinskiy.marathon.ios.cmd.remote - -interface SshjCommandOutputWaiter { - fun update() - val isExpired: Boolean - suspend fun wait() -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputWaiterImpl.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputWaiterImpl.kt deleted file mode 100644 index 13aadd1d5..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputWaiterImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -package com.malinskiy.marathon.ios.cmd.remote - -import kotlinx.coroutines.delay - -class SshjCommandOutputWaiterImpl( - private val testOutputTimeoutMillis: Long, - private val sleepDurationMillis: Long -) : SshjCommandOutputWaiter { - - private var lastOutputTimeMillis = System.currentTimeMillis() - - override fun update() { - lastOutputTimeMillis = System.currentTimeMillis() - } - - override val isExpired: Boolean - get() { - if (testOutputTimeoutMillis > 0) { - val timeSinceLastOutputMillis = System.currentTimeMillis() - lastOutputTimeMillis - if (timeSinceLastOutputMillis > testOutputTimeoutMillis) { - return true - } - } - return false - } - - override suspend fun wait() { - delay(sleepDurationMillis) - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandSession.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandSession.kt deleted file mode 100644 index f66859d85..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandSession.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.malinskiy.marathon.ios.cmd.remote - -import net.schmizz.sshj.SSHClient -import net.schmizz.sshj.connection.channel.direct.Signal -import java.io.InputStream -import java.io.OutputStream - -class SshjCommandSession(executableLine: String, ssh: SSHClient) : CommandSession { - private val session = ssh.startSession() - private val command = session.exec(executableLine) - - override val inputStream: InputStream - get() = command.inputStream - override val errorStream: InputStream - get() = command.errorStream - override val outputStream: OutputStream - get() = command.outputStream - - override val isEOF: Boolean - get() = command.isEOF - - override val isOpen: Boolean - get() = command.isOpen - - override fun kill() { - command.signal(Signal.TERM) - } - - override fun close() { - command.close() - } - - override val exitStatus: Int? - get() = command.exitStatus -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandUnresponsiveException.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandUnresponsiveException.kt deleted file mode 100644 index 21a2d3bc4..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandUnresponsiveException.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.malinskiy.marathon.ios.cmd.remote - -class SshjCommandUnresponsiveException(override val message: String? = null) : Exception(message) { -} - - diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/LocalListSimulatorProvider.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/LocalListSimulatorProvider.kt deleted file mode 100644 index ee00e7b81..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/LocalListSimulatorProvider.kt +++ /dev/null @@ -1,161 +0,0 @@ -package com.malinskiy.marathon.ios.device - -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.module.kotlin.readValue -import com.google.gson.Gson -import com.malinskiy.marathon.analytics.internal.pub.Track -import com.malinskiy.marathon.device.DeviceProvider -import com.malinskiy.marathon.execution.StrictRunChecker -import com.malinskiy.marathon.ios.HealthChangeListener -import com.malinskiy.marathon.ios.IOSConfiguration -import com.malinskiy.marathon.ios.IOSDevice -import com.malinskiy.marathon.ios.logparser.parser.DeviceFailureException -import com.malinskiy.marathon.ios.logparser.parser.DeviceFailureReason -import com.malinskiy.marathon.log.MarathonLogging -import com.malinskiy.marathon.time.Timer -import kotlinx.coroutines.CoroutineName -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Job -import kotlinx.coroutines.async -import kotlinx.coroutines.channels.Channel -import kotlinx.coroutines.delay -import kotlinx.coroutines.isActive -import kotlinx.coroutines.joinAll -import kotlinx.coroutines.launch -import kotlinx.coroutines.withContext -import org.apache.commons.text.StringSubstitutor -import org.apache.commons.text.lookup.StringLookupFactory -import java.io.File -import java.util.concurrent.ConcurrentHashMap -import kotlin.coroutines.CoroutineContext - -private const val MAX_CONNECTION_ATTEMPTS = 16 - -class LocalListSimulatorProvider( - override val coroutineContext: CoroutineContext, - private val channel: Channel, - private val configuration: IOSConfiguration, - yamlObjectMapper: ObjectMapper, - private val gson: Gson, - private val track: Track, - private val strictRunChecker: StrictRunChecker, - private val timer: Timer -) : SimulatorProvider, HealthChangeListener, CoroutineScope { - - private val job = Job() - - private val logger = MarathonLogging.logger(LocalListSimulatorProvider::class.java.simpleName) - - private val simulators: List - private val devices = ConcurrentHashMap() - private val environmentVariableSubstitutor = StringSubstitutor(StringLookupFactory.INSTANCE.environmentVariableStringLookup()) - - - init { - val file = configuration.devicesFile ?: File(System.getProperty("user.dir"), "Marathondevices") - val devicesWithEnvironmentVariablesReplaced = environmentVariableSubstitutor.replace(file.readText()) - val configuredSimulators: List? = yamlObjectMapper.readValue(devicesWithEnvironmentVariablesReplaced) - simulators = configuredSimulators ?: emptyList() - } - - override suspend fun start() = withContext(coroutineContext) { - logger.info("starts providing ${simulators.count()} simulator devices") - val jobs = simulators.map { - async(context = coroutineContext) { - createDevice(it, RemoteSimulatorConnectionCounter.putAndGet(it.udid))?.let { connect(it) } - } - }.joinAll() - } - - override suspend fun stop() = withContext(coroutineContext) { - logger.info("stops providing anything") - if (logger.isDebugEnabled) { - // print out final summary on attempted simulator connections - printFailingSimulatorSummary() - } - devices.values.forEach { - dispose(it) - logger.debug("Disposed device ${it.udid}") - } - devices.clear() - } - - override suspend fun onDisconnect(device: IOSDevice) = withContext(coroutineContext + CoroutineName("onDisconnect")) { - launch(context = coroutineContext + job + CoroutineName("disconnector")) { - try { - if (devices.remove(device.serialNumber, device)) { - dispose(device) - - notifyDisconnected(device) - } - } catch (e: Exception) { - logger.debug("Exception removing device ${device.udid}") - } - } - - if (device.failureReason == DeviceFailureReason.InvalidSimulatorIdentifier) { - logger.error("device ${device.udid} does not exist on remote host") - } else if (RemoteSimulatorConnectionCounter.get(device.udid) < MAX_CONNECTION_ATTEMPTS) { - launch(context = coroutineContext + job + CoroutineName("reconnector")) { - delay(499) - if (isActive) { - createDevice( - device.simulator, - RemoteSimulatorConnectionCounter.putAndGet(device.udid) - )?.let { - connect(it) - } - } - } - } - } - - private fun dispose(device: IOSDevice) { - device.dispose() - } - - private fun connect(device: IOSDevice) { - devices.put(device.serialNumber, device) - ?.let { - logger.error("replaced existing device $it with new $device.") - dispose(it) - } - notifyConnected(device) - } - - private fun notifyConnected(device: IOSDevice) = launch(context = coroutineContext) { - channel.send(element = DeviceProvider.DeviceEvent.DeviceConnected(device)) - } - - private fun notifyDisconnected(device: IOSDevice) = launch(context = coroutineContext) { - channel.send(element = DeviceProvider.DeviceEvent.DeviceDisconnected(device)) - } - - // occasionally, device constructor would throw an exception when remote simctl command - // fails with message that simulator services to be no longer available - private fun createDevice(simulator: RemoteSimulator, connectionAttempt: Int): IOSDevice? = try { - IOSDevice( - simulator = simulator, - connectionAttempt = connectionAttempt, - configuration = configuration, - gson = gson, - healthChangeListener = this, - track = track, - strictRunChecker = strictRunChecker, - timer = timer - ) - } catch (e: DeviceFailureException) { - logger.error("Failed to initialize ${simulator.udid}-$connectionAttempt with reason ${e.reason}: ${e.message}") - null - } - - private fun printFailingSimulatorSummary() { - simulators - .map { "${it.udid}@${it.host}" to (RemoteSimulatorConnectionCounter.get(it.udid) - 1) } - .filter { it.second > 0 } - .sortedByDescending { it.second } - .forEach { - logger.debug(String.format("%3d %s", it.second, it.first)) - } - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/RemoteSimulator.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/RemoteSimulator.kt deleted file mode 100644 index 3975187ac..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/RemoteSimulator.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.malinskiy.marathon.ios.device - -data class RemoteSimulator(val host: String, val udid: String, val username: String?) diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/RemoteSimulatorConnectionCounter.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/RemoteSimulatorConnectionCounter.kt deleted file mode 100644 index f2183995c..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/RemoteSimulatorConnectionCounter.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.malinskiy.marathon.ios.device - -import java.util.* - -object RemoteSimulatorConnectionCounter { - private val udids = Collections.synchronizedList(mutableListOf()) - - fun get(udid: String): Int = udids.count { it == udid } - - fun putAndGet(udid: String): Int { - udids.add(udid) - return get(udid) - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/RemoteSimulatorFeatureProvider.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/RemoteSimulatorFeatureProvider.kt deleted file mode 100644 index 0e7f06ae1..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/RemoteSimulatorFeatureProvider.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.malinskiy.marathon.ios.device - -import com.malinskiy.marathon.device.DeviceFeature -import com.malinskiy.marathon.ios.IOSDevice -import com.malinskiy.marathon.ios.cmd.remote.SshjCommandException - -object RemoteSimulatorFeatureProvider { - fun deviceFeatures(device: IOSDevice): Collection { - return enumValues().filter { featureIsAvailable(device, it) } - } - - private fun featureIsAvailable(device: IOSDevice, feature: DeviceFeature): Boolean = when (feature) { - DeviceFeature.SCREENSHOT -> true - DeviceFeature.VIDEO -> { - device.hostCommandExecutor.execBlocking( - "/usr/sbin/system_profiler -detailLevel mini -xml SPDisplaysDataType" - ).let { - it.exitStatus == 0 - && it.stdout.contains("spdisplays_metalfeatureset") - } - } - } - - fun availablePort(device: IOSDevice): Int { - val commandResult = device.hostCommandExecutor.execBlocking( - """ruby -e 'require "socket"; puts Addrinfo.tcp("", 0).bind {|s| s.local_address.ip_port }'""" - ) - return when { - commandResult.exitStatus == 0 -> commandResult.stdout.trim().toIntOrNull() - else -> null - } ?: throw SshjCommandException(commandResult.stdout) - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/SimulatorProvider.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/SimulatorProvider.kt deleted file mode 100644 index 9643fc390..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/device/SimulatorProvider.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.malinskiy.marathon.ios.device - -interface SimulatorProvider { - suspend fun start() - suspend fun stop() -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/di/Modules.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/di/Modules.kt deleted file mode 100644 index 4d5f2d1d4..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/di/Modules.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.malinskiy.marathon.ios.di - -import com.malinskiy.marathon.device.DeviceProvider -import com.malinskiy.marathon.execution.ComponentInfoExtractor -import com.malinskiy.marathon.execution.TestParser -import com.malinskiy.marathon.ios.IOSComponentInfoExtractor -import com.malinskiy.marathon.ios.IOSDeviceProvider -import com.malinskiy.marathon.ios.IOSTestParser -import org.koin.dsl.module - -val iosModule = module { - single { IOSDeviceProvider(get(), get(), get()) } - single { IOSTestParser() } - single { IOSComponentInfoExtractor() } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/IOSDeviceLogParser.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/IOSDeviceLogParser.kt deleted file mode 100644 index 9b22322ee..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/IOSDeviceLogParser.kt +++ /dev/null @@ -1,83 +0,0 @@ -package com.malinskiy.marathon.ios.logparser - -import com.malinskiy.marathon.device.Device -import com.malinskiy.marathon.device.DevicePoolId -import com.malinskiy.marathon.execution.StrictRunChecker -import com.malinskiy.marathon.execution.TestBatchResults -import com.malinskiy.marathon.execution.progress.ProgressReporter -import com.malinskiy.marathon.ios.logparser.formatter.PackageNameFormatter -import com.malinskiy.marathon.ios.logparser.listener.ProgressReportingListener -import com.malinskiy.marathon.ios.logparser.listener.TestLogListener -import com.malinskiy.marathon.ios.logparser.parser.CompositeLogParser -import com.malinskiy.marathon.ios.logparser.parser.DebugLogPrinter -import com.malinskiy.marathon.ios.logparser.parser.DeviceFailureParser -import com.malinskiy.marathon.ios.logparser.parser.DiagnosticLogsPathFinder -import com.malinskiy.marathon.ios.logparser.parser.SessionResultsPathFinder -import com.malinskiy.marathon.ios.logparser.parser.TestRunProgressParser -import com.malinskiy.marathon.test.TestBatch -import com.malinskiy.marathon.time.Timer -import kotlinx.coroutines.CompletableDeferred - -class IOSDeviceLogParser( - device: Device, - packageNameFormatter: PackageNameFormatter, - poolId: DevicePoolId, - testBatch: TestBatch, - deferredResults: CompletableDeferred, - progressReporter: ProgressReporter, - hideRunnerOutput: Boolean, - strictRunChecker: StrictRunChecker, - val timer: Timer -) : StreamingLogParser { - - private val underlyingLogParser: StreamingLogParser - private val testLogListener: TestLogListener - private val diagnosticLogsPathFinder: DiagnosticLogsPathFinder - private val sessionResultsPathFinder: SessionResultsPathFinder - - init { - testLogListener = TestLogListener() - diagnosticLogsPathFinder = DiagnosticLogsPathFinder() - sessionResultsPathFinder = SessionResultsPathFinder() - underlyingLogParser = CompositeLogParser( - listOf( - //Order matters here: first grab the log with log listener, - //then use this log to insert into the test report - testLogListener, - DeviceFailureParser(), - diagnosticLogsPathFinder, - sessionResultsPathFinder, - TestRunProgressParser( - timer, - packageNameFormatter, - testBatch.componentInfo, - listOf( - ProgressReportingListener( - device = device, - poolId = poolId, - testBatch = testBatch, - deferredResults = deferredResults, - progressReporter = progressReporter, - testLogListener = testLogListener, - timer = timer, - strictRunChecker = strictRunChecker - ), - testLogListener - ) - ), - DebugLogPrinter(hideRunnerOutput = hideRunnerOutput) - ) - ) - } - - val diagnosticLogPaths: Collection - get() = diagnosticLogsPathFinder.diagnosticLogPaths - val sessionResultPaths: Collection - get() = sessionResultsPathFinder.resultPaths - - fun getLastLog(): String = testLogListener.getLastLog() - - override fun close() = underlyingLogParser.close() - - override fun onLine(line: String) = underlyingLogParser.onLine(line) -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/StreamingLogParser.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/StreamingLogParser.kt deleted file mode 100644 index 9c5d30db3..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/StreamingLogParser.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.malinskiy.marathon.ios.logparser - -interface StreamingLogParser { - fun onLine(line: String) - - fun close() -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/formatter/PackageNameFormatter.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/formatter/PackageNameFormatter.kt deleted file mode 100644 index 918134d0c..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/formatter/PackageNameFormatter.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.malinskiy.marathon.ios.logparser.formatter - -interface PackageNameFormatter { - fun format(name: String?): String? -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/formatter/TestLogPackageNameFormatter.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/formatter/TestLogPackageNameFormatter.kt deleted file mode 100644 index 24582d3c9..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/formatter/TestLogPackageNameFormatter.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.malinskiy.marathon.ios.logparser.formatter - -/** - * When applied, replaces module name reported in xcodebuild log with testing target name in order - * to unify test representation. - */ -class TestLogPackageNameFormatter( - private val productModuleName: String, - private val targetName: String -) : PackageNameFormatter { - override fun format(name: String?): String? { - return name?.replace(productModuleName, targetName) - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/ProgressReportingListener.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/ProgressReportingListener.kt deleted file mode 100644 index 8565c78e7..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/ProgressReportingListener.kt +++ /dev/null @@ -1,96 +0,0 @@ -package com.malinskiy.marathon.ios.logparser.listener - -import com.malinskiy.marathon.device.Device -import com.malinskiy.marathon.device.DevicePoolId -import com.malinskiy.marathon.device.toDeviceInfo -import com.malinskiy.marathon.execution.StrictRunChecker -import com.malinskiy.marathon.execution.TestBatchResults -import com.malinskiy.marathon.execution.TestResult -import com.malinskiy.marathon.execution.TestStatus -import com.malinskiy.marathon.execution.progress.ProgressReporter -import com.malinskiy.marathon.test.Test -import com.malinskiy.marathon.test.TestBatch -import com.malinskiy.marathon.test.toSafeTestName -import com.malinskiy.marathon.time.Timer -import kotlinx.coroutines.CompletableDeferred - -class ProgressReportingListener( - private val device: Device, - private val poolId: DevicePoolId, - private val testBatch: TestBatch, - private val deferredResults: CompletableDeferred, - private val progressReporter: ProgressReporter, - private val testLogListener: TestLogListener, - private val strictRunChecker: StrictRunChecker, - private val timer: Timer -) : TestRunListener { - - private val success: MutableList = mutableListOf() - private val failure: MutableList = mutableListOf() - - override fun batchFinished() { - val received = (success + failure) - val receivedTestNames = received.map { it.test.toSafeTestName() }.toHashSet() - - val uncompleted = testBatch.tests.filter { - !receivedTestNames.contains(it.toSafeTestName()) - }.createUncompletedTestResults(received) - - deferredResults.complete(TestBatchResults(testBatch.id, device, testBatch.componentInfo, success, failure, uncompleted)) - } - - private fun List.createUncompletedTestResults(received: Collection): Collection { - val lastCompletedTestEndTime = received.maxByOrNull { it.endTime }?.endTime ?: timer.currentTimeMillis() - return map { - TestResult( - test = it, - device = device.toDeviceInfo(), - status = TestStatus.FAILURE, - startTime = lastCompletedTestEndTime, - endTime = lastCompletedTestEndTime, - batchId = testBatch.id, - isStrictRun = strictRunChecker.isStrictRun(it), - isFromCache = false, - stacktrace = testLogListener.getLastLog() - ) - } - } - - override fun testFailed(test: Test, startTime: Long, endTime: Long) { - progressReporter.testFailed(poolId, device.toDeviceInfo(), test) - failure.add( - TestResult( - test, - device.toDeviceInfo(), - TestStatus.FAILURE, - startTime, - endTime, - testBatch.id, - strictRunChecker.isStrictRun(test), - false, - testLogListener.getLastLog() - ) - ) - } - - override fun testPassed(test: Test, startTime: Long, endTime: Long) { - progressReporter.testPassed(poolId, device.toDeviceInfo(), test) - success.add( - TestResult( - test, - device.toDeviceInfo(), - TestStatus.PASSED, - startTime, - endTime, - testBatch.id, - strictRunChecker.isStrictRun(test), - false, - testLogListener.getLastLog() - ) - ) - } - - override fun testStarted(test: Test) { - progressReporter.testStarted(poolId, device.toDeviceInfo(), test) - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/ScreenRecordingListener.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/ScreenRecordingListener.kt deleted file mode 100644 index 41301fcc4..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/ScreenRecordingListener.kt +++ /dev/null @@ -1,43 +0,0 @@ -package com.malinskiy.marathon.ios.logparser.listener - -import com.malinskiy.marathon.device.DevicePoolId -import com.malinskiy.marathon.io.FileManager -import com.malinskiy.marathon.ios.IOSDevice -import com.malinskiy.marathon.ios.recording.ScreenRecorder -import com.malinskiy.marathon.log.MarathonLogging -import com.malinskiy.marathon.test.Test - -class ScreenRecordingListener( - private val fileManager: FileManager, - private val pool: DevicePoolId, - private val device: IOSDevice -) : TestRunListener { - - private val logger = MarathonLogging.logger(ScreenRecordingListener::class.java.simpleName) - - private var screenRecorder: ScreenRecorder? = null - - override fun testStarted(test: Test) { - if (screenRecorder != null) { - logger.error { "Something wrong. Recorder didn't finish but called again for the same device" } - } - screenRecorder = ScreenRecorder(device, test) - screenRecorder?.run() - } - - override fun testFailed(test: Test, startTime: Long, endTime: Long) { - screenRecorder?.interrupt() - screenRecorder = null - } - - override fun testPassed(test: Test, startTime: Long, endTime: Long) { - screenRecorder?.interrupt() - screenRecorder = null - } - - override fun batchFinished() { - if (screenRecorder != null) { - logger.error { "Something wrong. Recorder didn't finish but test batch already finished" } - } - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/TestLogCollector.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/TestLogCollector.kt deleted file mode 100644 index 1d8353acf..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/TestLogCollector.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.malinskiy.marathon.ios.logparser.listener - -interface TestLogCollector { - fun getLastLog(): String -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/TestLogListener.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/TestLogListener.kt deleted file mode 100644 index 7e48cc324..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/TestLogListener.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.malinskiy.marathon.ios.logparser.listener - -import com.malinskiy.marathon.ios.logparser.StreamingLogParser -import com.malinskiy.marathon.test.Test - -class TestLogListener : TestRunListener, StreamingLogParser, TestLogCollector { - - private var buffer: StringBuffer? = null - private var lastLine: String? = null - - override fun getLastLog() = buffer?.toString() ?: "" - - override fun onLine(line: String) { - buffer?.appendLine(line) - lastLine = line - } - - override fun batchFinished() { - } - - override fun testPassed(test: Test, startTime: Long, endTime: Long) {} - - override fun testFailed(test: Test, startTime: Long, endTime: Long) {} - - override fun testStarted(test: Test) { - buffer = StringBuffer(lastLine ?: "") - } - - override fun close() { - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/TestRunListener.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/TestRunListener.kt deleted file mode 100644 index 49679592d..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/listener/TestRunListener.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.malinskiy.marathon.ios.logparser.listener - -import com.malinskiy.marathon.test.Test - -interface TestRunListener { - fun testStarted(test: Test) - fun testFailed(test: Test, startTime: Long, endTime: Long) - fun testPassed(test: Test, startTime: Long, endTime: Long) - fun batchFinished() -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/CompositeLogParser.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/CompositeLogParser.kt deleted file mode 100644 index 93175a72d..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/CompositeLogParser.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.malinskiy.marathon.ios.logparser.parser - -import com.malinskiy.marathon.ios.logparser.StreamingLogParser - -class CompositeLogParser(val parsers: Collection) : StreamingLogParser { - override fun close() { - parsers.forEach { it.close() } - } - - override fun onLine(line: String) { - parsers.forEach { it.onLine(line) } - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/DebugLogPrinter.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/DebugLogPrinter.kt deleted file mode 100644 index c9430b8f7..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/DebugLogPrinter.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.malinskiy.marathon.ios.logparser.parser - -import com.malinskiy.marathon.ios.logparser.StreamingLogParser -import com.malinskiy.marathon.log.MarathonLogging - -class DebugLogPrinter( - private val prefix: String = DebugLogPrinter::class.java.simpleName, - private val hideRunnerOutput: Boolean -) : StreamingLogParser { - private val logger by lazy { - MarathonLogging.logger(prefix).also { it.trace("Mirroring remote logs with name '$prefix'") } - } - - override fun onLine(line: String) { - if (!hideRunnerOutput) - logger.debug(line) - } - - override fun close() = Unit -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/DeviceFailureException.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/DeviceFailureException.kt deleted file mode 100644 index 103064ecd..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/DeviceFailureException.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.malinskiy.marathon.ios.logparser.parser - -enum class DeviceFailureReason { Unknown, FailedRunner, ConnectionAbort, InvalidSimulatorIdentifier, UnreachableHost, ServicesUnavailable } - -class DeviceFailureException( - val reason: DeviceFailureReason, - message: String? = null, - cause: Throwable? = null -) : RuntimeException(message ?: reason.toString(), cause) { - constructor(reason: DeviceFailureReason, regex: Regex) : this(reason, regex.pattern) - constructor(reason: DeviceFailureReason, cause: Throwable) : this(reason, null, cause) -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/DeviceFailureParser.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/DeviceFailureParser.kt deleted file mode 100644 index f4cac3fc1..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/DeviceFailureParser.kt +++ /dev/null @@ -1,42 +0,0 @@ -package com.malinskiy.marathon.ios.logparser.parser - -import com.malinskiy.marathon.ios.logparser.StreamingLogParser - -class DeviceFailureParser : StreamingLogParser { - private val patterns = listOf( - "Failed to install or launch the test runner", - "Software caused connection abort", - "Unable to find a destination matching the provided destination specifier", - "Terminating since there is no system app", - "Exiting because the workspace server has disconnected", - "Not authorized for performing UI testing PropertyActions", - "Timed out waiting for automation session", - "Failed to terminate", - "Failed to launch app with identifier", - "Test runner exited before starting test execution", - "Early unexpected exit, operation never finished bootstrapping", - "Connection peer refused channel request", - "CoreSimulatorService connection became invalid", // occurs in simctl output - "Simulator services will no longer be available", // occurs in simctl output - "Unable to locate device set", // occurs in simctl output - "Test runner exited" - ) - private val crashPatterns = listOf("Assertion Failure: :0: [^\\s]+ crashed in ") - private var count = 0 - override fun onLine(line: String) { - patterns.firstOrNull { line.contains(it) } - ?.let { - throw DeviceFailureException( - when (patterns.indexOf(it)) { - 0 -> DeviceFailureReason.FailedRunner - 1 -> DeviceFailureReason.ConnectionAbort - 2 -> DeviceFailureReason.InvalidSimulatorIdentifier - else -> DeviceFailureReason.Unknown - }, - it - ) - } - } - - override fun close() = Unit -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/DiagnosticLogsPathFinder.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/DiagnosticLogsPathFinder.kt deleted file mode 100644 index d7114ff2f..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/DiagnosticLogsPathFinder.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.malinskiy.marathon.ios.logparser.parser - -import com.malinskiy.marathon.ios.logparser.StreamingLogParser - -class DiagnosticLogsPathFinder : StreamingLogParser { - - private val logPathPattern = """(^\s*|\s+)/.+\.log\s*$""".toRegex() - private var paths = arrayListOf() - - val diagnosticLogPaths: Collection - get() = paths - - override fun onLine(line: String) { - logPathPattern.find(line)?.groupValues?.firstOrNull() - ?.let { paths.add(it) } - } - - override fun close() = Unit -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/SessionResultsPathFinder.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/SessionResultsPathFinder.kt deleted file mode 100644 index 7cc9f9cd1..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/SessionResultsPathFinder.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.malinskiy.marathon.ios.logparser.parser - -import com.malinskiy.marathon.ios.logparser.StreamingLogParser - -class SessionResultsPathFinder : StreamingLogParser { - private val resultPathPattern = """(^\s*|\s+)/.+\.xcresult\s*$""".toRegex() - private var paths = arrayListOf() - - val resultPaths: Collection - get() = paths - - override fun onLine(line: String) { - resultPathPattern.find(line)?.groupValues?.firstOrNull() - ?.let { paths.add(it) } - } - - override fun close() = Unit -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/TestRunProgressParser.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/TestRunProgressParser.kt deleted file mode 100644 index 1622af51e..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/logparser/parser/TestRunProgressParser.kt +++ /dev/null @@ -1,76 +0,0 @@ -package com.malinskiy.marathon.ios.logparser.parser - -import com.malinskiy.marathon.execution.ComponentInfo -import com.malinskiy.marathon.ios.logparser.StreamingLogParser -import com.malinskiy.marathon.ios.logparser.formatter.PackageNameFormatter -import com.malinskiy.marathon.ios.logparser.listener.TestRunListener -import com.malinskiy.marathon.log.MarathonLogging -import com.malinskiy.marathon.test.Test -import com.malinskiy.marathon.time.Timer - -class TestRunProgressParser( - private val timer: Timer, - private val packageNameFormatter: PackageNameFormatter, - private val componentInfo: ComponentInfo, - private val listeners: Collection -) : StreamingLogParser { - - override fun close() { - listeners.forEach { it.batchFinished() } - } - - val logger = MarathonLogging.logger(TestRunProgressParser::class.java.simpleName) - - val TEST_CASE_STARTED = """Test Case '-\[([a-zA-Z0-9_.]+)\.([a-zA-Z0-9_]+) ([a-zA-Z0-9_]+)]' started\.""".toRegex() - val TEST_CASE_FINISHED = - """Test Case '-\[([a-zA-Z0-9_.]+)\.([a-zA-Z0-9_]+) ([a-zA-Z0-9_]+)]' (passed|failed) \(([\d\.]+) seconds\)\.""".toRegex() - - override fun onLine(line: String) { - if (line.matches(TEST_CASE_STARTED)) { - notifyTestStarted(line) - } else if (line.matches(TEST_CASE_FINISHED)) { - notifyTestFinished(line) - } - } - - fun notifyTestFinished(line: String) { - val matchResult = TEST_CASE_FINISHED.find(line) - val pkg = packageNameFormatter.format(matchResult?.groups?.get(1)?.value) - val clazz = matchResult?.groups?.get(2)?.value - val method = matchResult?.groups?.get(3)?.value - val result = matchResult?.groups?.get(4)?.value - val duration = matchResult?.groups?.get(5)?.value?.toFloat() - - logger.debug { "Test $pkg.$clazz.$method finished with result <$result> after $duration seconds" } - - if (pkg != null && clazz != null && method != null && result != null && duration != null) { - val test = Test(pkg, clazz, method, emptyList(), componentInfo) - - val endTime = timer.currentTimeMillis() - val startTime = endTime - Math.round(duration * 1000) - - when (result) { - "passed" -> { - listeners.forEach { it.testPassed(test, startTime, endTime) } - } - "failed" -> { - listeners.forEach { it.testFailed(test, startTime, endTime) } - } - else -> logger.error { "Unknown result $result for test $pkg.$clazz.$method" } - } - } - } - - fun notifyTestStarted(line: String) { - val matchResult = TEST_CASE_STARTED.find(line) - val pkg = packageNameFormatter.format(matchResult?.groups?.get(1)?.value) - val clazz = matchResult?.groups?.get(2)?.value - val method = matchResult?.groups?.get(3)?.value - - if (pkg != null && clazz != null && method != null) { - val test = Test(pkg, clazz, method, emptyList(), componentInfo) - logger.trace { "Test $pkg.$clazz.$method started" } - listeners.forEach { it.testStarted(test) } - } - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/recording/ScreenRecorder.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/recording/ScreenRecorder.kt deleted file mode 100644 index a350c13e9..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/recording/ScreenRecorder.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.malinskiy.marathon.ios.recording - -import com.malinskiy.marathon.ios.IOSDevice -import com.malinskiy.marathon.ios.RemoteFileManager -import com.malinskiy.marathon.test.Test - -class ScreenRecorder( - private val device: IOSDevice, - private val test: Test -) : Thread() { - - override fun run() { - val command = "xcrun simctl io ${device.udid} recordVideo ${RemoteFileManager.remoteVideoForTest(test)}" - val session = device.hostCommandExecutor.startSession(command) - - while (!interrupted()) { - Thread.sleep(500) - } - - session.outputStream.write("\u0003".toByteArray()) - session.outputStream.flush() - - session.close() - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/Simctl.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/Simctl.kt deleted file mode 100644 index ecfda2b1d..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/Simctl.kt +++ /dev/null @@ -1,73 +0,0 @@ -package com.malinskiy.marathon.ios.simctl - -import com.dd.plist.PropertyListParser -import com.google.gson.Gson -import com.google.gson.JsonSyntaxException -import com.malinskiy.marathon.ios.IOSDevice -import com.malinskiy.marathon.ios.logparser.parser.DeviceFailureException -import com.malinskiy.marathon.ios.logparser.parser.DeviceFailureReason -import com.malinskiy.marathon.ios.simctl.model.SimctlDevice -import com.malinskiy.marathon.ios.simctl.model.SimctlDeviceType -import com.malinskiy.marathon.ios.simctl.model.SimctlListDevicesOutput -import java.io.File - -class Simctl { - fun list(device: IOSDevice, gson: Gson): List { - val output = exec("list --json", device) - return try { - gson.fromJson(output, SimctlListDevicesOutput::class.java).devices.devices - } catch (e: JsonSyntaxException) { - throw DeviceFailureException( - DeviceFailureReason.ServicesUnavailable, - "Error parsing simctl output on device ${device.udid}: $output" - ) - } - } - - fun deviceType(device: IOSDevice): String? { - return exec("getenv ${device.udid} SIMULATOR_VERSION_INFO", device) - .split(" - ") - .associate { it.substringBefore(": ") to it.substringAfter(": ").trim() } - .get("DeviceType") - } - - fun isRunning(device: IOSDevice): Boolean { - val output = exec("spawn ${device.udid} launchctl print system | grep com.apple.springboard.services", device) - return output.contains("M A com.apple.springboard.services") - } - - fun modelIdentifier(device: IOSDevice): String? { - return exec("getenv ${device.udid} SIMULATOR_MODEL_IDENTIFIER", device) - .trim() - .takeIf { it.isNotBlank() } - } - - fun simctlDeviceType(device: IOSDevice): SimctlDeviceType { - val deviceHome: String = exec("getenv ${device.udid} HOME", device) - .trim() - .takeIf { it.isNotBlank() } - ?: return SimctlDeviceType("Unknown", "Unknown") - val devicePlist = File(deviceHome).resolveSibling("device.plist") - val devicePlistContents = device.hostCommandExecutor.execBlocking("cat ${devicePlist.canonicalPath}") - if (devicePlistContents.exitStatus != 0) { - return SimctlDeviceType("Unknown", "Unknown") - } - val deviceDescriptor = PropertyListParser.parse(devicePlistContents.stdout.toByteArray()).toJavaObject() as Map<*, *> - if (device.udid != deviceDescriptor["UDID"] as String) { - return SimctlDeviceType("Unknown", "Unknown") - } - val deviceType = deviceDescriptor["deviceType"] as String - return SimctlDeviceType(deviceType, deviceType) - } - -// fun boot(device: IOSDevice) {} -// fun shutdown(device: IOSDevice) {} -// fun erase(device: IOSDevice) {} -// fun screenshot(device: IOSDevice) {} -// fun video(device: IOSDevice) {} - - private fun exec(args: String, device: IOSDevice): String { - val command = "xcrun simctl $args" - return device.hostCommandExecutor.execBlocking(command).stdout - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlDevice.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlDevice.kt deleted file mode 100644 index e0a83a919..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlDevice.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.malinskiy.marathon.ios.simctl.model - -import com.google.gson.annotations.SerializedName - -data class SimctlDevice( - val runtime: String, - val state: State, - val name: String, - val udid: String -) { - enum class State { - Unknown, - @SerializedName("Booted") - Booted, - @SerializedName("Shutdown") - Shutdown, - @SerializedName("Creating") - Creating, - @SerializedName("Booting") - Booting, - @SerializedName("Shutting Down") - ShuttingDown - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlDeviceList.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlDeviceList.kt deleted file mode 100644 index e39dd9711..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlDeviceList.kt +++ /dev/null @@ -1,42 +0,0 @@ -package com.malinskiy.marathon.ios.simctl.model - -import com.google.gson.JsonDeserializationContext -import com.google.gson.JsonDeserializer -import com.google.gson.JsonElement -import com.google.gson.JsonSyntaxException -import java.lang.reflect.Type - -data class SimctlDeviceList(val devices: List) - - -class SimctlDeviceListDeserializer : JsonDeserializer { - override fun deserialize(json: JsonElement?, typeOfT: Type?, context: JsonDeserializationContext?): SimctlDeviceList { - val devices = mutableListOf() - - val jsonObject = json?.asJsonObject - jsonObject?.entrySet()?.forEach { - val runtime = it.key - val devicesJsonArray = it.value?.asJsonArray - - devicesJsonArray?.forEach { - val deviceJson = it.asJsonObject - val stateJson = deviceJson?.get("state") - val name = deviceJson?.get("name")?.asString - val udid = deviceJson?.get("udid")?.asString - - if (stateJson != null && context != null && name != null && udid != null) { - val state: SimctlDevice.State = try { - context.deserialize(stateJson, SimctlDevice.State::class.java) ?: SimctlDevice.State.Unknown - } catch (e: JsonSyntaxException) { - SimctlDevice.State.Unknown - } - - devices.add(SimctlDevice(runtime, state, name, udid)) - } - } - } - - return SimctlDeviceList(devices) - } - -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlDeviceType.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlDeviceType.kt deleted file mode 100644 index 22e3c46eb..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlDeviceType.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.malinskiy.marathon.ios.simctl.model - -data class SimctlDeviceType( - val name: String, - val identifier: String -) diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlListDevicesOutput.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlListDevicesOutput.kt deleted file mode 100644 index dfda0eb67..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlListDevicesOutput.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.malinskiy.marathon.ios.simctl.model - -data class SimctlListDevicesOutput( - val devicetypes: List, - val runtimes: List, - val devices: SimctlDeviceList -) diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlRuntime.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlRuntime.kt deleted file mode 100644 index 19cdbbf01..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlRuntime.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.malinskiy.marathon.ios.simctl.model - -data class SimctlRuntime( - val buildversion: String, - val availability: String, - val name: String, - val identifier: String, - val version: String -) diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/xctestrun/PropertyListKey.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/xctestrun/PropertyListKey.kt deleted file mode 100644 index a501a9cea..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/xctestrun/PropertyListKey.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.malinskiy.marathon.ios.xctestrun - -sealed class PropertyListKey(private val value: String) { - object __xctestrun_metadata__ : PropertyListKey("__xctestrun_metadata__") - class TargetName(targetName: String) : PropertyListKey(targetName) - - object ProductModuleName : PropertyListKey("ProductModuleName") - object IsUITestBundle : PropertyListKey("IsUITestBundle") - object SkipTestIdentifiers : PropertyListKey("SkipTestIdentifiers") - object EnvironmentVariables : PropertyListKey("EnvironmentVariables") - object TestingEnvironmentVariables : PropertyListKey("TestingEnvironmentVariables") - - fun toKeyString(): String { - return value - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/xctestrun/PropertyListMap.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/xctestrun/PropertyListMap.kt deleted file mode 100644 index b082b6738..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/xctestrun/PropertyListMap.kt +++ /dev/null @@ -1,59 +0,0 @@ -package com.malinskiy.marathon.ios.xctestrun - -typealias PropertyListMap = MutableMap - -fun PropertyListMap.valueForKeypath(vararg keys: PropertyListKey): Any? = - valueForKeypath(keypath = keys.map { it.toKeyString() }.joinToString(separator = Keypath.separator)) - -fun PropertyListMap.valueForKeypath(module: String, vararg keys: PropertyListKey): Any? { - val keypath: Keypath = module + Keypath.separator + keys.map { it.toKeyString() }.joinToString(separator = Keypath.separator) - return valueForKeypath(keypath = keypath) -} - -class InvalidKeypathException( - message: String = INVALID_KEYPATH_MESSAGE, - val keypath: Keypath -) : RuntimeException(message) { - companion object { - const val INVALID_KEYPATH_MESSAGE = "Invalid keypath:" - } - - override val message: String = "$INVALID_KEYPATH_MESSAGE: $keypath" -} - -private typealias Keypath = String - -private val String.Companion.separator: String - get() = ":" - -private fun Keypath.keypathRoot(): String = substringBefore(Keypath.separator) -private fun Keypath.keypathTail(): Keypath? = substringAfterOrNull(Keypath.separator) - -private fun PropertyListMap.valueForKeypath(keypath: Keypath): Any? { - return when { - keypath.isEmpty() -> null - else -> { - val root = get(keypath.keypathRoot()) - val tail = keypath.keypathTail() - when { - tail == null || tail.isEmpty() -> root - root is MutableMap<*, *> -> - try { - @Suppress("UNCHECKED_CAST") - (root as PropertyListMap).valueForKeypath(tail) - } catch (exception: InvalidKeypathException) { - throw InvalidKeypathException(keypath = keypath) - } - else -> - throw InvalidKeypathException(keypath = keypath) - } - } - } -} - -private fun String.substringAfterOrNull(delimiter: String): String? { - return when (contains(Keypath.separator)) { - false -> null - true -> substringAfter(delimiter) - } -} diff --git a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/xctestrun/Xctestrun.kt b/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/xctestrun/Xctestrun.kt deleted file mode 100644 index ba491e64d..000000000 --- a/vendor/vendor-ios/src/main/kotlin/com/malinskiy/marathon/ios/xctestrun/Xctestrun.kt +++ /dev/null @@ -1,184 +0,0 @@ -package com.malinskiy.marathon.ios.xctestrun - -import com.dd.plist.NSObject -import com.dd.plist.PropertyListParser -import com.malinskiy.marathon.log.MarathonLogging -import com.malinskiy.marathon.test.Test -import java.io.ByteArrayInputStream -import java.io.ByteArrayOutputStream -import java.io.File -import java.io.FileInputStream -import java.io.InputStream -import kotlin.Suppress as suppress - -@suppress(unchecked) -class Xctestrun(inputStream: InputStream) { - - constructor(file: File) : this(FileInputStream(file)) - - val logger = MarathonLogging.logger(javaClass.simpleName) - - val propertyList: PropertyListMap = PropertyListParser - .parse(inputStream) - .toJavaObject() as? PropertyListMap - ?: throw IllegalArgumentException("could not parse xctestrun") - - // testable target properties - - private val target = PropertyListKey.TargetName( - propertyList.keys.firstOrNull { it != PropertyListKey.__xctestrun_metadata__.toKeyString() } - ?: throw IllegalArgumentException("xctestrun file does not define any testable targets") - ) - - /** - * Test target identifier. Used in test names specified with -onlyTesting: option passed to xcodebuild - */ - val targetName = target.toKeyString() - - /** - * Testable product module name. Appears in testing logs as a test identifier prefix. - */ - val productModuleName = propertyList.valueForKeypath(target, PropertyListKey.ProductModuleName) as String - - /** - * @see xcodebuild.xctestrun(5) - */ - val isUITestBundle = propertyList.valueForKeypath(target, PropertyListKey.IsUITestBundle) as Boolean - - /** - * @see xcodebuild.xctestrun(5) - */ - val environmentVariables = propertyList.valueForKeypath(target, PropertyListKey.EnvironmentVariables) as PropertyListMap - - /** - * @see xcodebuild.xctestrun(5) - */ - val testingEnvironmentVariables = propertyList.valueForKeypath(target, PropertyListKey.TestingEnvironmentVariables) as PropertyListMap - - /** - * @see xcodebuild.xctestrun(5) - */ - private val skipTestIdentifiers = propertyList.valueForKeypath(target, PropertyListKey.SkipTestIdentifiers) as Array - - /** - * Returns `true` if specified test should be excluded from the test run. - */ - @suppress("ReturnCount") - fun isSkipped(test: Test): Boolean { - if (test.pkg != targetName) return false - - val skippedMethods = skippedTestMethodsByClass[test.clazz] ?: return false - - return skippedMethods.isEmpty() || skippedMethods.contains(test.method) - } - - // property list manipulation - - /** - * Defines a new environment variable or updates an existing one. - */ - fun environment(name: String, value: String) { - environmentVariables.put(name, value) - } - - /** - * Defines or updates environment variables with values from specified map. - */ - fun environment(environmentVariables: Map) { - this.environmentVariables.putAll(environmentVariables) - } - - /** - * Defines a new environment variable or updates an existing one. - */ - fun testingEnvironment(name: String, value: String) { - testingEnvironmentVariables[name] = value - } - - /** - * Defines or updates environment variables with values from specified map. - */ - fun testingEnvironment(environmentVariables: Map) { - testingEnvironmentVariables.putAll(environmentVariables) - } - - // output - - /** - * @return a String representation of this property list rendered in XML format - */ - fun toXMLString(): String { - return String(toXMLByteArray()) - } - - /** - * @return a ByteArray representation of this property list rendered as an XML string. - */ - fun toXMLByteArray(): ByteArray { - val outputStream = ByteArrayOutputStream() - PropertyListParser.saveAsXML( - NSObject.fromJavaObject(propertyList), - outputStream - ) - return outputStream.toByteArray() - } - - /** - * Creates a new instance of Xctestrun with the same data. - * - * @return a deep clone of this instance. - */ - fun clone(): Xctestrun { - return Xctestrun(inputStream = ByteArrayInputStream(toXMLByteArray())) - } - - /** - * Compares two Xctestrun instances - */ - override operator fun equals(other: Any?): Boolean { - if (other !is Xctestrun) { - return false - } - return areEqual(other.propertyList, propertyList) - } - - override fun hashCode(): Int { - return propertyList.hashCode() - } - - /** - * Compares property list nodes generated with [PropertyListParser]. Unlike standard [equals] implementation, - * ignores key order when comparing Map nodes, and element order when comparing Array nodes. - */ - private fun areEqual(l: Any?, r: Any?): Boolean { - if (l is Map<*, *> && r is Map<*, *>) { - if (l.keys.size != r.keys.size) { - return false - } - if (l.keys.toSet() != r.keys.toSet()) { - return false - } - return l.keys.toSet().fold(true) { acc, key -> - acc && areEqual(l[key], r[key]) - } - } else if (l is Array<*> && r is Array<*>) { - return (l.toSet() == r.toSet()) - } - return l == r - } - - private val skippedTestMethodsByClass: Map> by lazy { - skipTestIdentifiers - .map { - val parts = it.toString().split("/") - parts.first() to parts.getOrNull(1) - } - .groupBy( - { it.first }, - { it.second } - ) - .mapValues { it.value.filterNotNull() } - } -} - -private const val unchecked = "UNCHECKED_CAST" diff --git a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/DerivedDataManagerSpek.kt b/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/DerivedDataManagerSpek.kt deleted file mode 100644 index 9ba52c8f2..000000000 --- a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/DerivedDataManagerSpek.kt +++ /dev/null @@ -1,179 +0,0 @@ -package com.malinskiy.marathon.ios - -import com.malinskiy.marathon.execution.Configuration -import com.malinskiy.marathon.extension.relativePathTo -import com.malinskiy.marathon.log.MarathonLogging -import org.amshove.kluent.shouldBeEqualTo -import org.amshove.kluent.shouldNotBeEqualTo -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.dsl.on -import org.mockito.kotlin.mock -import org.mockito.kotlin.whenever -import org.testcontainers.containers.BindMode -import org.testcontainers.containers.GenericContainer -import java.io.File -import java.nio.file.Files -import java.nio.file.attribute.PosixFilePermissions -import java.util.* - -object DerivedDataManagerSpek : Spek( - { - val logger = MarathonLogging.logger(javaClass.simpleName) - - describe("DerivedDataManager") { - val device: IOSDevice = mock() - whenever(device.udid).thenReturn(UUID.randomUUID().toString()) - - val privateKey = - File(javaClass.classLoader.getResource("fixtures/derived-data-manager/test_rsa").file) - try { - Files.setPosixFilePermissions( - privateKey.toPath(), - PosixFilePermissions.fromString("rw-------") - ) - } catch (e: Exception) { - } - logger.debug { "Using private key $privateKey" } - val publicKeyResourcePath = "fixtures/derived-data-manager/test_rsa.pub" - - // https://github.com/testcontainers/testcontainers-java/issues/318 - class KGenericContainer(imageName: String) : GenericContainer(imageName) - - lateinit var container: KGenericContainer - lateinit var containerHost: String - var sshPort: Int = 0 - - beforeGroup { - - container = KGenericContainer("axiom/rsync-server") - .withClasspathResourceMapping( - publicKeyResourcePath, - "/root/.ssh/authorized_keys", - BindMode.READ_WRITE - ) - .withEnv("PASSWORD", "pass") - .withExposedPorts(22, 873) - - container.start() - - containerHost = container.containerIpAddress - sshPort = container.getMappedPort(22) - } - - // TODO: fix - on("connection") { - val sourceRoot = - File(javaClass.classLoader.getResource("sample-xcworkspace/sample-appUITests").file) - val derivedDataDir = - File(javaClass.classLoader.getResource("sample-xcworkspace/derived-data").file) - val xctestrunPath = - File(javaClass.classLoader.getResource("sample-xcworkspace/derived-data/Build/Products/UITesting_iphonesimulator11.2-x86_64.xctestrun").file) - val configuration = Configuration( - name = "", - outputDir = File(""), - analyticsConfiguration = null, - customAnalyticsTracker = null, - poolingStrategy = null, - shardingStrategy = null, - sortingStrategy = null, - batchingStrategy = null, - flakinessStrategy = null, - retryStrategy = null, - filteringConfiguration = null, - strictRunFilterConfiguration = null, - cache = null, - ignoreFailures = null, - isCodeCoverageEnabled = null, - fallbackToScreenshots = null, - strictMode = null, - listener = null, - uncompletedTestRetryQuota = null, - testClassRegexes = null, - includeSerialRegexes = null, - excludeSerialRegexes = null, - ignoreFailureRegexes = null, - failFastFailureRegexes = null, - testBatchTimeoutMillis = null, - testOutputTimeoutMillis = null, - noDevicesTimeoutMillis = null, - debug = false, - vendorConfiguration = IOSConfiguration( - derivedDataDir = derivedDataDir, - xctestrunPath = xctestrunPath, - remoteUsername = "root", - remotePrivateKey = privateKey, - knownHostsPath = null, - remoteRsyncPath = "/usr/bin/rsync", - sourceRoot = sourceRoot, - debugSsh = false, - alwaysEraseSimulators = true - ), - analyticsTracking = false - ) - val componentInfo = IOSComponentInfoExtractor().extract(configuration) as IOSComponentInfo - - sshPort shouldNotBeEqualTo 0 - - it("should determine products location") { - val manager = DerivedDataManager(configuration = configuration) - - componentInfo.productsDir shouldBeEqualTo derivedDataDir.resolve("Build/Products/") - } - - it("should send all files") { - val manager = DerivedDataManager(configuration = configuration) - - val productsDir = componentInfo.productsDir - val remoteDir = "/data/${device.udid}/" - - // Upload - manager.send( - localPath = productsDir, - remotePath = remoteDir, - hostName = containerHost, - port = sshPort - ) - - val uploadResults = container.execInContainer("/usr/bin/find", remoteDir).stdout - .split("\n") - .filter { it.isNotEmpty() } - .map { File(it).relativePathTo(File(remoteDir)) } - .toSet() - - val expectedFiles = - productsDir.walkTopDown().map { it.relativePathTo(productsDir) }.toSet() - - uploadResults shouldBeEqualTo expectedFiles - } - - it("should receive all files") { - - val manager = DerivedDataManager(configuration = configuration) - - val productsDir = componentInfo.productsDir - val remoteDir = "/data/${device.udid}/" - - // Download - val tempDir = createTempDir() - - manager.receive( - remotePath = remoteDir, - localPath = tempDir, - hostName = containerHost, - port = sshPort - ) - - val tempFiles = tempDir.walkTopDown().map { it.relativePathTo(tempDir) }.toSet() - val expectedFiles = - productsDir.walkTopDown().map { it.relativePathTo(productsDir) }.toSet() - - // Compare - tempFiles shouldBeEqualTo expectedFiles - - tempDir.deleteRecursively() - } - } - } - }) diff --git a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/IOSDeviceProviderSpek.kt b/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/IOSDeviceProviderSpek.kt deleted file mode 100644 index 832bbac42..000000000 --- a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/IOSDeviceProviderSpek.kt +++ /dev/null @@ -1,32 +0,0 @@ -package com.malinskiy.marathon.ios - -import com.malinskiy.marathon.analytics.internal.pub.Track -import com.malinskiy.marathon.time.SystemTimer -import kotlinx.coroutines.ExperimentalCoroutinesApi -import kotlinx.coroutines.runBlocking -import org.amshove.kluent.mock -import org.amshove.kluent.shouldBeEqualTo -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.given -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.dsl.on -import java.time.Clock - -@OptIn(ExperimentalCoroutinesApi::class) -class IOSDeviceProviderSpek : Spek( - { - given("A provider") { - val provider = IOSDeviceProvider(Track(), mock(), SystemTimer(Clock.systemDefaultZone())) - - on("terminate") { - it("should close the channel") { - runBlocking { - provider.terminate() - } - - provider.subscribe().isClosedForReceive shouldBeEqualTo true - provider.subscribe().isClosedForSend shouldBeEqualTo true - } - } - } - }) diff --git a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/IOSTestParserSpek.kt b/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/IOSTestParserSpek.kt deleted file mode 100644 index 71dfd6bcd..000000000 --- a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/IOSTestParserSpek.kt +++ /dev/null @@ -1,96 +0,0 @@ -package com.malinskiy.marathon.ios - -import com.malinskiy.marathon.execution.Configuration -import com.malinskiy.marathon.test.Test -import kotlinx.coroutines.runBlocking -import org.amshove.kluent.shouldContainSame -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.dsl.on -import java.io.File - -object IOSTestParserSpek : Spek( - { - describe("iOS test parser") { - val parser = IOSTestParser() - - on("project sources") { - val sourceRoot = - File(javaClass.classLoader.getResource("sample-xcworkspace/sample-appUITests").file) - val derivedDataDir = - File(javaClass.classLoader.getResource("sample-xcworkspace/derived-data").file) - val xctestrunPath = - File(javaClass.classLoader.getResource("sample-xcworkspace/derived-data/Build/Products/UITesting_iphonesimulator11.2-x86_64.xctestrun").file) - val configuration = Configuration( - name = "", - outputDir = File(""), - customAnalyticsTracker = null, - analyticsConfiguration = null, - poolingStrategy = null, - shardingStrategy = null, - sortingStrategy = null, - batchingStrategy = null, - flakinessStrategy = null, - retryStrategy = null, - filteringConfiguration = null, - strictRunFilterConfiguration = null, - cache = null, - ignoreFailures = null, - isCodeCoverageEnabled = null, - fallbackToScreenshots = null, - strictMode = null, - uncompletedTestRetryQuota = null, - testClassRegexes = null, - includeSerialRegexes = null, - excludeSerialRegexes = null, - ignoreFailureRegexes = null, - failFastFailureRegexes = null, - testBatchTimeoutMillis = null, - testOutputTimeoutMillis = null, - noDevicesTimeoutMillis = null, - listener = null, - debug = null, - vendorConfiguration = IOSConfiguration( - derivedDataDir = derivedDataDir, - xctestrunPath = xctestrunPath, - remoteUsername = "testuser", - remotePrivateKey = File("/home/fakekey"), - knownHostsPath = null, - remoteRsyncPath = "/remote/rsync", - sourceRoot = sourceRoot, - debugSsh = false, - alwaysEraseSimulators = true - ), - analyticsTracking = false - ) - val iosComponentInfo = IOSComponentInfoExtractor().extract(configuration) - - it("should return accurate list of tests") { - val extractedTests = runBlocking { parser.extract(iosComponentInfo) } - - extractedTests shouldContainSame listOf( - Test("sample-appUITests", "StoryboardTests", "testButton", emptyList(), iosComponentInfo), - Test("sample-appUITests", "StoryboardTests", "testLabel", emptyList(), iosComponentInfo), - Test("sample-appUITests", "MoreTests", "testPresentModal", emptyList(), iosComponentInfo), - Test("sample-appUITests", "CrashingTests", "testButton", emptyList(), iosComponentInfo), - Test("sample-appUITests", "FailingTests", "testAlwaysFailing", emptyList(), iosComponentInfo), - Test("sample-appUITests", "FlakyTests", "testTextFlaky", emptyList(), iosComponentInfo), - Test("sample-appUITests", "FlakyTests", "testTextFlaky1", emptyList(), iosComponentInfo), - Test("sample-appUITests", "FlakyTests", "testTextFlaky2", emptyList(), iosComponentInfo), - Test("sample-appUITests", "FlakyTests", "testTextFlaky3", emptyList(), iosComponentInfo), - Test("sample-appUITests", "FlakyTests", "testTextFlaky4", emptyList(), iosComponentInfo), - Test("sample-appUITests", "FlakyTests", "testTextFlaky5", emptyList(), iosComponentInfo), - Test("sample-appUITests", "FlakyTests", "testTextFlaky6", emptyList(), iosComponentInfo), - Test("sample-appUITests", "FlakyTests", "testTextFlaky7", emptyList(), iosComponentInfo), - Test("sample-appUITests", "FlakyTests", "testTextFlaky8", emptyList(), iosComponentInfo), - Test("sample-appUITests", "SlowTests", "testTextSlow", emptyList(), iosComponentInfo), - Test("sample-appUITests", "SlowTests", "testTextSlow1", emptyList(), iosComponentInfo), - Test("sample-appUITests", "SlowTests", "testTextSlow2", emptyList(), iosComponentInfo), - Test("sample-appUITests", "SlowTests", "testTextSlow3", emptyList(), iosComponentInfo), - Test("sample-appUITests", "SlowTests", "testTextSlow4", emptyList(), iosComponentInfo) - ) - } - } - } - }) diff --git a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/Mocks.kt b/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/Mocks.kt deleted file mode 100644 index 9e923d8e6..000000000 --- a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/Mocks.kt +++ /dev/null @@ -1,57 +0,0 @@ -package com.malinskiy.marathon.ios - -import com.google.gson.GsonBuilder -import com.malinskiy.marathon.ios.cmd.remote.CommandResult -import com.malinskiy.marathon.ios.cmd.remote.CommandSession -import com.malinskiy.marathon.ios.device.RemoteSimulator -import com.malinskiy.marathon.ios.simctl.model.SimctlDeviceList -import com.malinskiy.marathon.ios.simctl.model.SimctlDeviceListDeserializer -import org.amshove.kluent.mock - -class Mocks { - class CommandExecutor { - companion object { - val DEFAULT = object : com.malinskiy.marathon.ios.cmd.remote.CommandExecutor { - val mock = mock(CommandSession::class) - override fun startSession(command: String): CommandSession = mock - - override fun execBlocking(command: String, maxExecutionDurationMillis: Long, testOutputTimeoutMillis: Long): CommandResult = - CommandResult("", "", 0) - - override suspend fun execInto( - command: String, - maxExecutionDurationMillis: Long, - testOutputTimeoutMillis: Long, - onLine: (String) -> Unit - ): Int? = 0 - - override fun close() {} - } - } - } - - class IOSDevice { - companion object { - private val gson = GsonBuilder().registerTypeAdapter(SimctlDeviceList::class.java, SimctlDeviceListDeserializer()).create() - - val DEFAULT = com.malinskiy.marathon.ios.IOSDevice( - RemoteSimulator("localhost", "63D0962A-0A41-4BE9-A99E-E6220412BEB1", null), - 1, - mock(IOSConfiguration::class), - gson, - mock(), - object : HealthChangeListener { - override suspend fun onDisconnect(device: com.malinskiy.marathon.ios.IOSDevice) {} - }, - mock(), - mock() - ) - } - } - - class DevicePoolId { - companion object { - val DEFAULT = com.malinskiy.marathon.device.DevicePoolId("testpool") - } - } -} diff --git a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputLineBufferSpek.kt b/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputLineBufferSpek.kt deleted file mode 100644 index 4f9102622..000000000 --- a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputLineBufferSpek.kt +++ /dev/null @@ -1,80 +0,0 @@ -package com.malinskiy.marathon.ios.cmd.remote - -import org.amshove.kluent.shouldBeEmpty -import org.amshove.kluent.shouldBeEqualTo -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.dsl.on - -object SshjCommandOutputLineBufferSpek : Spek( - { - abstract class LineCollector { - abstract val lines: Collection - abstract fun onLine(line: String) - } - - describe("SshjCommandOutputLineBuffer") { - val lines by memoized { arrayListOf() } - val buffer by memoized { - SshjCommandOutputLineBuffer() { lines.add(it) } - } - - on("flushing empty buffer") { - it("should not produce any lines") { - buffer.flush() - - lines.shouldBeEmpty() - } - } - - on("appending data multiple times") { - val incomingText1 = "first one\nfirst two\nfirst three\n" - .also { buffer.append(it.toByteArray()) } - val incomingText2 = "second one\nsecond two\nsecond three\n" - - it("should not remove previously received lines") { - buffer.append(incomingText2.toByteArray()) - - buffer.flush() - - lines.count() shouldBeEqualTo (incomingText1 + incomingText2).lineCount() - } - } - - on("flushing incomplete data") { - val incomingText = "first one\nfirst two\nfirst three" - .also { buffer.append(it.toByteArray()) } - - it("should produce only terminated lines") { - buffer.flush() - - lines.count() shouldBeEqualTo incomingText.lineCount() - } - } - - on("draining incomplete data") { - val incomingText = "first one\nfirst two\nfirst three" - .also { buffer.append(it.toByteArray()) } - - it("should produce both termninated and unterminated lines") { - buffer.drain() - - lines.count() shouldBeEqualTo incomingText.lineCount() + 1 - } - } - - on("closing buffer") { - val incomingText = "first one\nfirst two\nfirst three" - .also { buffer.append(it.toByteArray()) } - - it("should drain all data") { - buffer.close() - - lines.count() shouldBeEqualTo incomingText.lineCount() + 1 - } - } - } - }) - -private fun String.lineCount(): Int = count { it == '\n' } diff --git a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputWaiterSpek.kt b/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputWaiterSpek.kt deleted file mode 100644 index d9ab6bbd1..000000000 --- a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/cmd/remote/SshjCommandOutputWaiterSpek.kt +++ /dev/null @@ -1,49 +0,0 @@ -package com.malinskiy.marathon.ios.cmd.remote - -import kotlinx.coroutines.runBlocking -import org.amshove.kluent.shouldBe -import org.amshove.kluent.shouldBeGreaterOrEqualTo -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.given -import org.jetbrains.spek.api.dsl.it -import kotlin.system.measureTimeMillis - -object SshjCommandOutputWaiterSpek : Spek( - { - val testOutputTimeoutMillis = 100L - val sleepDurationMillis = 15L - val waiter by memoized { - SshjCommandOutputWaiterImpl( - testOutputTimeoutMillis, - sleepDurationMillis - ) - } - given("waiter updated within timeout") { - it("should not be expired") { - waiter.update() - Thread.sleep(testOutputTimeoutMillis / 2) - - waiter.isExpired shouldBe false - } - } - given("timeout is over since waiter was updated") { - it("should be expired") { - waiter.update() - Thread.sleep(testOutputTimeoutMillis * 2) - - waiter.isExpired shouldBe true - } - } - given("wait is called") { - it("should block for configured duration") { - runBlocking { - val elapsedTime = measureTimeMillis { - waiter.wait() - } - - elapsedTime shouldBeGreaterOrEqualTo sleepDurationMillis - } - - } - } - }) diff --git a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/logparser/ProgressParserSpek.kt b/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/logparser/ProgressParserSpek.kt deleted file mode 100644 index 5fac62649..000000000 --- a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/logparser/ProgressParserSpek.kt +++ /dev/null @@ -1,128 +0,0 @@ -package com.malinskiy.marathon.ios.logparser - -import com.malinskiy.marathon.ios.IOSComponentInfo -import com.malinskiy.marathon.ios.logparser.formatter.PackageNameFormatter -import com.malinskiy.marathon.ios.logparser.listener.TestRunListener -import com.malinskiy.marathon.ios.logparser.parser.TestRunProgressParser -import com.malinskiy.marathon.test.Test -import com.malinskiy.marathon.time.Timer -import org.amshove.kluent.Verify -import org.amshove.kluent.When -import org.amshove.kluent.any -import org.amshove.kluent.called -import org.amshove.kluent.calling -import org.amshove.kluent.itAnswers -import org.amshove.kluent.itReturns -import org.amshove.kluent.mock -import org.amshove.kluent.on -import org.amshove.kluent.that -import org.amshove.kluent.was -import org.amshove.kluent.withFirstArg -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.dsl.on -import org.mockito.kotlin.atLeastOnce -import org.mockito.kotlin.reset -import org.mockito.kotlin.verify -import java.io.File - -class ProgressParserSpek : Spek( - { - describe("TestRunProgressParser") { - val mockFormatter = mock(PackageNameFormatter::class) - val mockListener = mock(TestRunListener::class) - val mockTimer = mock(Timer::class) - val mockedTimeMillis = 1537187696000L - val componentInfo = IOSComponentInfo(File("."), File("."), File(".")) - When calling mockTimer.currentTimeMillis() itReturns mockedTimeMillis - - val progressParser = TestRunProgressParser(mockTimer, mockFormatter, componentInfo, listOf(mockListener)) - - beforeEachTest { When calling mockFormatter.format(any()) itAnswers withFirstArg() } - afterEachTest { reset(mockListener, mockFormatter) } - - on("parsing testing output") { - val testOutputFile = - File(javaClass.classLoader.getResource("fixtures/test_output/success_0.log").file) - - it("should apply package name formatter") { - testOutputFile.readLines().forEach { - progressParser.onLine(it) - } - - verify( - mockFormatter, - atLeastOnce() - ) that mockFormatter.format("sample_appUITests") was called - } - } - - on("parsing single success output") { - val testOutputFile = - File(javaClass.classLoader.getResource("fixtures/test_output/success_0.log").file) - - it("should report single start and success") { - testOutputFile.readLines().forEach { - progressParser.onLine(it) - } - - Verify on mockListener that mockListener.testStarted( - Test( - "sample_appUITests", - "MoreTests", - "testPresentModal", - emptyList(), - componentInfo - ) - ) was called - Verify on mockListener that mockListener.testPassed( - Test("sample_appUITests", "MoreTests", "testPresentModal", emptyList(), componentInfo), - mockedTimeMillis - 5315, - mockedTimeMillis - ) was called - } - } - - on("parsing multiple success output") { - val testOutputFile = - File(javaClass.classLoader.getResource("fixtures/test_output/success_multiple_0.log").file) - - it("should report multiple starts and successes") { - testOutputFile.readLines().forEach { - progressParser.onLine(it) - } - - Verify on mockListener that mockListener.testStarted( - Test( - "sample_appUITests", - "FlakyTests", - "testTextFlaky1", - emptyList(), - componentInfo - ) - ) was called - Verify on mockListener that mockListener.testStarted( - Test( - "sample_appUITests", - "FlakyTests", - "testTextFlaky2", - emptyList(), - componentInfo - ) - ) was called - - Verify on mockListener that mockListener.testPassed( - Test("sample_appUITests", "FlakyTests", "testTextFlaky1", emptyList(), componentInfo), - mockedTimeMillis - 4415, - mockedTimeMillis - ) was called - Verify on mockListener that mockListener.testPassed( - Test("sample_appUITests", "FlakyTests", "testTextFlaky2", emptyList(), componentInfo), - mockedTimeMillis - 4118, - mockedTimeMillis - ) was called - } - } - } - }) diff --git a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlDeviceListDeserializerSpek.kt b/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlDeviceListDeserializerSpek.kt deleted file mode 100644 index a170308ab..000000000 --- a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/simctl/model/SimctlDeviceListDeserializerSpek.kt +++ /dev/null @@ -1,29 +0,0 @@ -package com.malinskiy.marathon.ios.simctl.model - -import com.google.gson.GsonBuilder -import org.amshove.kluent.`should be equal to` -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.dsl.on -import java.io.File - -class SimctlDeviceListDeserializerSpek : Spek( - { - describe("simctl list output deserializer") { - val gson = GsonBuilder() - .registerTypeAdapter(SimctlDeviceList::class.java, SimctlDeviceListDeserializer()) - .create() - - on("sample json") { - val sampleFile = - File(javaClass.classLoader.getResource("fixtures/simctl/list_output.json").file) - - it("should deserialize properly") { - val devicesList = - gson.fromJson(sampleFile.reader(), SimctlListDevicesOutput::class.java) - devicesList.devices.devices.size `should be equal to` 45 - } - } - } - }) diff --git a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/xctestrun/XctestrunSpek.kt b/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/xctestrun/XctestrunSpek.kt deleted file mode 100644 index 4d65dd1ac..000000000 --- a/vendor/vendor-ios/src/test/kotlin/com/malinskiy/marathon/ios/xctestrun/XctestrunSpek.kt +++ /dev/null @@ -1,102 +0,0 @@ -package com.malinskiy.marathon.ios.xctestrun - -import com.malinskiy.marathon.ios.IOSComponentInfo -import com.malinskiy.marathon.test.Test -import org.amshove.kluent.shouldBeEqualTo -import org.amshove.kluent.shouldHaveKey -import org.amshove.kluent.shouldNotHaveKey -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.dsl.given -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.dsl.on -import java.io.ByteArrayInputStream -import java.io.File - -object XctestrunSpek : Spek( - { - val file = - File(javaClass.classLoader.getResource("fixtures/xctestrun/UITesting_iphonesimulator11.2-x86_64.xctestrun").file) - val componentInfo = IOSComponentInfo(File("."), File("."), File(".")) - - describe("Xctestrun") { - on("parsing") { - val xctestrun by memoized { Xctestrun(file) } - - it("should return correct property values") { - xctestrun.targetName shouldBeEqualTo "sample-appUITests" - xctestrun.isUITestBundle shouldBeEqualTo true - } - - it("should accurately determine skipped tests") { - val test1 = Test("sample-appUITests", "SkippedSuite", "anyTest", listOf(), componentInfo) - val test2 = Test("sample-appUITests", "StoryboardTests", "testDisabledButton", listOf(), componentInfo) - val test3 = Test("sample-appUITests", "StoryboardTests", "testLabel", listOf(), componentInfo) - - xctestrun.isSkipped(test1) shouldBeEqualTo true - xctestrun.isSkipped(test2) shouldBeEqualTo true - xctestrun.isSkipped(test3) shouldBeEqualTo false - } - } - given("A valid instance") { - val xctestrun by memoized { Xctestrun(file) } - - it("should verify equality ignoring key order") { - val reorderedFile = - File(javaClass.classLoader.getResource("fixtures/xctestrun/UITesting_iphonesimulator11.2-x86_64-reordered.xctestrun").file) - val reordered = Xctestrun(reorderedFile) - - reordered shouldBeEqualTo xctestrun - } - - it("should accurately serialize and deserialize") { - val other = Xctestrun( - ByteArrayInputStream( - xctestrun.toXMLString().toByteArray() - ) - ) - - other shouldBeEqualTo xctestrun - } - - it("should be equal to its clone") { - val clone = xctestrun.clone() - - clone shouldBeEqualTo xctestrun - } - - it("should be able to modify environment variables") { - xctestrun.environment("SPEK_DEBUG", "YES") - - xctestrun.environmentVariables shouldHaveKey "SPEK_DEBUG" - xctestrun.environmentVariables["SPEK_DEBUG"] shouldBeEqualTo "YES" - } - - it("should be able to modify testing environment variables") { - xctestrun.testingEnvironment("SPEK_DEBUG", "YES") - - xctestrun.testingEnvironmentVariables shouldHaveKey "SPEK_DEBUG" - xctestrun.testingEnvironmentVariables["SPEK_DEBUG"] shouldBeEqualTo "YES" - } - - it("should not update clone when source changes") { - val clone = xctestrun.clone() - - xctestrun.environment("SPEK_DEBUG", "YES") - xctestrun.testingEnvironment("SPEK_DEBUG", "YES") - - clone.environmentVariables shouldNotHaveKey "SPEK_DEBUG" - clone.testingEnvironmentVariables shouldNotHaveKey "SPEK_DEBUG" - } - } - given("A valid file with metadata key") { - val updatedFile = - File(javaClass.classLoader.getResource("fixtures/xctestrun/UITesting_iphonesimulator12.1-x86_64.xctestrun").file) - val xctestrun by memoized { Xctestrun(updatedFile) } - - it("should accurately determine the testable target key") { - xctestrun.targetName shouldBeEqualTo "sample-appUITests" - } - } - } - }) diff --git a/vendor/vendor-ios/src/test/resources/fixtures/derived-data-manager/test_rsa b/vendor/vendor-ios/src/test/resources/fixtures/derived-data-manager/test_rsa deleted file mode 100644 index 263fcab18..000000000 --- a/vendor/vendor-ios/src/test/resources/fixtures/derived-data-manager/test_rsa +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEAwdqnLONIOf+kwmbV4anw3Yh7miW9COE4yL4IkZAhRnITJVju -egiWiJHuPDunUIGyK/PtFbO9ONO3G12m7FeIHpNu6jZJ5P2HXoN1vyXGvxE9W7g8 -vLt94ZLWNbhsYd9zKDjlSAfCGOU3gscmASO2Me6dxQ3fkksWTlRD3UGMuq6ChFgD -/RobORCLYRt3Y+So1SFiJGAE1A/nnlEy9BnD15BGGiIHBodJrmcqCZGgn/I7UpKh -srUcIje29Vv0BfaifrWFho2EdMvoAJxuPGypAIhX2nabV8OwubtBQ30H1whFLhgy -gFnd8ScuROGBBHTxZ0XPwqorSAAeoAXINIaZXwIDAQABAoIBAE6IfC1tLjeA34h6 -DK/NHu1Ae4JpQ3mzdEOu6N2/nBtj32nD62i4zfMp22+/Yvr0b+/qc+PU2xWIf6ew -ew1IMLbiV46+y5TfONYLP8peTXPeUhM0QjbbZhXaXLmKqy3DTm2/DvPtYK6hPanX -cAgKJad42aWZBzfG/5RgAtZB1fdSQdJqUTD/3fwGQJ1BfDgGAwgTBQYaJbcz+d9F -S+ecIMY2wPhtIb/MXz2EFUQlVOKj9EcpaztYoh/Fme+egD57VynFjnY3apCoX/3T -2MVUVRkFdjQXv3Zg2YWzUHPhLE8mIOjgeKrPvydydlv94eeU/y3X8I7fjsv7mpBP -nqnAofECgYEA9qhAxmLWzpYJ42PQ15xON7NA0sy26jgwzIS8GGASBOLFSHoXXv6u -0M6QtF9mldovXdzcGUGkNr1WCrBe5dQikBD9UEpu0JkxKRO2KHfqDJCzUefHe8c/ -ydG0sw6h6/n+qcKOjb1jU7g3EZzvDEbD28M80ri2tD37N7IOEn9JOUMCgYEAyTJj -EhCooRWIx+3YAL8F7xjVEzyX4n9kNyp7ypjjvQFVEx2otZkOQ/p52TpLMs6fuFiO -14nswyQglNPECGtMwco4QQAgn5vIjyfzJhJybWiTZ++oKnpuf04vpiVpqDZDF98n -R0ciVcbWBaU5xUcVjHtzM+8CeK7H62xzt9rGH7UCgYEAmbXmj/r+VEVqKhuFBShy -EgISLovGnZWgy4MYWLRd5k+PlAgJ0ngyZwujX9Rn8JDEneDKBK9Eb5x0JzscGGun -klIUGloYTsR4v1l6ViPMZkIyjaM8TGWx2cpmqoM+4viq/A2zmp7gbEbLgp1i1yqu -WaCEoejcatyJVn8Oh/ZsolMCgYAzxNpHCLBLGn5iaymcL4q4Vdxlob63Ee5YX38Q -xzw6IsCgNY52g5ZvGWEG6v/0Z8QjK+49OYkJQR99C+wx+mH6ryzAVOcQCoaVh0MC -NdbpnfHn2XucynnqGdUa3B+On7+twcaaiYwlJA9nznbJ8xtxVUZ0Q3iQUvCv++ze -jtVRzQKBgQDy4xOzZvKIyMbCdE4elOuTWVF4PhugMhC8FudwcmDqlqGbgpI3Y/9W -9l8w+IU6kECyeFgGjzyX9inR/Z8wrOrhcpWZE55ObwK7xka5HXZwrpuMiUT67fpD -o+d0l9r4ZOCL7PlAjzgPQfY+qAHN82v1frMqgq3FdMEgKe4YgGqfug== ------END RSA PRIVATE KEY----- diff --git a/vendor/vendor-ios/src/test/resources/fixtures/derived-data-manager/test_rsa.pub b/vendor/vendor-ios/src/test/resources/fixtures/derived-data-manager/test_rsa.pub deleted file mode 100644 index 29a6e7604..000000000 --- a/vendor/vendor-ios/src/test/resources/fixtures/derived-data-manager/test_rsa.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDB2qcs40g5/6TCZtXhqfDdiHuaJb0I4TjIvgiRkCFGchMlWO56CJaIke48O6dQgbIr8+0Vs70407cbXabsV4gek27qNknk/Ydeg3W/Jca/ET1buDy8u33hktY1uGxh33MoOOVIB8IY5TeCxyYBI7Yx7p3FDd+SSxZOVEPdQYy6roKEWAP9Ghs5EIthG3dj5KjVIWIkYATUD+eeUTL0GcPXkEYaIgcGh0muZyoJkaCf8jtSkqGytRwiN7b1W/QF9qJ+tYWGjYR0y+gAnG48bKkAiFfadptXw7C5u0FDfQfXCEUuGDKAWd3xJy5E4YEEdPFnRc/CqitIAB6gBcg0hplf root@testcontainer diff --git a/vendor/vendor-ios/src/test/resources/fixtures/devices/Marathondevices b/vendor/vendor-ios/src/test/resources/fixtures/devices/Marathondevices deleted file mode 100644 index f7b5b2704..000000000 --- a/vendor/vendor-ios/src/test/resources/fixtures/devices/Marathondevices +++ /dev/null @@ -1,8 +0,0 @@ -- host: "localhost" - udid: "C3EAAF02-3D45-46AE-99E6-CB80FD41C86D" -- host: "localhost" - udid: "8471AFBB-E2F4-4145-B048-7D4C4B72F570" -- host: "localhost" - udid: "4C2EA85B-C2BD-45DE-BBE7-40BFAC4ACD7D" -- host: "localhost" - udid: "F387A8D8-1CAA-4180-AC2C-1726455FBECF" \ No newline at end of file diff --git a/vendor/vendor-ios/src/test/resources/fixtures/simctl/list_output.json b/vendor/vendor-ios/src/test/resources/fixtures/simctl/list_output.json deleted file mode 100644 index eb93fb1fb..000000000 --- a/vendor/vendor-ios/src/test/resources/fixtures/simctl/list_output.json +++ /dev/null @@ -1,492 +0,0 @@ -{ - "devicetypes": [ - { - "name": "iPhone 4s", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPhone-4s" - }, - { - "name": "iPhone 5", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPhone-5" - }, - { - "name": "iPhone 5s", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPhone-5s" - }, - { - "name": "iPhone 6", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPhone-6" - }, - { - "name": "iPhone 6 Plus", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus" - }, - { - "name": "iPhone 6s", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPhone-6s" - }, - { - "name": "iPhone 6s Plus", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus" - }, - { - "name": "iPhone 7", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPhone-7" - }, - { - "name": "iPhone 7 Plus", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPhone-7-Plus" - }, - { - "name": "iPhone 8", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPhone-8" - }, - { - "name": "iPhone 8 Plus", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPhone-8-Plus" - }, - { - "name": "iPhone SE", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPhone-SE" - }, - { - "name": "iPhone X", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPhone-X" - }, - { - "name": "iPad 2", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPad-2" - }, - { - "name": "iPad Retina", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPad-Retina" - }, - { - "name": "iPad Air", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPad-Air" - }, - { - "name": "iPad Air 2", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPad-Air-2" - }, - { - "name": "iPad (5th generation)", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPad--5th-generation-" - }, - { - "name": "iPad Pro (9.7-inch)", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-" - }, - { - "name": "iPad Pro (12.9-inch)", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPad-Pro" - }, - { - "name": "iPad Pro (12.9-inch) (2nd generation)", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---2nd-generation-" - }, - { - "name": "iPad Pro (10.5-inch)", - "identifier": "com.apple.CoreSimulator.SimDeviceType.iPad-Pro--10-5-inch-" - }, - { - "name": "Apple TV", - "identifier": "com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p" - }, - { - "name": "Apple TV 4K", - "identifier": "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-4K" - }, - { - "name": "Apple TV 4K (at 1080p)", - "identifier": "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-1080p" - }, - { - "name": "Apple Watch - 38mm", - "identifier": "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm" - }, - { - "name": "Apple Watch - 42mm", - "identifier": "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm" - }, - { - "name": "Apple Watch Series 2 - 38mm", - "identifier": "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-38mm" - }, - { - "name": "Apple Watch Series 2 - 42mm", - "identifier": "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm" - }, - { - "name": "Apple Watch Series 3 - 38mm", - "identifier": "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-3-38mm" - }, - { - "name": "Apple Watch Series 3 - 42mm", - "identifier": "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-3-42mm" - } - ], - "runtimes": [ - { - "buildversion": "15B87", - "availability": "(available)", - "name": "iOS 11.1", - "identifier": "com.apple.CoreSimulator.SimRuntime.iOS-11-1", - "version": "11.1" - }, - { - "buildversion": "15C107", - "availability": "(available)", - "name": "iOS 11.2", - "identifier": "com.apple.CoreSimulator.SimRuntime.iOS-11-2", - "version": "11.2" - }, - { - "buildversion": "15K104", - "availability": "(available)", - "name": "tvOS 11.2", - "identifier": "com.apple.CoreSimulator.SimRuntime.tvOS-11-2", - "version": "11.2" - }, - { - "buildversion": "15S100", - "availability": "(available)", - "name": "watchOS 4.2", - "identifier": "com.apple.CoreSimulator.SimRuntime.watchOS-4-2", - "version": "4.2" - } - ], - "devices": { - "iOS 11.2": [ - { - "state": "Shutting Down", - "availability": "(available)", - "name": "iPhone 5s", - "udid": "9356723A-4CFD-4950-B3E8-7C7F15B59C24" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 6", - "udid": "3E49EDFA-661D-43DC-A43E-84165ED2BDFE" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 6 Plus", - "udid": "8FF2AF48-B64C-4BAC-AC9B-36B702065AEA" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 6s", - "udid": "48538671-9304-4D25-BA5B-21E06B4C71A2" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 6s Plus", - "udid": "48949713-4EFC-40E0-AD31-1FA17FE64757" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 7", - "udid": "232470E4-1F17-4A4F-8F28-028804C59B96" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 7 Plus", - "udid": "E098AF47-F968-4D5C-A098-FE93056B1279" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 8", - "udid": "1B1B2376-4F60-47F3-A583-F69FF47C75F2" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 8 Plus", - "udid": "4387E236-4CAD-4B31-ADF8-1AEC0EC3607C" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone SE", - "udid": "72F9E06F-FBFD-4639-8157-577A0B2E9FDF" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone X", - "udid": "4E10C710-3EE5-4ED3-9C5F-31D0C6CDA09C" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPad Air", - "udid": "B796E16B-1171-4785-9888-F3EDEE6B6BBC" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPad Air 2", - "udid": "3DC5A3BC-EE15-4373-A718-DC549AAF5F48" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPad (5th generation)", - "udid": "05FFF79F-C98D-403E-BE9B-A54CF4318D5B" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPad Pro (9.7-inch)", - "udid": "58191CD1-F1AE-4119-AEA1-22E7F5169403" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPad Pro (12.9-inch)", - "udid": "28F88E58-2B9A-4C6E-A3F5-50A411B46AEB" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPad Pro (12.9-inch) (2nd generation)", - "udid": "0E15F4D2-DB24-400A-93F0-EEDF226B972E" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPad Pro (10.5-inch)", - "udid": "CFC57BE0-07D4-4FD6-B6EC-ABFB160EA5F7" - } - ], - "watchOS 4.2": [ - { - "state": "Shutdown", - "availability": "(available)", - "name": "Apple Watch - 38mm", - "udid": "ABE1BC02-8B33-49A2-A1B2-84DF120E4613" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "Apple Watch - 42mm", - "udid": "434F38CA-B70D-4FF5-9B26-33C2D465920E" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "Apple Watch Series 2 - 38mm", - "udid": "A9BE0E5B-4D3B-4EA9-AD3B-B5259E794FBF" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "Apple Watch Series 2 - 42mm", - "udid": "6C613413-0EF0-41E3-B2CD-D09728CE81DE" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "Apple Watch Series 3 - 38mm", - "udid": "841ACB1F-40DD-4064-8D48-EC73FBC5B64E" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "Apple Watch Series 3 - 42mm", - "udid": "50569C21-2B4F-4100-A5AB-49B7C6D57A40" - } - ], - "iOS 11.1": [ - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 5s", - "udid": "36E1CB56-6E06-459B-9155-8EB30DD15BEF" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 6", - "udid": "02E9DA3B-18D4-4266-8784-93512A2FE614" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 6 Plus", - "udid": "63D0962A-0A41-4BE9-A99E-E6220412BEB1" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 6s", - "udid": "EBDCFB29-67F8-411B-8480-B1916DEA5CC8" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 6s Plus", - "udid": "A9465084-648B-47B5-AD45-B7528058BB1A" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 7", - "udid": "A32D83D7-252E-41B1-8ECA-166021FBBFA1" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 7 Plus", - "udid": "4B67166B-A9B3-4368-B8CB-F515E28053F2" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 8", - "udid": "355F802F-4BEE-4650-B190-FADC07518888" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone 8 Plus", - "udid": "24FB7D98-2431-42D1-9DA4-A17088EE5A15" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone SE", - "udid": "E95E51E5-A427-433E-8059-FF381ED75C99" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPhone X", - "udid": "1E700CFF-AAD1-474B-B3AE-A82DE8B8C914" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPad Air", - "udid": "170D95D7-B2F0-4A83-808A-69EBA5C27B0B" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPad Air 2", - "udid": "522AF0C9-3E83-4AE4-A918-5BE3F85F0BE5" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPad (5th generation)", - "udid": "4A8EA2FC-ECB8-4C0A-9DA3-48DEE5E740DD" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPad Pro (9.7-inch)", - "udid": "BBAB2D1F-EEE3-4BA6-BD97-F3CA864EEE2F" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPad Pro (12.9-inch)", - "udid": "EE0B7D83-5E59-426C-AC2D-70AF2FE132B3" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPad Pro (12.9-inch) (2nd generation)", - "udid": "986C4F86-B8AF-40AA-99EE-ADC7551432E5" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "iPad Pro (10.5-inch)", - "udid": "D69911EB-9F34-4E6C-AD23-CDD06CC90A24" - } - ], - "tvOS 11.2": [ - { - "state": "Shutdown", - "availability": "(available)", - "name": "Apple TV", - "udid": "E7A5EFA5-F1B9-44F2-BBCD-4CBD6D84D0FE" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "Apple TV 4K", - "udid": "E03AD481-8EF7-492D-A207-08F19EFE5367" - }, - { - "state": "Shutdown", - "availability": "(available)", - "name": "Apple TV 4K (at 1080p)", - "udid": "3C33A365-8137-494D-ABB8-061A65CC1366" - } - ] - }, - "pairs": { - "60BACA2D-61CD-45EF-9D86-C9F777A9A215": { - "watch": { - "name": "Apple Watch Series 2 - 38mm", - "udid": "A9BE0E5B-4D3B-4EA9-AD3B-B5259E794FBF", - "state": "Shutdown" - }, - "phone": { - "name": "iPhone 7", - "udid": "232470E4-1F17-4A4F-8F28-028804C59B96", - "state": "Shutdown" - }, - "state": "(active, disconnected)" - }, - "20ADA594-FD4E-4780-8F1E-D5E275AB2D8C": { - "watch": { - "name": "Apple Watch Series 3 - 42mm", - "udid": "50569C21-2B4F-4100-A5AB-49B7C6D57A40", - "state": "Shutdown" - }, - "phone": { - "name": "iPhone 8 Plus", - "udid": "4387E236-4CAD-4B31-ADF8-1AEC0EC3607C", - "state": "Shutdown" - }, - "state": "(active, disconnected)" - }, - "15EB3742-5453-4691-BA18-20CBD746337E": { - "watch": { - "name": "Apple Watch Series 2 - 42mm", - "udid": "6C613413-0EF0-41E3-B2CD-D09728CE81DE", - "state": "Shutdown" - }, - "phone": { - "name": "iPhone 7 Plus", - "udid": "E098AF47-F968-4D5C-A098-FE93056B1279", - "state": "Shutdown" - }, - "state": "(active, disconnected)" - }, - "DC98DC50-E644-436C-B1EF-DAAA097BC9F1": { - "watch": { - "name": "Apple Watch Series 3 - 38mm", - "udid": "841ACB1F-40DD-4064-8D48-EC73FBC5B64E", - "state": "Shutdown" - }, - "phone": { - "name": "iPhone 8", - "udid": "1B1B2376-4F60-47F3-A583-F69FF47C75F2", - "state": "Shutdown" - }, - "state": "(active, disconnected)" - } - } -} diff --git a/vendor/vendor-ios/src/test/resources/fixtures/test_output/mixed_0.log b/vendor/vendor-ios/src/test/resources/fixtures/test_output/mixed_0.log deleted file mode 100644 index 20db0b7e3..000000000 --- a/vendor/vendor-ios/src/test/resources/fixtures/test_output/mixed_0.log +++ /dev/null @@ -1,55 +0,0 @@ -Test Suite 'Selected tests' started at 2018-09-15 20:02:22.316 -Test Suite 'sample-appUITests.xctest' started at 2018-09-15 20:02:22.317 -Test Suite 'FlakyTests' started at 2018-09-15 20:02:22.317 -Test Case '-[sample_appUITests.FlakyTests testTextFlaky3]' started. - t = 0.00s Start Test at 2018-09-15 20:02:22.318 - t = 0.05s Set Up - t = 0.05s Open com.agoda.sample-app - t = 0.08s Launch com.agoda.sample-app - t = 5.43s Wait for com.agoda.sample-app to idle - t = 6.68s Tear Down -Test Case '-[sample_appUITests.FlakyTests testTextFlaky3]' passed (6.879 seconds). -Test Case '-[sample_appUITests.FlakyTests testTextFlaky4]' started. - t = 0.00s Start Test at 2018-09-15 20:02:29.198 - t = 0.01s Set Up - t = 0.11s Open com.agoda.sample-app - t = 0.12s Launch com.agoda.sample-app - t = 0.12s Terminate com.agoda.sample-app:9038 - t = 2.85s Wait for com.agoda.sample-app to idle - t = 3.87s Tear Down -Test Case '-[sample_appUITests.FlakyTests testTextFlaky4]' passed (4.072 seconds). -Test Case '-[sample_appUITests.FlakyTests testTextFlaky5]' started. - t = 0.00s Start Test at 2018-09-15 20:02:33.270 - t = 0.01s Set Up - t = 0.12s Open com.agoda.sample-app - t = 0.13s Launch com.agoda.sample-app - t = 0.13s Terminate com.agoda.sample-app:9058 - t = 2.86s Wait for com.agoda.sample-app to idle - t = 4.10s Tear Down -Test Case '-[sample_appUITests.FlakyTests testTextFlaky5]' passed (4.301 seconds). -Test Case '-[sample_appUITests.FlakyTests testTextFlaky6]' started. - t = 0.00s Start Test at 2018-09-15 20:02:37.571 - t = 0.01s Set Up - t = 0.11s Open com.agoda.sample-app - t = 0.13s Launch com.agoda.sample-app - t = 0.13s Terminate com.agoda.sample-app:9079 - t = 3.06s Wait for com.agoda.sample-app to idle - t = 4.13s Assertion Failure: FlakyTests.swift:63: XCTAssertTrue failed - - t = 4.14s Tear Down -Test Case '-[sample_appUITests.FlakyTests testTextFlaky6]' failed (4.341 seconds). -Test Case '-[sample_appUITests.FlakyTests testTextFlaky7]' started. - t = 0.00s Start Test at 2018-09-15 20:02:41.912 - t = 0.01s Set Up - t = 0.11s Open com.agoda.sample-app - t = 0.12s Launch com.agoda.sample-app - t = 0.12s Terminate com.agoda.sample-app:9093 - t = 2.86s Wait for com.agoda.sample-app to idle - t = 4.03s Assertion Failure: FlakyTests.swift:68: XCTAssertTrue failed - - t = 4.04s Tear Down -Test Case '-[sample_appUITests.FlakyTests testTextFlaky7]' failed (4.243 seconds). -Test Suite 'FlakyTests' failed at 2018-09-15 20:02:46.156. - Executed 5 tests, with 2 failures (0 unexpected) in 23.836 (23.839) seconds -Test Suite 'sample-appUITests.xctest' failed at 2018-09-15 20:02:46.156. - Executed 5 tests, with 2 failures (0 unexpected) in 23.836 (23.839) seconds -Test Suite 'Selected tests' failed at 2018-09-15 20:02:46.157. - Executed 5 tests, with 2 failures (0 unexpected) in 23.836 (23.840) seconds diff --git a/vendor/vendor-ios/src/test/resources/fixtures/test_output/success_0.log b/vendor/vendor-ios/src/test/resources/fixtures/test_output/success_0.log deleted file mode 100644 index 13398453e..000000000 --- a/vendor/vendor-ios/src/test/resources/fixtures/test_output/success_0.log +++ /dev/null @@ -1,35 +0,0 @@ -User defaults from command line: - IDEDerivedDataPathOverride = /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a - IDETestRunOnlyIdentifiers = ( - "sample-appUITests/MoreTests/testPresentModal" -) - IDETestRunSpecificationPath = /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/UITesting_iphonesimulator11.2-x86_64.xctestrun - -2018-09-15 01:08:49.715033+0700 sample-appUITests-Runner[26010:493593] +[CATransaction synchronize] called within transaction -2018-09-15 01:08:49.725248+0700 sample-appUITests-Runner[26010:493593] Running tests... -Test Suite 'Selected tests' started at 2018-09-15 01:08:51.146 -Test Suite 'sample-appUITests.xctest' started at 2018-09-15 01:08:51.147 -Test Suite 'MoreTests' started at 2018-09-15 01:08:51.147 -Test Case '-[sample_appUITests.MoreTests testPresentModal]' started. - t = 0.00s Start Test at 2018-09-15 01:08:51.148 - t = 0.03s Set Up - t = 0.03s Open com.agoda.sample-app - t = 0.06s Launch com.agoda.sample-app - t = 2.61s Wait for com.agoda.sample-app to idle - t = 3.85s Waiting 30.0s for Button to exist - t = 4.85s Checking `Expect predicate `exists == 1` for object Button` - t = 4.86s Tap Button - t = 4.86s Wait for com.agoda.sample-app to idle - t = 4.87s Find the Button - t = 4.98s Wait for com.agoda.sample-app to idle - t = 4.99s Synthesize event - t = 5.07s Wait for com.agoda.sample-app to idle - t = 5.11s Tear Down -Test Case '-[sample_appUITests.MoreTests testPresentModal]' passed (5.315 seconds). -Test Suite 'MoreTests' passed at 2018-09-15 01:08:56.463. - Executed 1 test, with 0 failures (0 unexpected) in 5.315 (5.316) seconds -Test Suite 'sample-appUITests.xctest' passed at 2018-09-15 01:08:56.464. - Executed 1 test, with 0 failures (0 unexpected) in 5.315 (5.317) seconds -Test Suite 'Selected tests' passed at 2018-09-15 01:08:56.464. - Executed 1 test, with 0 failures (0 unexpected) in 5.315 (5.318) seconds -** TEST EXECUTE SUCCEEDED ** diff --git a/vendor/vendor-ios/src/test/resources/fixtures/test_output/success_multiple_0.log b/vendor/vendor-ios/src/test/resources/fixtures/test_output/success_multiple_0.log deleted file mode 100644 index 924ecb172..000000000 --- a/vendor/vendor-ios/src/test/resources/fixtures/test_output/success_multiple_0.log +++ /dev/null @@ -1,27 +0,0 @@ -Test Suite 'Selected tests' started at 2018-09-15 17:54:10.750 -Test Suite 'sample-appUITests.xctest' started at 2018-09-15 17:54:10.750 -Test Suite 'FlakyTests' started at 2018-09-15 17:54:10.751 -Test Case '-[sample_appUITests.FlakyTests testTextFlaky1]' started. - t = 0.00s Start Test at 2018-09-15 17:54:10.751 - t = 0.04s Set Up - t = 0.04s Open com.agoda.sample-app - t = 0.06s Launch com.agoda.sample-app - t = 2.98s Wait for com.agoda.sample-app to idle - t = 4.21s Tear Down -Test Case '-[sample_appUITests.FlakyTests testTextFlaky1]' passed (4.415 seconds). -Test Case '-[sample_appUITests.FlakyTests testTextFlaky2]' started. - t = 0.00s Start Test at 2018-09-15 17:54:15.166 - t = 0.01s Set Up - t = 0.11s Open com.agoda.sample-app - t = 0.12s Launch com.agoda.sample-app - t = 0.12s Terminate com.agoda.sample-app:2190 - t = 2.80s Wait for com.agoda.sample-app to idle - t = 3.92s Tear Down -Test Case '-[sample_appUITests.FlakyTests testTextFlaky2]' passed (4.118 seconds). -Test Suite 'FlakyTests' passed at 2018-09-15 17:54:19.285. - Executed 2 tests, with 0 failures (0 unexpected) in 8.533 (8.534) seconds -Test Suite 'sample-appUITests.xctest' passed at 2018-09-15 17:54:19.285. - Executed 2 tests, with 0 failures (0 unexpected) in 8.533 (8.535) seconds -Test Suite 'Selected tests' passed at 2018-09-15 17:54:19.286. - Executed 2 tests, with 0 failures (0 unexpected) in 8.533 (8.536) seconds -** TEST EXECUTE SUCCEEDED ** diff --git a/vendor/vendor-ios/src/test/resources/fixtures/xctestrun/UITesting_iphonesimulator11.2-x86_64-reordered.xctestrun b/vendor/vendor-ios/src/test/resources/fixtures/xctestrun/UITesting_iphonesimulator11.2-x86_64-reordered.xctestrun deleted file mode 100644 index c17c6a32b..000000000 --- a/vendor/vendor-ios/src/test/resources/fixtures/xctestrun/UITesting_iphonesimulator11.2-x86_64-reordered.xctestrun +++ /dev/null @@ -1,79 +0,0 @@ - - - - - sample-appUITests - - SkipTestIdentifiers - - SkippedSuite - StoryboardTests/testDisabledButton - MoreTests/testDismissModal - - BundleIdentifiersForCrashReportEmphasis - - com.agoga.sample-appUITests - com.agoda.sample-app - - CommandLineArguments - - UITargetAppMainThreadCheckerEnabled - - UITargetAppPath - __TESTROOT__/Debug-iphonesimulator/sample-app.app - UITargetAppCommandLineArguments - - DependentProductPaths - - __TESTROOT__/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest - __TESTROOT__/Debug-iphonesimulator/sample-app.app - - IsUITestBundle - - IsXCTRunnerHostedTestBundle - - ProductModuleName - sample_appUITests - SystemAttachmentLifetime - deleteOnSuccess - TestBundlePath - __TESTHOST__/PlugIns/sample-appUITests.xctest - TestHostBundleIdentifier - com.apple.test.sample-appUITests-Runner - TestHostPath - __TESTROOT__/Debug-iphonesimulator/sample-appUITests-Runner.app - TestingEnvironmentVariables - - DYLD_FRAMEWORK_PATH - __TESTROOT__/Debug-iphonesimulator:__PLATFORMS__/iPhoneSimulator.platform/Developer/Library/Frameworks:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 11.1.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks - DYLD_INSERT_LIBRARIES - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 11.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib - DYLD_LIBRARY_PATH - __TESTROOT__/Debug-iphonesimulator:__PLATFORMS__/iPhoneSimulator.platform/Developer/Library/Frameworks:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 11.1.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks - MTC_CRASH_ON_REPORT - 1 - XCODE_DBG_XPC_EXCLUSIONS - com.apple.dt.xctestSymbolicator - - ToolchainsSettingValue - - UserAttachmentLifetime - deleteOnSuccess - EnvironmentVariables - - __XCODE_BUILT_PRODUCTS_DIR_PATHS - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - __XPC_DYLD_FRAMEWORK_PATH - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - __XPC_DYLD_LIBRARY_PATH - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - DYLD_FRAMEWORK_PATH - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - DYLD_LIBRARY_PATH - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - OS_ACTIVITY_DT_MODE - YES - - - - diff --git a/vendor/vendor-ios/src/test/resources/fixtures/xctestrun/UITesting_iphonesimulator11.2-x86_64.xctestrun b/vendor/vendor-ios/src/test/resources/fixtures/xctestrun/UITesting_iphonesimulator11.2-x86_64.xctestrun deleted file mode 100644 index 59bdbe8fd..000000000 --- a/vendor/vendor-ios/src/test/resources/fixtures/xctestrun/UITesting_iphonesimulator11.2-x86_64.xctestrun +++ /dev/null @@ -1,79 +0,0 @@ - - - - - sample-appUITests - - BundleIdentifiersForCrashReportEmphasis - - com.agoga.sample-appUITests - com.agoda.sample-app - - CommandLineArguments - - DependentProductPaths - - __TESTROOT__/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest - __TESTROOT__/Debug-iphonesimulator/sample-app.app - - EnvironmentVariables - - DYLD_FRAMEWORK_PATH - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - DYLD_LIBRARY_PATH - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - OS_ACTIVITY_DT_MODE - YES - __XCODE_BUILT_PRODUCTS_DIR_PATHS - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - __XPC_DYLD_FRAMEWORK_PATH - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - __XPC_DYLD_LIBRARY_PATH - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - - IsUITestBundle - - IsXCTRunnerHostedTestBundle - - ProductModuleName - sample_appUITests - SkipTestIdentifiers - - SkippedSuite - StoryboardTests/testDisabledButton - MoreTests/testDismissModal - - SystemAttachmentLifetime - deleteOnSuccess - TestBundlePath - __TESTHOST__/PlugIns/sample-appUITests.xctest - TestHostBundleIdentifier - com.apple.test.sample-appUITests-Runner - TestHostPath - __TESTROOT__/Debug-iphonesimulator/sample-appUITests-Runner.app - TestingEnvironmentVariables - - DYLD_FRAMEWORK_PATH - __TESTROOT__/Debug-iphonesimulator:__PLATFORMS__/iPhoneSimulator.platform/Developer/Library/Frameworks:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 11.1.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks - DYLD_INSERT_LIBRARIES - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 11.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib - DYLD_LIBRARY_PATH - __TESTROOT__/Debug-iphonesimulator:__PLATFORMS__/iPhoneSimulator.platform/Developer/Library/Frameworks:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 11.1.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks - MTC_CRASH_ON_REPORT - 1 - XCODE_DBG_XPC_EXCLUSIONS - com.apple.dt.xctestSymbolicator - - ToolchainsSettingValue - - UITargetAppCommandLineArguments - - UITargetAppMainThreadCheckerEnabled - - UITargetAppPath - __TESTROOT__/Debug-iphonesimulator/sample-app.app - UserAttachmentLifetime - deleteOnSuccess - - - diff --git a/vendor/vendor-ios/src/test/resources/fixtures/xctestrun/UITesting_iphonesimulator12.1-x86_64.xctestrun b/vendor/vendor-ios/src/test/resources/fixtures/xctestrun/UITesting_iphonesimulator12.1-x86_64.xctestrun deleted file mode 100644 index 5e41d9814..000000000 --- a/vendor/vendor-ios/src/test/resources/fixtures/xctestrun/UITesting_iphonesimulator12.1-x86_64.xctestrun +++ /dev/null @@ -1,84 +0,0 @@ - - - - - sample-appUITests - - BundleIdentifiersForCrashReportEmphasis - - com.agoga.sample-appUITests - com.agoda.sample-app - - CommandLineArguments - - DependentProductPaths - - __TESTROOT__/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest - __TESTROOT__/Debug-iphonesimulator/sample-app.app - - EnvironmentVariables - - DYLD_FRAMEWORK_PATH - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - DYLD_LIBRARY_PATH - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - OS_ACTIVITY_DT_MODE - YES - __XCODE_BUILT_PRODUCTS_DIR_PATHS - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - __XPC_DYLD_FRAMEWORK_PATH - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - __XPC_DYLD_LIBRARY_PATH - /Users/pkunzip/Development/marathon/vendor-ios/src/test/resources/src/sample-xcworkspace/a/Build/Products/Debug-iphonesimulator - - IsUITestBundle - - IsXCTRunnerHostedTestBundle - - ProductModuleName - sample_appUITests - SkipTestIdentifiers - - SkippedSuite - StoryboardTests/testDisabledButton - MoreTests/testDismissModal - - SystemAttachmentLifetime - deleteOnSuccess - TestBundlePath - __TESTHOST__/PlugIns/sample-appUITests.xctest - TestHostBundleIdentifier - com.apple.test.sample-appUITests-Runner - TestHostPath - __TESTROOT__/Debug-iphonesimulator/sample-appUITests-Runner.app - TestingEnvironmentVariables - - DYLD_FRAMEWORK_PATH - __TESTROOT__/Debug-iphonesimulator:__PLATFORMS__/iPhoneSimulator.platform/Developer/Library/Frameworks:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 11.1.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks - DYLD_INSERT_LIBRARIES - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 11.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib - DYLD_LIBRARY_PATH - __TESTROOT__/Debug-iphonesimulator:__PLATFORMS__/iPhoneSimulator.platform/Developer/Library/Frameworks:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 11.1.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks - MTC_CRASH_ON_REPORT - 1 - XCODE_DBG_XPC_EXCLUSIONS - com.apple.dt.xctestSymbolicator - - ToolchainsSettingValue - - UITargetAppCommandLineArguments - - UITargetAppMainThreadCheckerEnabled - - UITargetAppPath - __TESTROOT__/Debug-iphonesimulator/sample-app.app - UserAttachmentLifetime - deleteOnSuccess - - __xctestrun_metadata__ - - FormatVersion - 1 - - - diff --git a/vendor/vendor-ios/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/vendor/vendor-ios/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker deleted file mode 100644 index 1f0955d45..000000000 --- a/vendor/vendor-ios/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker +++ /dev/null @@ -1 +0,0 @@ -mock-maker-inline diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/.gitignore b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/.gitignore deleted file mode 100644 index c4611e83e..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ - -# Created by https://www.gitignore.io/api/xcode -# Edit at https://www.gitignore.io/?templates=xcode - -### Xcode ### -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## User settings -xcuserdata/ - -## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) -*.xcscmblueprint -*.xccheckout - -## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) -build/ -DerivedData/ -*.moved-aside -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 - -### Xcode Patch ### -*.xcodeproj/* -!*.xcodeproj/project.pbxproj -!*.xcodeproj/xcshareddata/ -!*.xcworkspace/contents.xcworkspacedata -/*.gcno -**/xcshareddata/WorkspaceSettings.xcsettings - -# End of https://www.gitignore.io/api/xcode - -derived-data/** diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/Marathondevices b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/Marathondevices deleted file mode 100644 index 88a4235f3..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/Marathondevices +++ /dev/null @@ -1,2 +0,0 @@ -- host: "localhost" - udid: "4AF4FF25-78DC-4F6E-94A5-8175E5FDC0B9" diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/Marathonfile b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/Marathonfile deleted file mode 100644 index 7be044a3e..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/Marathonfile +++ /dev/null @@ -1,30 +0,0 @@ -name: "sample-ios-app tests" -outputDir: "derived-data/Marathon" -testClassRegexes: ["^((?!Abstract).)*Tests$"] -poolingStrategy: - - type: "omni" -batchingStrategy: - type: "fixed-size" - size: 2 - lastMileLength: 0 - timeLimit: -P1D -debug: true -filteringConfiguration: - whitelist: - - type: "simple-class-name" - regex: "^(StoryboardTests|SlowTests)$" -flakinessStrategy: - type: "ignore" -retryStrategy: - type: "no-retry" -sortingStrategy: - type: "execution-time" - percentile: 99.0 - timeLimit: -P1D -testOutputTimeoutMillis: 60000 -vendorConfiguration: - type: "iOS" - derivedDataDir: "derived-data" - sourceRoot: "sample-appUITests" - remoteUsername: "ypanforov" - remotePrivateKey: "/Users/ypanforov/Developer/marathon/vendor/vendor-ios/src/test/resources/fixtures/derived-data-manager/test_rsa" diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/build-for-testing.sh b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/build-for-testing.sh deleted file mode 100755 index a84ccf9eb..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/build-for-testing.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -if [[ $# -eq 0 ]]; then - UDID="$(xcrun simctl list devices -j | jq -r '.devices | flatten | .[] | select(.availability | match("(?&2 -e "$(tput setaf 1)ERROR: Required destination simulator id is missing.$(tput sgr0)" - exit 1 -fi - -if ! XCODEBUILD="$(command -v xcodebuild)"; then - echo 1>&2 -e "$(tput setaf 1)ERROR: $(tput bold)xcodebuild$(tput sgr0) $(tput setaf 1)not found$(tput sgr0)" - exit 1 -fi - -echo -e "Building for destination $(tput bold)$XCODEBUILD_DESTINATION$(tput sgr0)" 1>&2 -NSUnbufferedIO=YES $XCODEBUILD build-for-testing -derivedDataPath derived-data -workspace sample-app.xcworkspace -scheme UITesting -sdk iphonesimulator -destination "platform=iOS Simulator,id=$XCODEBUILD_DESTINATION" 2>&1 diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/.gitignore b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/.gitignore deleted file mode 100644 index 8f2265f2f..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/.gitignore +++ /dev/null @@ -1 +0,0 @@ -!Build diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib deleted file mode 100644 index a63ca4016..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/LaunchScreen.storyboardc/Info.plist b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/LaunchScreen.storyboardc/Info.plist deleted file mode 100644 index 32288e88f..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/LaunchScreen.storyboardc/Info.plist and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib deleted file mode 100644 index de94c5731..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/7ox-Dw-FT2-view-b2c-Uo-fOB.nib/objects-11.0+.nib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/7ox-Dw-FT2-view-b2c-Uo-fOB.nib/objects-11.0+.nib deleted file mode 100644 index 1fe3bef9b..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/7ox-Dw-FT2-view-b2c-Uo-fOB.nib/objects-11.0+.nib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/7ox-Dw-FT2-view-b2c-Uo-fOB.nib/runtime.nib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/7ox-Dw-FT2-view-b2c-Uo-fOB.nib/runtime.nib deleted file mode 100644 index 47a958edd..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/7ox-Dw-FT2-view-b2c-Uo-fOB.nib/runtime.nib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib/objects-11.0+.nib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib/objects-11.0+.nib deleted file mode 100644 index 6c9d8db84..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib/objects-11.0+.nib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib/runtime.nib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib/runtime.nib deleted file mode 100644 index a2414ca09..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib/runtime.nib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/Info.plist b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/Info.plist deleted file mode 100644 index e57e4bbce..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/Info.plist and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UINavigationController-56p-VW-Fs0.nib/objects-11.0+.nib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UINavigationController-56p-VW-Fs0.nib/objects-11.0+.nib deleted file mode 100644 index 5a0fcc08d..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UINavigationController-56p-VW-Fs0.nib/objects-11.0+.nib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UINavigationController-56p-VW-Fs0.nib/runtime.nib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UINavigationController-56p-VW-Fs0.nib/runtime.nib deleted file mode 100644 index ad4f508f6..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UINavigationController-56p-VW-Fs0.nib/runtime.nib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib/objects-11.0+.nib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib/objects-11.0+.nib deleted file mode 100644 index 417cd21b3..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib/objects-11.0+.nib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib/runtime.nib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib/runtime.nib deleted file mode 100644 index ea2c47711..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib/runtime.nib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UIViewController-fJi-Vl-h77.nib/objects-11.0+.nib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UIViewController-fJi-Vl-h77.nib/objects-11.0+.nib deleted file mode 100644 index 81792ec58..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UIViewController-fJi-Vl-h77.nib/objects-11.0+.nib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UIViewController-fJi-Vl-h77.nib/runtime.nib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UIViewController-fJi-Vl-h77.nib/runtime.nib deleted file mode 100644 index 1e4517a1f..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/UIViewController-fJi-Vl-h77.nib/runtime.nib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/fJi-Vl-h77-view-ws3-eo-fxB.nib/objects-11.0+.nib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/fJi-Vl-h77-view-ws3-eo-fxB.nib/objects-11.0+.nib deleted file mode 100644 index ba3041a5c..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/fJi-Vl-h77-view-ws3-eo-fxB.nib/objects-11.0+.nib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/fJi-Vl-h77-view-ws3-eo-fxB.nib/runtime.nib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/fJi-Vl-h77-view-ws3-eo-fxB.nib/runtime.nib deleted file mode 100644 index ce4131f38..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Base.lproj/Main.storyboardc/fJi-Vl-h77-view-ws3-eo-fxB.nib/runtime.nib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftCore.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftCore.dylib deleted file mode 100755 index c8856ca1c..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftCore.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftCoreFoundation.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftCoreFoundation.dylib deleted file mode 100755 index 8331f4e39..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftCoreFoundation.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftCoreGraphics.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftCoreGraphics.dylib deleted file mode 100755 index 01e7f34fd..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftCoreGraphics.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftCoreImage.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftCoreImage.dylib deleted file mode 100755 index 79b600200..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftCoreImage.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftDarwin.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftDarwin.dylib deleted file mode 100755 index 27683799f..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftDarwin.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftDispatch.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftDispatch.dylib deleted file mode 100755 index ebcbf3ec0..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftDispatch.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftFoundation.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftFoundation.dylib deleted file mode 100755 index 2813d602b..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftFoundation.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftMetal.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftMetal.dylib deleted file mode 100755 index 1f0f24906..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftMetal.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftObjectiveC.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftObjectiveC.dylib deleted file mode 100755 index 3d5295d8c..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftObjectiveC.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftQuartzCore.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftQuartzCore.dylib deleted file mode 100755 index b3e7e355b..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftQuartzCore.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftUIKit.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftUIKit.dylib deleted file mode 100755 index 6bbd4a45c..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftUIKit.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftos.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftos.dylib deleted file mode 100755 index 04c4ac367..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Frameworks/libswiftos.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Info.plist b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Info.plist deleted file mode 100644 index 1a114b417..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/Info.plist and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/PkgInfo b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/PkgInfo deleted file mode 100644 index bd04210fb..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPL???? \ No newline at end of file diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/_CodeSignature/CodeResources b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/_CodeSignature/CodeResources deleted file mode 100644 index ce63efa91..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/_CodeSignature/CodeResources +++ /dev/null @@ -1,560 +0,0 @@ - - - - - files - - Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib - - dW6/EMGCij2QRRne+ltAQC811Qg= - - Base.lproj/LaunchScreen.storyboardc/Info.plist - - n2t8gsDpfE6XkhG31p7IQJRxTxU= - - Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib - - M2zpq4mZX7KX/nYXCI3iXA/UJMo= - - Base.lproj/Main.storyboardc/7ox-Dw-FT2-view-b2c-Uo-fOB.nib/objects-11.0+.nib - - kdCSGdBzWn6VnflnUVjaLW3XI8o= - - Base.lproj/Main.storyboardc/7ox-Dw-FT2-view-b2c-Uo-fOB.nib/runtime.nib - - lxGbCIPdFAVkSn0Vbf54hR8gQTM= - - Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib/objects-11.0+.nib - - c/L5WNJBB66ZOdUwDkp2G81V7QI= - - Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib/runtime.nib - - BOCXaZ0jg0BdRcTF3yotzsDk5IA= - - Base.lproj/Main.storyboardc/Info.plist - - xbKSeo7ifHJ5lnOkPd7IgZ3qsA4= - - Base.lproj/Main.storyboardc/UINavigationController-56p-VW-Fs0.nib/objects-11.0+.nib - - J4L+MpzBcSnsEvFpKkQCwJRwhr4= - - Base.lproj/Main.storyboardc/UINavigationController-56p-VW-Fs0.nib/runtime.nib - - pDhMJHpLQMtKJmx4xMveqi7kpvQ= - - Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib/objects-11.0+.nib - - nuJDK6jtv5sGYUr4jf4EmLQ4PtY= - - Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib/runtime.nib - - ft2JYpaEbwyqn8UX02ntmhIt/i8= - - Base.lproj/Main.storyboardc/UIViewController-fJi-Vl-h77.nib/objects-11.0+.nib - - 5I/VNyg/7rlqM2LpMf6ZQqY6Th0= - - Base.lproj/Main.storyboardc/UIViewController-fJi-Vl-h77.nib/runtime.nib - - ed9M6FGOzQ/C7mlxOcF7QW5KZ1I= - - Base.lproj/Main.storyboardc/fJi-Vl-h77-view-ws3-eo-fxB.nib/objects-11.0+.nib - - NC5ifMZeQC4P/5JVt+eik1XQYVY= - - Base.lproj/Main.storyboardc/fJi-Vl-h77-view-ws3-eo-fxB.nib/runtime.nib - - bLpYrQ9FjDxcogw32CP/06dPhvA= - - Frameworks/libswiftCore.dylib - - rUCFys+AWOss+EWBCEaOAdpVX20= - - Frameworks/libswiftCoreFoundation.dylib - - jbz8bbI4t9dRPuKdA8ZNhNXyo0U= - - Frameworks/libswiftCoreGraphics.dylib - - huTIMrZ/kA9A9Tt76byI5EBXS/U= - - Frameworks/libswiftCoreImage.dylib - - Wu1YkAmxP7mstnopw5nN9sXGCIE= - - Frameworks/libswiftDarwin.dylib - - HfrGp9Y0cL2SCmQ+awrpNSMGANA= - - Frameworks/libswiftDispatch.dylib - - aadtyAmEfkIdYfh81AwgW+NUUlY= - - Frameworks/libswiftFoundation.dylib - - KDSxmmBbVm/BCHhB5OnzmK4VXk4= - - Frameworks/libswiftMetal.dylib - - TV0+UepDX7RtCIx7UJBbFxaK8wA= - - Frameworks/libswiftObjectiveC.dylib - - 99VfCrz1VAs+mYzEBYpEDprb2gk= - - Frameworks/libswiftQuartzCore.dylib - - hhpGzWzg7Xz2I6HFQLT5M+dryRA= - - Frameworks/libswiftUIKit.dylib - - YLcEdnA1g3YssJbn8B2WVNm0X3A= - - Frameworks/libswiftos.dylib - - hQVrRh/sl7ae3Ihai9e/V8V2zKQ= - - Info.plist - - GnfynkmsYg7oZ1RiwyRp07+MGl4= - - PkgInfo - - n57qDP4tZfLD1rCS43W0B4LQjzE= - - libswiftRemoteMirror.dylib - - RcicIP0lKALIvOAuOlDdMvzAUTU= - - - files2 - - Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib - - hash - - dW6/EMGCij2QRRne+ltAQC811Qg= - - hash2 - - 2LfXO1azFKgHX/O5y7Cs/QTv5rJJO1qBW1OkNX6uvgQ= - - - Base.lproj/LaunchScreen.storyboardc/Info.plist - - hash - - n2t8gsDpfE6XkhG31p7IQJRxTxU= - - hash2 - - HyVdXMU7Ux4/KalAao30mpWOK/lEPT4gvYN09wf31cg= - - - Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib - - hash - - M2zpq4mZX7KX/nYXCI3iXA/UJMo= - - hash2 - - 03CJY4V84Vrz5eKo2tzsMXfpwu0BzeGJ3TKxUfQvLlA= - - - Base.lproj/Main.storyboardc/7ox-Dw-FT2-view-b2c-Uo-fOB.nib/objects-11.0+.nib - - hash - - kdCSGdBzWn6VnflnUVjaLW3XI8o= - - hash2 - - aGmBzulliaTAdrATJ8Yklw1rhMBcpp3DK+Yfq4BtwbI= - - - Base.lproj/Main.storyboardc/7ox-Dw-FT2-view-b2c-Uo-fOB.nib/runtime.nib - - hash - - lxGbCIPdFAVkSn0Vbf54hR8gQTM= - - hash2 - - 08UNuZBe+6j43LInc0CzKrM1hnK73YmR+71+/3xMJFU= - - - Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib/objects-11.0+.nib - - hash - - c/L5WNJBB66ZOdUwDkp2G81V7QI= - - hash2 - - L+Z2n9I38/Tts5Yq37Lw05knBGUzltXkgBL88IGr0fQ= - - - Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib/runtime.nib - - hash - - BOCXaZ0jg0BdRcTF3yotzsDk5IA= - - hash2 - - KxlsebGIkjfdTL9ZxPrhdh429qaSu4rPQVUo137TAHI= - - - Base.lproj/Main.storyboardc/Info.plist - - hash - - xbKSeo7ifHJ5lnOkPd7IgZ3qsA4= - - hash2 - - XCMwVLFbed+/whlcjyanNWWkOnvI830DipkvBbJE5no= - - - Base.lproj/Main.storyboardc/UINavigationController-56p-VW-Fs0.nib/objects-11.0+.nib - - hash - - J4L+MpzBcSnsEvFpKkQCwJRwhr4= - - hash2 - - BUDFnaBWA7YV3D5p63o6h2QYXj+t2mYR3RdCzjjSf6o= - - - Base.lproj/Main.storyboardc/UINavigationController-56p-VW-Fs0.nib/runtime.nib - - hash - - pDhMJHpLQMtKJmx4xMveqi7kpvQ= - - hash2 - - tvxFEp66Le6Z0r2hI4ALrelp5H7s+IXCa2L1nFS1+5g= - - - Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib/objects-11.0+.nib - - hash - - nuJDK6jtv5sGYUr4jf4EmLQ4PtY= - - hash2 - - lYNWVtOoKexlqp7BwJyzajnMbAigQ+0t8jJ1OaRYGKQ= - - - Base.lproj/Main.storyboardc/UIViewController-BYZ-38-t0r.nib/runtime.nib - - hash - - ft2JYpaEbwyqn8UX02ntmhIt/i8= - - hash2 - - FfKVTH25L/wRRkrrMGmzwfDtQt9729PGvyzFFyPsJUY= - - - Base.lproj/Main.storyboardc/UIViewController-fJi-Vl-h77.nib/objects-11.0+.nib - - hash - - 5I/VNyg/7rlqM2LpMf6ZQqY6Th0= - - hash2 - - RSGvAkqBHTweAmTGZM3XKTLTXCnWE6pFIxEcmZx+mnk= - - - Base.lproj/Main.storyboardc/UIViewController-fJi-Vl-h77.nib/runtime.nib - - hash - - ed9M6FGOzQ/C7mlxOcF7QW5KZ1I= - - hash2 - - HghkUBcJkZudoCXO8u0slF5Iyr7MkFfaU6YYyasCQYg= - - - Base.lproj/Main.storyboardc/fJi-Vl-h77-view-ws3-eo-fxB.nib/objects-11.0+.nib - - hash - - NC5ifMZeQC4P/5JVt+eik1XQYVY= - - hash2 - - eQm15tDaBRMJU91Er816mLyST4r5TatG8YuiwcGwORY= - - - Base.lproj/Main.storyboardc/fJi-Vl-h77-view-ws3-eo-fxB.nib/runtime.nib - - hash - - bLpYrQ9FjDxcogw32CP/06dPhvA= - - hash2 - - 4rXsfy3OxYt9yIwS9lQ24cljTUnMjr9JIV282bDOwZ0= - - - Frameworks/libswiftCore.dylib - - hash - - rUCFys+AWOss+EWBCEaOAdpVX20= - - hash2 - - 5c45AY8E34APUJ02LozOtR2igenlBK08vCPlUThxyHc= - - - Frameworks/libswiftCoreFoundation.dylib - - hash - - jbz8bbI4t9dRPuKdA8ZNhNXyo0U= - - hash2 - - XutxDO/xfAJnQNuq6JnEePNfiUQ8U/ryfBXX2psc4B8= - - - Frameworks/libswiftCoreGraphics.dylib - - hash - - huTIMrZ/kA9A9Tt76byI5EBXS/U= - - hash2 - - bY5S/mHiwL6FnLuXRcPqkKGoZ7qULKNnxsEA9kM625k= - - - Frameworks/libswiftCoreImage.dylib - - hash - - Wu1YkAmxP7mstnopw5nN9sXGCIE= - - hash2 - - mC7BoHtfzGO5nMfKqXh+X9GRssaU7iDBxvx3RagVIq8= - - - Frameworks/libswiftDarwin.dylib - - hash - - HfrGp9Y0cL2SCmQ+awrpNSMGANA= - - hash2 - - VgKoc5SgoJfjPo7PE/q2hS0+TaEuN4g2OUajV0ymBEo= - - - Frameworks/libswiftDispatch.dylib - - hash - - aadtyAmEfkIdYfh81AwgW+NUUlY= - - hash2 - - xMGfLQyCyS4eOkvKlq0r05kE2eu1YO4XXq1Q7/GT+/Y= - - - Frameworks/libswiftFoundation.dylib - - hash - - KDSxmmBbVm/BCHhB5OnzmK4VXk4= - - hash2 - - E5T6Vbdthahjlf9G95yptQ02WMqndCwMAnhE96KhhMk= - - - Frameworks/libswiftMetal.dylib - - hash - - TV0+UepDX7RtCIx7UJBbFxaK8wA= - - hash2 - - gKLRRIYwql9Su1SCvRbBxbUjfODveR6pgItl9hUvqOI= - - - Frameworks/libswiftObjectiveC.dylib - - hash - - 99VfCrz1VAs+mYzEBYpEDprb2gk= - - hash2 - - zizfRBOJvZce/ijXvRKaB6HQviolXYn+VCzubjxR9XM= - - - Frameworks/libswiftQuartzCore.dylib - - hash - - hhpGzWzg7Xz2I6HFQLT5M+dryRA= - - hash2 - - 8H1/KFcZfdb11FVsUdnlOOEAYrpcFiAJW1Jx5EadV8U= - - - Frameworks/libswiftUIKit.dylib - - hash - - YLcEdnA1g3YssJbn8B2WVNm0X3A= - - hash2 - - +wsxu+pKAFkwHd2n1kcJwqB2Kz39qUP5vh20y/nGies= - - - Frameworks/libswiftos.dylib - - hash - - hQVrRh/sl7ae3Ihai9e/V8V2zKQ= - - hash2 - - UUaqIgGhrYsBoJKQNjneHQu4j4eYgCbPAUQ/p7f+NQo= - - - libswiftRemoteMirror.dylib - - hash - - RcicIP0lKALIvOAuOlDdMvzAUTU= - - hash2 - - pNGoc8Omi1Q7fyo3tX9f9QQD+3bPNkeRj0/N1hb+Cmw= - - - - rules - - ^ - - ^.*\.lproj/ - - optional - - weight - 1000 - - ^.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Base\.lproj/ - - weight - 1010 - - ^version.plist$ - - - rules2 - - .*\.dSYM($|/) - - weight - 11 - - ^ - - weight - 20 - - ^(.*/)?\.DS_Store$ - - omit - - weight - 2000 - - ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ - - nested - - weight - 10 - - ^.* - - ^.*\.lproj/ - - optional - - weight - 1000 - - ^.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Base\.lproj/ - - weight - 1010 - - ^Info\.plist$ - - omit - - weight - 20 - - ^PkgInfo$ - - omit - - weight - 20 - - ^[^/]+$ - - nested - - weight - 10 - - ^embedded\.provisionprofile$ - - weight - 20 - - ^version\.plist$ - - weight - 20 - - - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/libswiftRemoteMirror.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/libswiftRemoteMirror.dylib deleted file mode 100755 index 4b9f774a1..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/libswiftRemoteMirror.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/sample-app b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/sample-app deleted file mode 100755 index 5bf7548df..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-app.app/sample-app and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/Info.plist b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/Info.plist deleted file mode 100644 index c768484ca..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/Info.plist and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/XCTAutomationSupport b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/XCTAutomationSupport deleted file mode 100755 index 7c84c7787..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/XCTAutomationSupport and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/_CodeSignature/CodeResources b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/_CodeSignature/CodeResources deleted file mode 100644 index cfa9942c6..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/_CodeSignature/CodeResources +++ /dev/null @@ -1,136 +0,0 @@ - - - - - files - - Info.plist - - sNzY3Sa/tiwF8YD3qNGhy4xzXzw= - - version.plist - - tqIAxSzNYfdxtnMPZFYj3CkoM94= - - - files2 - - version.plist - - hash - - tqIAxSzNYfdxtnMPZFYj3CkoM94= - - hash2 - - vZtTCcALD/lhBLz+nE9AaZOJ6HRuLwq4RyMhBk/UWw8= - - - - rules - - ^ - - ^.*\.lproj/ - - optional - - weight - 1000 - - ^.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Base\.lproj/ - - weight - 1010 - - ^version.plist$ - - - rules2 - - .*\.dSYM($|/) - - weight - 11 - - ^ - - weight - 20 - - ^(.*/)?\.DS_Store$ - - omit - - weight - 2000 - - ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ - - nested - - weight - 10 - - ^.* - - ^.*\.lproj/ - - optional - - weight - 1000 - - ^.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Base\.lproj/ - - weight - 1010 - - ^Info\.plist$ - - omit - - weight - 20 - - ^PkgInfo$ - - omit - - weight - 20 - - ^[^/]+$ - - nested - - weight - 10 - - ^embedded\.provisionprofile$ - - weight - 20 - - ^version\.plist$ - - weight - 20 - - - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/version.plist b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/version.plist deleted file mode 100644 index 9dc861702..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTAutomationSupport.framework/version.plist +++ /dev/null @@ -1,18 +0,0 @@ - - - - - BuildAliasOf - XCTest - BuildVersion - 1 - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - ProjectName - XCTest_Sim - SourceVersion - 13764000000000000 - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/Info.plist b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/Info.plist deleted file mode 100644 index bba4a0b4b..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/Info.plist and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/XCTest b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/XCTest deleted file mode 100755 index 6dadd54e0..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/XCTest and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/_CodeSignature/CodeResources b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/_CodeSignature/CodeResources deleted file mode 100644 index 48baed4c7..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/_CodeSignature/CodeResources +++ /dev/null @@ -1,803 +0,0 @@ - - - - - files - - Headers/XCAbstractTest.h - - 4jnRu9kM4nMP+Xh3ikwmHuBDxsI= - - Headers/XCTActivity.h - - BVKd+CuVL/fMWVnojVTY7BZiXkc= - - Headers/XCTAttachment.h - - D+igalTdqMWvG/cB1056ns8u3B8= - - Headers/XCTAttachmentLifetime.h - - Qi0F8Z3qRbkbVrjHzxpLaMrHT+k= - - Headers/XCTContext.h - - S2c/fkq5xnjLgsMY3mNIE7jPMFE= - - Headers/XCTDarwinNotificationExpectation.h - - T1bfewH+fYADesmaBVQWzTdVRjk= - - Headers/XCTKVOExpectation.h - - s28+hglUCU24y2eMlji4++ZVC+0= - - Headers/XCTNSNotificationExpectation.h - - ZC9t23DBiU7y/pJ116Zgt8q1/J4= - - Headers/XCTNSPredicateExpectation.h - - ZeWBK1Un0h29h5DRuqDXCiqCOnk= - - Headers/XCTWaiter.h - - 3xRcrUqW54PHl7VXGv1RNSfgZAg= - - Headers/XCTest.apinotes - - WqUywzmEAqoV6c0qeOnMA2dcIQc= - - Headers/XCTest.h - - vyHRJ5iIHDimvUMhPRtMJzhrlW4= - - Headers/XCTestAssertions.h - - t430vwqgq3wiAocVV386i0N+lOY= - - Headers/XCTestAssertionsImpl.h - - ZbDVHohdSHIPtEqmg7zN34qa0T4= - - Headers/XCTestCase+AsynchronousTesting.h - - eC80b6p4MAnn/amp9qgAOF/JnyY= - - Headers/XCTestCase.h - - 7cm+qMjwhWmKgQWOex4Hjcc2jvs= - - Headers/XCTestCaseRun.h - - /XUqDHA/BFdQDUxQU8Ft5LXo/Ps= - - Headers/XCTestDefines.h - - wgEh+arKAaJ2OX5pBm7Hh3ft0jY= - - Headers/XCTestErrors.h - - oZFqJmcKHuKZIgeKOwsFDxhfEEc= - - Headers/XCTestExpectation.h - - Y/ssvPOSAIHfa/G1pVREFYwgDq8= - - Headers/XCTestLog.h - - 9BU/gwbaKcfn2L9dfo2dHRFN6Bc= - - Headers/XCTestObservation.h - - 24hjfD82jAN7/PhxU8RiEWTo5gs= - - Headers/XCTestObservationCenter.h - - 5ySsNYFGF0ZFvLZnL7UTg1HNRR4= - - Headers/XCTestObserver.h - - DV3Cjdd1CAe6nYFEzmUrCtnzxQg= - - Headers/XCTestProbe.h - - fIVR0xRsxMAabrJmeGX3hPDwL0Y= - - Headers/XCTestRun.h - - 7GVNxTeghh0aBxY/Gvb+j2VTkqQ= - - Headers/XCTestSuite.h - - eRc+OVrMoZSKfP/hWkP9044Xkwo= - - Headers/XCTestSuiteRun.h - - OX+g52bOAnhjLVDKkweTKM8jTHQ= - - Headers/XCUIApplication.h - - 3xPGyAQELvSZZ4RHMwhQEnlzFhg= - - Headers/XCUICoordinate.h - - ISpzcCIN+bNtcvHSlqKq3H0dHAA= - - Headers/XCUIDevice.h - - 6pJZzs6nb9PxIhPZMSzM3Pnoyyk= - - Headers/XCUIElement.h - - csedByP43miIpAyfC8qT1PdhfSU= - - Headers/XCUIElementAttributes.h - - kWitRD0ClLa1hUvctZ6Jw2DmOW8= - - Headers/XCUIElementQuery.h - - C3ZXTnkZIFu38bImb5YnKX8ME3s= - - Headers/XCUIElementTypeQueryProvider.h - - RByqnqCJz+rOh+n5b6A0LWE4ipY= - - Headers/XCUIElementTypes.h - - r6naN5HO1+6krqDyXc3YqPmLBgw= - - Headers/XCUIKeyboardKeys.h - - N6DDr++AC3URGk9/PoyCGpq5h9k= - - Headers/XCUIRemote.h - - +rbCM60bDizOcqH+NaoTiCwtEH4= - - Headers/XCUIScreen.h - - /ub1WB6+9GFwYxGEGsIzKvyt/mg= - - Headers/XCUIScreenshot.h - - WRAFpS5fsJOjpa68uJDYY7QcwzQ= - - Headers/XCUIScreenshotProviding.h - - qghz8l697gauRG1WZGkXCsisS40= - - Headers/XCUISiriService.h - - NtIeUU61kDhd8LGgBr1FjKXe6JQ= - - Info.plist - - CYfyvPIGUR84QvCD7SuNDvG6Bxc= - - Modules/module.modulemap - - ha0qqLvU0UdkLu07qH5tE4agQV4= - - en.lproj/InfoPlist.strings - - hash - - TuBj57ZP6zBqcL9HttO2Rucaw9E= - - optional - - - version.plist - - Etc/8BPenX54rv1uBx24u4bnqTg= - - - files2 - - Headers/XCAbstractTest.h - - hash - - 4jnRu9kM4nMP+Xh3ikwmHuBDxsI= - - hash2 - - IFgW59C1Ktqp4LtLT30sw91amGbNOGweE+JfCOD3+Zg= - - - Headers/XCTActivity.h - - hash - - BVKd+CuVL/fMWVnojVTY7BZiXkc= - - hash2 - - rRcgcNhfkv8++PLGoc2+V7RKA+20od2gktcAZnNphso= - - - Headers/XCTAttachment.h - - hash - - D+igalTdqMWvG/cB1056ns8u3B8= - - hash2 - - 5aviQX7pgXyeS3UISWFOjiiUf8kPCzFtPNnk08B2rrQ= - - - Headers/XCTAttachmentLifetime.h - - hash - - Qi0F8Z3qRbkbVrjHzxpLaMrHT+k= - - hash2 - - Rgc8y3HDwwo+o1r5F3cM/Qx1oWjHjCU7NM42hjfXSas= - - - Headers/XCTContext.h - - hash - - S2c/fkq5xnjLgsMY3mNIE7jPMFE= - - hash2 - - aKMqn4OBmb2Fg3/8sTMLXW2eHWiyWP3bQkSzTnvrwmQ= - - - Headers/XCTDarwinNotificationExpectation.h - - hash - - T1bfewH+fYADesmaBVQWzTdVRjk= - - hash2 - - yghcN+Vtx2KfRi9uMiorSiMSUWkgipo2aBxjXGpindM= - - - Headers/XCTKVOExpectation.h - - hash - - s28+hglUCU24y2eMlji4++ZVC+0= - - hash2 - - s24Kr8S1fbS62TmPjWUVYBWo7l0mxOge/yAw3RVvRCQ= - - - Headers/XCTNSNotificationExpectation.h - - hash - - ZC9t23DBiU7y/pJ116Zgt8q1/J4= - - hash2 - - vHwq0rw8c1B93uSPcxyrdcpNF6gp5UqVvnMHKFPMSMg= - - - Headers/XCTNSPredicateExpectation.h - - hash - - ZeWBK1Un0h29h5DRuqDXCiqCOnk= - - hash2 - - S1UvUDqqEddmWd/HrxA/x6Hc5VP0fYA6PWhhbAX9PzY= - - - Headers/XCTWaiter.h - - hash - - 3xRcrUqW54PHl7VXGv1RNSfgZAg= - - hash2 - - mA5vx6/QQ25gHCNLjo9Y0eX1khy7s52IB7yacIGlrNk= - - - Headers/XCTest.apinotes - - hash - - WqUywzmEAqoV6c0qeOnMA2dcIQc= - - hash2 - - k+5JrEIKeIUahHN4rMRX6ihL13259MqcP597ms2vgMs= - - - Headers/XCTest.h - - hash - - vyHRJ5iIHDimvUMhPRtMJzhrlW4= - - hash2 - - vq64eNbcQBW4F9zCLXsPBM4vawf51Eq6PcVMcSyxLYI= - - - Headers/XCTestAssertions.h - - hash - - t430vwqgq3wiAocVV386i0N+lOY= - - hash2 - - pGvrq4y/YqWUdlF2m6LpdEp5xPWAw5OzuiryWTlaF3I= - - - Headers/XCTestAssertionsImpl.h - - hash - - ZbDVHohdSHIPtEqmg7zN34qa0T4= - - hash2 - - RxajF3uw62Qphc/Icq0LxEM3ocmdcEbdthtDn0ABR2k= - - - Headers/XCTestCase+AsynchronousTesting.h - - hash - - eC80b6p4MAnn/amp9qgAOF/JnyY= - - hash2 - - PzPy8zgUJIK7pNLJsyp30K6scvvanQ/gT1BRn5HqHcs= - - - Headers/XCTestCase.h - - hash - - 7cm+qMjwhWmKgQWOex4Hjcc2jvs= - - hash2 - - zx/f5HefeE/H6XdzU8PNfu+tq/NcLHXaLOQxIRbQA9E= - - - Headers/XCTestCaseRun.h - - hash - - /XUqDHA/BFdQDUxQU8Ft5LXo/Ps= - - hash2 - - jEzXeXeFAbT7xbfbqjlf4yF+lZvOKKw9u0dhT8Lzpe4= - - - Headers/XCTestDefines.h - - hash - - wgEh+arKAaJ2OX5pBm7Hh3ft0jY= - - hash2 - - 7He5KYZ39XMWqYjNErsv62IkR5nkHxwPpq6rh4W8tho= - - - Headers/XCTestErrors.h - - hash - - oZFqJmcKHuKZIgeKOwsFDxhfEEc= - - hash2 - - bqmU7PnCm6GkYigcYehsZluZJau/3nfvDl9NneLn8NI= - - - Headers/XCTestExpectation.h - - hash - - Y/ssvPOSAIHfa/G1pVREFYwgDq8= - - hash2 - - bzHkvrq2f+1FFP3qie5fF78p6scQOnD/r7WYoDW764A= - - - Headers/XCTestLog.h - - hash - - 9BU/gwbaKcfn2L9dfo2dHRFN6Bc= - - hash2 - - Tu+6JYZZzftcXmUWH11IO9/jXCXi6QPeWDrL6izup6s= - - - Headers/XCTestObservation.h - - hash - - 24hjfD82jAN7/PhxU8RiEWTo5gs= - - hash2 - - bZQGOpPj/qLs1snCfbJDBnIeMfcP2Bs5EhkID+1qmjM= - - - Headers/XCTestObservationCenter.h - - hash - - 5ySsNYFGF0ZFvLZnL7UTg1HNRR4= - - hash2 - - d+hY4S23zmWO8E2YIrh4biGe9oQWCfD497a+oVk2+yY= - - - Headers/XCTestObserver.h - - hash - - DV3Cjdd1CAe6nYFEzmUrCtnzxQg= - - hash2 - - 7CTdhCJbuEzQNSyp3exgcCn6JnIRjBwpUcOKmiddBtU= - - - Headers/XCTestProbe.h - - hash - - fIVR0xRsxMAabrJmeGX3hPDwL0Y= - - hash2 - - FKXb32Ennc+6f3SkuVdo8bBNcIIWwryV5u5FmQYN8Fc= - - - Headers/XCTestRun.h - - hash - - 7GVNxTeghh0aBxY/Gvb+j2VTkqQ= - - hash2 - - bSeEEos9toHX4ZeMGeRYdv1KXdCziExa2r95Y6Qcem8= - - - Headers/XCTestSuite.h - - hash - - eRc+OVrMoZSKfP/hWkP9044Xkwo= - - hash2 - - L7lrx0/vT/6C441YiHqyBo8c41P7nh8AVfj2Ju9MWF0= - - - Headers/XCTestSuiteRun.h - - hash - - OX+g52bOAnhjLVDKkweTKM8jTHQ= - - hash2 - - QDxhlFfxAJEcudV29W9M96FJW5LQiR0yqdUHzkjMuA0= - - - Headers/XCUIApplication.h - - hash - - 3xPGyAQELvSZZ4RHMwhQEnlzFhg= - - hash2 - - c5JhLgu1HF3BRKMZa+lW3Uv/rhC85w7hROiHmgBDw8k= - - - Headers/XCUICoordinate.h - - hash - - ISpzcCIN+bNtcvHSlqKq3H0dHAA= - - hash2 - - WqIHIIX29PruSt0Ux3ajf2d2Ya6W7ES85APt7RfZEUQ= - - - Headers/XCUIDevice.h - - hash - - 6pJZzs6nb9PxIhPZMSzM3Pnoyyk= - - hash2 - - a332EuTW+1XyYOs10oV/xXmV18ua86gJqI6rQ/QIzJE= - - - Headers/XCUIElement.h - - hash - - csedByP43miIpAyfC8qT1PdhfSU= - - hash2 - - V5BgoHx/+zYmB/DYMS6sZXiTe4L2VJ64K0C1hLijWz4= - - - Headers/XCUIElementAttributes.h - - hash - - kWitRD0ClLa1hUvctZ6Jw2DmOW8= - - hash2 - - 9SI2mH0Fw8cgcd7e5L+9MJCRlhcVP03/Kb6JOrmb4DA= - - - Headers/XCUIElementQuery.h - - hash - - C3ZXTnkZIFu38bImb5YnKX8ME3s= - - hash2 - - LF3E68WtedEEM/IFD3q/tOZ3q0JtUQQhOK4XkamNjNM= - - - Headers/XCUIElementTypeQueryProvider.h - - hash - - RByqnqCJz+rOh+n5b6A0LWE4ipY= - - hash2 - - KPNzI8l6orkq7Lw9Lptey1l4nsXuyg/c9kYgH2/O5x0= - - - Headers/XCUIElementTypes.h - - hash - - r6naN5HO1+6krqDyXc3YqPmLBgw= - - hash2 - - lNOZzyQsfsLBbC8dqjRVWHvvLPL9n0H8lUWk7b6F+40= - - - Headers/XCUIKeyboardKeys.h - - hash - - N6DDr++AC3URGk9/PoyCGpq5h9k= - - hash2 - - I3lWDagvmkuZkcnrVsBHIjUOWuoNmCqRIDZL/NV1Cow= - - - Headers/XCUIRemote.h - - hash - - +rbCM60bDizOcqH+NaoTiCwtEH4= - - hash2 - - w7DXRAekwdX2XMbVLAxEj/q2faSvgp1LMbKGZDcUznE= - - - Headers/XCUIScreen.h - - hash - - /ub1WB6+9GFwYxGEGsIzKvyt/mg= - - hash2 - - DXvaY/5E2v8cBTldGVecRYgu32hr9r4pm3DHS2nDjfw= - - - Headers/XCUIScreenshot.h - - hash - - WRAFpS5fsJOjpa68uJDYY7QcwzQ= - - hash2 - - F2tCZijPx0hU+7CIdW0fMZK4cwKbgFYiI9LKYINt5sU= - - - Headers/XCUIScreenshotProviding.h - - hash - - qghz8l697gauRG1WZGkXCsisS40= - - hash2 - - s35VI6Lzy6LUDsIoANQTenLSsJeaPXvonWElqk8cJbM= - - - Headers/XCUISiriService.h - - hash - - NtIeUU61kDhd8LGgBr1FjKXe6JQ= - - hash2 - - 6JTR/e2zA54rVmT1cblklOkL8LFXaYg81YGhVhoagsw= - - - Modules/module.modulemap - - hash - - ha0qqLvU0UdkLu07qH5tE4agQV4= - - hash2 - - w5Zd8voFpYyDVfx4t9/bCAZAs1kTrhmGSzTXQMiBd/c= - - - en.lproj/InfoPlist.strings - - hash - - TuBj57ZP6zBqcL9HttO2Rucaw9E= - - hash2 - - 89RGkjZaKuewYnjpzwhIswhqfrU8+pcEXqM/DHVrUmo= - - optional - - - version.plist - - hash - - Etc/8BPenX54rv1uBx24u4bnqTg= - - hash2 - - Jh5i9giCFfo5GhN25CjMKdDJ6Kdlz/p4L95RITR+WeA= - - - - rules - - ^ - - ^.*\.lproj/ - - optional - - weight - 1000 - - ^.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Base\.lproj/ - - weight - 1010 - - ^version.plist$ - - - rules2 - - .*\.dSYM($|/) - - weight - 11 - - ^ - - weight - 20 - - ^(.*/)?\.DS_Store$ - - omit - - weight - 2000 - - ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ - - nested - - weight - 10 - - ^.* - - ^.*\.lproj/ - - optional - - weight - 1000 - - ^.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Base\.lproj/ - - weight - 1010 - - ^Info\.plist$ - - omit - - weight - 20 - - ^PkgInfo$ - - omit - - weight - 20 - - ^[^/]+$ - - nested - - weight - 10 - - ^embedded\.provisionprofile$ - - weight - 20 - - ^version\.plist$ - - weight - 20 - - - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/en.lproj/InfoPlist.strings b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/en.lproj/InfoPlist.strings deleted file mode 100644 index d64468760..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/en.lproj/InfoPlist.strings and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/version.plist b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/version.plist deleted file mode 100644 index 22f4aa327..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Frameworks/XCTest.framework/version.plist +++ /dev/null @@ -1,18 +0,0 @@ - - - - - BuildAliasOf - XCTest - BuildVersion - 1 - CFBundleShortVersionString - 1.0 - CFBundleVersion - 13764 - ProjectName - XCTest_Sim - SourceVersion - 13764000000000000 - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Info.plist b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Info.plist deleted file mode 100644 index 5f8b3d726..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/Info.plist +++ /dev/null @@ -1,81 +0,0 @@ - - - - - BuildMachineOSBuild - 17C43 - CFBundleAllowMixedLocalizations - - CFBundleDevelopmentRegion - en - CFBundleExecutable - sample-appUITests-Runner - CFBundleIdentifier - com.apple.test.sample-appUITests-Runner - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - sample-appUITests-Runner - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleSupportedPlatforms - - iPhoneSimulator - - CFBundleVersion - 1 - DTCompiler - com.apple.compilers.llvm.clang.1_0 - DTPlatformBuild - 15C89a - DTPlatformName - iphonesimulator - DTPlatformVersion - 11.2 - DTSDKBuild - 15C89a - DTSDKName - iphonesimulator11.2 - DTXcode - 0920 - DTXcodeBuild - 9C34c - LSRequiresIPhoneOS - - MinimumOSVersion - 8.0 - UIBackgroundModes - - unboundedTaskCompletion - continuous - - UIDeviceFamily - - 1 - 2 - - UIRequiredDeviceCapabilities - - armv7 - - UIRequiresFullScreen - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PkgInfo b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PkgInfo deleted file mode 100644 index bd04210fb..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPL???? \ No newline at end of file diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCore.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCore.dylib deleted file mode 100755 index c8856ca1c..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCore.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreAudio.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreAudio.dylib deleted file mode 100755 index 77665d7d9..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreAudio.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreFoundation.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreFoundation.dylib deleted file mode 100755 index 8331f4e39..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreFoundation.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreGraphics.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreGraphics.dylib deleted file mode 100755 index 01e7f34fd..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreGraphics.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreImage.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreImage.dylib deleted file mode 100755 index 79b600200..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreImage.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreMedia.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreMedia.dylib deleted file mode 100755 index 32104bef9..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftCoreMedia.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftDarwin.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftDarwin.dylib deleted file mode 100755 index 27683799f..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftDarwin.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftDispatch.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftDispatch.dylib deleted file mode 100755 index ebcbf3ec0..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftDispatch.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftFoundation.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftFoundation.dylib deleted file mode 100755 index 2813d602b..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftFoundation.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftMetal.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftMetal.dylib deleted file mode 100755 index 1f0f24906..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftMetal.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftObjectiveC.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftObjectiveC.dylib deleted file mode 100755 index 3d5295d8c..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftObjectiveC.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftQuartzCore.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftQuartzCore.dylib deleted file mode 100755 index b3e7e355b..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftQuartzCore.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftUIKit.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftUIKit.dylib deleted file mode 100755 index 6bbd4a45c..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftUIKit.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftXCTest.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftXCTest.dylib deleted file mode 100755 index be02dea08..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftXCTest.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftos.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftos.dylib deleted file mode 100755 index 04c4ac367..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Frameworks/libswiftos.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Info.plist b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Info.plist deleted file mode 100644 index 695476a03..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/Info.plist and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/_CodeSignature/CodeResources b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/_CodeSignature/CodeResources deleted file mode 100644 index 3d8a15ac7..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/_CodeSignature/CodeResources +++ /dev/null @@ -1,361 +0,0 @@ - - - - - files - - Frameworks/libswiftCore.dylib - - rUCFys+AWOss+EWBCEaOAdpVX20= - - Frameworks/libswiftCoreAudio.dylib - - YCR3BEzP4YKaivbFZEVICDAmC8o= - - Frameworks/libswiftCoreFoundation.dylib - - jbz8bbI4t9dRPuKdA8ZNhNXyo0U= - - Frameworks/libswiftCoreGraphics.dylib - - huTIMrZ/kA9A9Tt76byI5EBXS/U= - - Frameworks/libswiftCoreImage.dylib - - Wu1YkAmxP7mstnopw5nN9sXGCIE= - - Frameworks/libswiftCoreMedia.dylib - - VvUyrtJ3d89KeGj/aUUYVXiyVkg= - - Frameworks/libswiftDarwin.dylib - - HfrGp9Y0cL2SCmQ+awrpNSMGANA= - - Frameworks/libswiftDispatch.dylib - - aadtyAmEfkIdYfh81AwgW+NUUlY= - - Frameworks/libswiftFoundation.dylib - - KDSxmmBbVm/BCHhB5OnzmK4VXk4= - - Frameworks/libswiftMetal.dylib - - TV0+UepDX7RtCIx7UJBbFxaK8wA= - - Frameworks/libswiftObjectiveC.dylib - - 99VfCrz1VAs+mYzEBYpEDprb2gk= - - Frameworks/libswiftQuartzCore.dylib - - hhpGzWzg7Xz2I6HFQLT5M+dryRA= - - Frameworks/libswiftUIKit.dylib - - YLcEdnA1g3YssJbn8B2WVNm0X3A= - - Frameworks/libswiftXCTest.dylib - - mspOKPXUtyrqB8UO/HrlxDY0QuY= - - Frameworks/libswiftos.dylib - - hQVrRh/sl7ae3Ihai9e/V8V2zKQ= - - Info.plist - - pZszF9Atj5g05ELtyuzXVx5QqDU= - - libswiftRemoteMirror.dylib - - RcicIP0lKALIvOAuOlDdMvzAUTU= - - - files2 - - Frameworks/libswiftCore.dylib - - hash - - rUCFys+AWOss+EWBCEaOAdpVX20= - - hash2 - - 5c45AY8E34APUJ02LozOtR2igenlBK08vCPlUThxyHc= - - - Frameworks/libswiftCoreAudio.dylib - - hash - - YCR3BEzP4YKaivbFZEVICDAmC8o= - - hash2 - - RWVQr48nDDFGfi8S6jjU2qSQodv8L2Qh/Eu2/2h5tgk= - - - Frameworks/libswiftCoreFoundation.dylib - - hash - - jbz8bbI4t9dRPuKdA8ZNhNXyo0U= - - hash2 - - XutxDO/xfAJnQNuq6JnEePNfiUQ8U/ryfBXX2psc4B8= - - - Frameworks/libswiftCoreGraphics.dylib - - hash - - huTIMrZ/kA9A9Tt76byI5EBXS/U= - - hash2 - - bY5S/mHiwL6FnLuXRcPqkKGoZ7qULKNnxsEA9kM625k= - - - Frameworks/libswiftCoreImage.dylib - - hash - - Wu1YkAmxP7mstnopw5nN9sXGCIE= - - hash2 - - mC7BoHtfzGO5nMfKqXh+X9GRssaU7iDBxvx3RagVIq8= - - - Frameworks/libswiftCoreMedia.dylib - - hash - - VvUyrtJ3d89KeGj/aUUYVXiyVkg= - - hash2 - - eHYHT+dsYLHUiYYNYGQ7LBxlon+ubK0xF0sQYCj1Q9Q= - - - Frameworks/libswiftDarwin.dylib - - hash - - HfrGp9Y0cL2SCmQ+awrpNSMGANA= - - hash2 - - VgKoc5SgoJfjPo7PE/q2hS0+TaEuN4g2OUajV0ymBEo= - - - Frameworks/libswiftDispatch.dylib - - hash - - aadtyAmEfkIdYfh81AwgW+NUUlY= - - hash2 - - xMGfLQyCyS4eOkvKlq0r05kE2eu1YO4XXq1Q7/GT+/Y= - - - Frameworks/libswiftFoundation.dylib - - hash - - KDSxmmBbVm/BCHhB5OnzmK4VXk4= - - hash2 - - E5T6Vbdthahjlf9G95yptQ02WMqndCwMAnhE96KhhMk= - - - Frameworks/libswiftMetal.dylib - - hash - - TV0+UepDX7RtCIx7UJBbFxaK8wA= - - hash2 - - gKLRRIYwql9Su1SCvRbBxbUjfODveR6pgItl9hUvqOI= - - - Frameworks/libswiftObjectiveC.dylib - - hash - - 99VfCrz1VAs+mYzEBYpEDprb2gk= - - hash2 - - zizfRBOJvZce/ijXvRKaB6HQviolXYn+VCzubjxR9XM= - - - Frameworks/libswiftQuartzCore.dylib - - hash - - hhpGzWzg7Xz2I6HFQLT5M+dryRA= - - hash2 - - 8H1/KFcZfdb11FVsUdnlOOEAYrpcFiAJW1Jx5EadV8U= - - - Frameworks/libswiftUIKit.dylib - - hash - - YLcEdnA1g3YssJbn8B2WVNm0X3A= - - hash2 - - +wsxu+pKAFkwHd2n1kcJwqB2Kz39qUP5vh20y/nGies= - - - Frameworks/libswiftXCTest.dylib - - hash - - mspOKPXUtyrqB8UO/HrlxDY0QuY= - - hash2 - - fefqgwyU7HpHyBCDmlOTgpilRXVCfFFYkNAf6Ih7CoQ= - - - Frameworks/libswiftos.dylib - - hash - - hQVrRh/sl7ae3Ihai9e/V8V2zKQ= - - hash2 - - UUaqIgGhrYsBoJKQNjneHQu4j4eYgCbPAUQ/p7f+NQo= - - - libswiftRemoteMirror.dylib - - hash - - RcicIP0lKALIvOAuOlDdMvzAUTU= - - hash2 - - pNGoc8Omi1Q7fyo3tX9f9QQD+3bPNkeRj0/N1hb+Cmw= - - - - rules - - ^ - - ^.*\.lproj/ - - optional - - weight - 1000 - - ^.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Base\.lproj/ - - weight - 1010 - - ^version.plist$ - - - rules2 - - .*\.dSYM($|/) - - weight - 11 - - ^ - - weight - 20 - - ^(.*/)?\.DS_Store$ - - omit - - weight - 2000 - - ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ - - nested - - weight - 10 - - ^.* - - ^.*\.lproj/ - - optional - - weight - 1000 - - ^.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Base\.lproj/ - - weight - 1010 - - ^Info\.plist$ - - omit - - weight - 20 - - ^PkgInfo$ - - omit - - weight - 20 - - ^[^/]+$ - - nested - - weight - 10 - - ^embedded\.provisionprofile$ - - weight - 20 - - ^version\.plist$ - - weight - 20 - - - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/libswiftRemoteMirror.dylib b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/libswiftRemoteMirror.dylib deleted file mode 100755 index 4b9f774a1..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/libswiftRemoteMirror.dylib and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/sample-appUITests b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/sample-appUITests deleted file mode 100755 index dd7f73ab8..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest/sample-appUITests and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/sample-appUITests-Runner b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/sample-appUITests-Runner deleted file mode 100755 index 3c6c2415a..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample-appUITests-Runner.app/sample-appUITests-Runner and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample_app.swiftmodule/x86_64.swiftdoc b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample_app.swiftmodule/x86_64.swiftdoc deleted file mode 100644 index 4885615fc..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample_app.swiftmodule/x86_64.swiftdoc and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample_app.swiftmodule/x86_64.swiftmodule b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample_app.swiftmodule/x86_64.swiftmodule deleted file mode 100644 index b1e5a3504..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample_app.swiftmodule/x86_64.swiftmodule and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample_appUITests.swiftmodule/x86_64.swiftdoc b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample_appUITests.swiftmodule/x86_64.swiftdoc deleted file mode 100644 index 4885615fc..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample_appUITests.swiftmodule/x86_64.swiftdoc and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample_appUITests.swiftmodule/x86_64.swiftmodule b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample_appUITests.swiftmodule/x86_64.swiftmodule deleted file mode 100644 index 2e60c0211..000000000 Binary files a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator/sample_appUITests.swiftmodule/x86_64.swiftmodule and /dev/null differ diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/UITesting_iphonesimulator11.2-x86_64.xctestrun b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/UITesting_iphonesimulator11.2-x86_64.xctestrun deleted file mode 100644 index 6032a4cc5..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/UITesting_iphonesimulator11.2-x86_64.xctestrun +++ /dev/null @@ -1,79 +0,0 @@ - - - - - sample-appUITests - - BundleIdentifiersForCrashReportEmphasis - - com.agoda.sample-app - com.agoga.sample-appUITests - - CommandLineArguments - - DependentProductPaths - - __TESTROOT__/Debug-iphonesimulator/sample-app.app - __TESTROOT__/Debug-iphonesimulator/sample-appUITests-Runner.app/PlugIns/sample-appUITests.xctest - - EnvironmentVariables - - DYLD_FRAMEWORK_PATH - /Users/ypanforov/Developer/marathon/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator - DYLD_LIBRARY_PATH - /Users/ypanforov/Developer/marathon/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator - OS_ACTIVITY_DT_MODE - YES - __XCODE_BUILT_PRODUCTS_DIR_PATHS - /Users/ypanforov/Developer/marathon/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator - __XPC_DYLD_FRAMEWORK_PATH - /Users/ypanforov/Developer/marathon/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator - __XPC_DYLD_LIBRARY_PATH - /Users/ypanforov/Developer/marathon/vendor-ios/src/test/resources/sample-xcworkspace/derived-data/Build/Products/Debug-iphonesimulator - - IsUITestBundle - - IsXCTRunnerHostedTestBundle - - ProductModuleName - sample_appUITests - SkipTestIdentifiers - - SkippedSuite - StoryboardTests/testDisabledButton - MoreTests/testDismissModal - - SystemAttachmentLifetime - deleteOnSuccess - TestBundlePath - __TESTHOST__/PlugIns/sample-appUITests.xctest - TestHostBundleIdentifier - com.apple.test.sample-appUITests-Runner - TestHostPath - __TESTROOT__/Debug-iphonesimulator/sample-appUITests-Runner.app - TestingEnvironmentVariables - - DYLD_FRAMEWORK_PATH - __TESTROOT__/Debug-iphonesimulator:__PLATFORMS__/iPhoneSimulator.platform/Developer/Library/Frameworks:__PLATFORMS__/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks - DYLD_INSERT_LIBRARIES - __PLATFORMS__/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib - DYLD_LIBRARY_PATH - __TESTROOT__/Debug-iphonesimulator:__PLATFORMS__/iPhoneSimulator.platform/Developer/Library/Frameworks:__PLATFORMS__/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks - MTC_CRASH_ON_REPORT - 1 - XCODE_DBG_XPC_EXCLUSIONS - com.apple.dt.xctestSymbolicator - - ToolchainsSettingValue - - UITargetAppCommandLineArguments - - UITargetAppMainThreadCheckerEnabled - - UITargetAppPath - __TESTROOT__/Debug-iphonesimulator/sample-app.app - UserAttachmentLifetime - deleteOnSuccess - - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcodeproj/project.pbxproj b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcodeproj/project.pbxproj deleted file mode 100644 index 07b75bba7..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcodeproj/project.pbxproj +++ /dev/null @@ -1,467 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 48; - objects = { - -/* Begin PBXBuildFile section */ - 124DFB0A21411E07005B650A /* MoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124DFB0921411E07005B650A /* MoreTests.swift */; }; - 124DFB0C2141322E005B650A /* SkippedSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124DFB0B2141322E005B650A /* SkippedSuite.swift */; }; - 1271DC9A21351C6D002B8D3E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1271DC9921351C6D002B8D3E /* AppDelegate.swift */; }; - 1271DC9F21351C6D002B8D3E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1271DC9D21351C6D002B8D3E /* Main.storyboard */; }; - 1271DCA121351C6D002B8D3E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1271DCA021351C6D002B8D3E /* Assets.xcassets */; }; - 1271DCA421351C6D002B8D3E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1271DCA221351C6D002B8D3E /* LaunchScreen.storyboard */; }; - 1271DCBA21351C6D002B8D3E /* StoryboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1271DCB921351C6D002B8D3E /* StoryboardTests.swift */; }; - DA32B580214D224E004D00BC /* FailingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA32B57F214D224E004D00BC /* FailingTests.swift */; }; - DA387D99214C37FA00109B63 /* FlakyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA387D98214C37FA00109B63 /* FlakyTests.swift */; }; - DA387D9B214C39AB00109B63 /* BooleanExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA387D9A214C39AB00109B63 /* BooleanExtensions.swift */; }; - DA387D9D214C3A4F00109B63 /* SlowTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA387D9C214C3A4F00109B63 /* SlowTests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1271DCB621351C6D002B8D3E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1271DC8E21351C6D002B8D3E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1271DC9521351C6D002B8D3E; - remoteInfo = "sample-app"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 124DFB0921411E07005B650A /* MoreTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoreTests.swift; sourceTree = ""; }; - 124DFB0B2141322E005B650A /* SkippedSuite.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SkippedSuite.swift; sourceTree = ""; }; - 1271DC9621351C6D002B8D3E /* sample-app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "sample-app.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1271DC9921351C6D002B8D3E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 1271DC9E21351C6D002B8D3E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 1271DCA021351C6D002B8D3E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 1271DCA321351C6D002B8D3E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 1271DCA521351C6D002B8D3E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1271DCB521351C6D002B8D3E /* sample-appUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "sample-appUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1271DCB921351C6D002B8D3E /* StoryboardTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoryboardTests.swift; sourceTree = ""; }; - 1271DCBB21351C6D002B8D3E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DA32B57F214D224E004D00BC /* FailingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FailingTests.swift; sourceTree = ""; }; - DA387D98214C37FA00109B63 /* FlakyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlakyTests.swift; sourceTree = ""; }; - DA387D9A214C39AB00109B63 /* BooleanExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BooleanExtensions.swift; sourceTree = ""; }; - DA387D9C214C3A4F00109B63 /* SlowTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SlowTests.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1271DC9321351C6D002B8D3E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1271DCB221351C6D002B8D3E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1271DC8D21351C6D002B8D3E = { - isa = PBXGroup; - children = ( - 1271DC9821351C6D002B8D3E /* sample-app */, - 1271DCB821351C6D002B8D3E /* sample-appUITests */, - 1271DC9721351C6D002B8D3E /* Products */, - ); - sourceTree = ""; - }; - 1271DC9721351C6D002B8D3E /* Products */ = { - isa = PBXGroup; - children = ( - 1271DC9621351C6D002B8D3E /* sample-app.app */, - 1271DCB521351C6D002B8D3E /* sample-appUITests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 1271DC9821351C6D002B8D3E /* sample-app */ = { - isa = PBXGroup; - children = ( - 1271DC9921351C6D002B8D3E /* AppDelegate.swift */, - 1271DC9D21351C6D002B8D3E /* Main.storyboard */, - 1271DCA021351C6D002B8D3E /* Assets.xcassets */, - 1271DCA221351C6D002B8D3E /* LaunchScreen.storyboard */, - 1271DCA521351C6D002B8D3E /* Info.plist */, - ); - path = "sample-app"; - sourceTree = ""; - }; - 1271DCB821351C6D002B8D3E /* sample-appUITests */ = { - isa = PBXGroup; - children = ( - 124DFB0921411E07005B650A /* MoreTests.swift */, - 124DFB0B2141322E005B650A /* SkippedSuite.swift */, - 1271DCB921351C6D002B8D3E /* StoryboardTests.swift */, - 1271DCBB21351C6D002B8D3E /* Info.plist */, - DA387D98214C37FA00109B63 /* FlakyTests.swift */, - DA32B57F214D224E004D00BC /* FailingTests.swift */, - DA387D9A214C39AB00109B63 /* BooleanExtensions.swift */, - DA387D9C214C3A4F00109B63 /* SlowTests.swift */, - ); - path = "sample-appUITests"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1271DC9521351C6D002B8D3E /* sample-app */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1271DCBE21351C6D002B8D3E /* Build configuration list for PBXNativeTarget "sample-app" */; - buildPhases = ( - 1271DC9221351C6D002B8D3E /* Sources */, - 1271DC9321351C6D002B8D3E /* Frameworks */, - 1271DC9421351C6D002B8D3E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "sample-app"; - productName = "sample-app"; - productReference = 1271DC9621351C6D002B8D3E /* sample-app.app */; - productType = "com.apple.product-type.application"; - }; - 1271DCB421351C6D002B8D3E /* sample-appUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1271DCC421351C6D002B8D3E /* Build configuration list for PBXNativeTarget "sample-appUITests" */; - buildPhases = ( - 1271DCB121351C6D002B8D3E /* Sources */, - 1271DCB221351C6D002B8D3E /* Frameworks */, - 1271DCB321351C6D002B8D3E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 1271DCB721351C6D002B8D3E /* PBXTargetDependency */, - ); - name = "sample-appUITests"; - productName = "sample-appUITests"; - productReference = 1271DCB521351C6D002B8D3E /* sample-appUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 1271DC8E21351C6D002B8D3E /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 0920; - ORGANIZATIONNAME = "Panforov, Yurii (Agoda)"; - TargetAttributes = { - 1271DC9521351C6D002B8D3E = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Automatic; - }; - 1271DCB421351C6D002B8D3E = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Automatic; - TestTargetID = 1271DC9521351C6D002B8D3E; - }; - }; - }; - buildConfigurationList = 1271DC9121351C6D002B8D3E /* Build configuration list for PBXProject "sample-app" */; - compatibilityVersion = "Xcode 8.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 1271DC8D21351C6D002B8D3E; - productRefGroup = 1271DC9721351C6D002B8D3E /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1271DC9521351C6D002B8D3E /* sample-app */, - 1271DCB421351C6D002B8D3E /* sample-appUITests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1271DC9421351C6D002B8D3E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1271DCA421351C6D002B8D3E /* LaunchScreen.storyboard in Resources */, - 1271DCA121351C6D002B8D3E /* Assets.xcassets in Resources */, - 1271DC9F21351C6D002B8D3E /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1271DCB321351C6D002B8D3E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1271DC9221351C6D002B8D3E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1271DC9A21351C6D002B8D3E /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1271DCB121351C6D002B8D3E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DA387D9B214C39AB00109B63 /* BooleanExtensions.swift in Sources */, - 124DFB0A21411E07005B650A /* MoreTests.swift in Sources */, - DA387D9D214C3A4F00109B63 /* SlowTests.swift in Sources */, - 124DFB0C2141322E005B650A /* SkippedSuite.swift in Sources */, - DA32B580214D224E004D00BC /* FailingTests.swift in Sources */, - DA387D99214C37FA00109B63 /* FlakyTests.swift in Sources */, - 1271DCBA21351C6D002B8D3E /* StoryboardTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1271DCB721351C6D002B8D3E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 1271DC9521351C6D002B8D3E /* sample-app */; - targetProxy = 1271DCB621351C6D002B8D3E /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 1271DC9D21351C6D002B8D3E /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 1271DC9E21351C6D002B8D3E /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 1271DCA221351C6D002B8D3E /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 1271DCA321351C6D002B8D3E /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 1271DCBC21351C6D002B8D3E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 1271DCBD21351C6D002B8D3E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 1271DCBF21351C6D002B8D3E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = XV56FT9363; - INFOPLIST_FILE = "sample-app/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.agoda.sample-app"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 1271DCC021351C6D002B8D3E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = XV56FT9363; - INFOPLIST_FILE = "sample-app/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.agoda.sample-app"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 1271DCC521351C6D002B8D3E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = XV56FT9363; - INFOPLIST_FILE = "sample-appUITests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.agoga.sample-appUITests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = "sample-app"; - }; - name = Debug; - }; - 1271DCC621351C6D002B8D3E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = XV56FT9363; - INFOPLIST_FILE = "sample-appUITests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.agoga.sample-appUITests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = "sample-app"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1271DC9121351C6D002B8D3E /* Build configuration list for PBXProject "sample-app" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1271DCBC21351C6D002B8D3E /* Debug */, - 1271DCBD21351C6D002B8D3E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1271DCBE21351C6D002B8D3E /* Build configuration list for PBXNativeTarget "sample-app" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1271DCBF21351C6D002B8D3E /* Debug */, - 1271DCC021351C6D002B8D3E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1271DCC421351C6D002B8D3E /* Build configuration list for PBXNativeTarget "sample-appUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1271DCC521351C6D002B8D3E /* Debug */, - 1271DCC621351C6D002B8D3E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 1271DC8E21351C6D002B8D3E /* Project object */; -} diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 6a9d64381..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcodeproj/xcshareddata/xcschemes/UITesting.xcscheme b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcodeproj/xcshareddata/xcschemes/UITesting.xcscheme deleted file mode 100644 index 612c2bf5e..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcodeproj/xcshareddata/xcschemes/UITesting.xcscheme +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcworkspace/contents.xcworkspacedata b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 2bb18a66c..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d981003..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/AppDelegate.swift b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/AppDelegate.swift deleted file mode 100644 index 037bbc8dc..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/AppDelegate.swift +++ /dev/null @@ -1,22 +0,0 @@ -// @copyright Agoda Services Co. Ltd. - -import UIKit - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - return true - } -} - -class DismissSegue: UIStoryboardSegue { - override func perform() { - guard let presentingViewController = source.presentingViewController else { - return - } - presentingViewController.dismiss(animated: true, completion: nil) - } -} diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/Assets.xcassets/AppIcon.appiconset/Contents.json b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index dfc5acac6..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "images": [ - { - "idiom": "iphone", - "size": "20x20", - "scale": "2x" - }, - { - "idiom": "iphone", - "size": "20x20", - "scale": "3x" - }, - { - "idiom": "iphone", - "size": "29x29", - "scale": "2x" - }, - { - "idiom": "iphone", - "size": "29x29", - "scale": "3x" - }, - { - "idiom": "iphone", - "size": "40x40", - "scale": "2x" - }, - { - "idiom": "iphone", - "size": "40x40", - "scale": "3x" - }, - { - "idiom": "iphone", - "size": "60x60", - "scale": "2x" - }, - { - "idiom": "iphone", - "size": "60x60", - "scale": "3x" - }, - { - "idiom": "ipad", - "size": "20x20", - "scale": "1x" - }, - { - "idiom": "ipad", - "size": "20x20", - "scale": "2x" - }, - { - "idiom": "ipad", - "size": "29x29", - "scale": "1x" - }, - { - "idiom": "ipad", - "size": "29x29", - "scale": "2x" - }, - { - "idiom": "ipad", - "size": "40x40", - "scale": "1x" - }, - { - "idiom": "ipad", - "size": "40x40", - "scale": "2x" - }, - { - "idiom": "ipad", - "size": "76x76", - "scale": "1x" - }, - { - "idiom": "ipad", - "size": "76x76", - "scale": "2x" - }, - { - "idiom": "ipad", - "size": "83.5x83.5", - "scale": "2x" - }, - { - "idiom": "ios-marketing", - "size": "1024x1024", - "scale": "1x" - } - ], - "info": { - "version": 1, - "author": "xcode" - } -} \ No newline at end of file diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/Base.lproj/LaunchScreen.storyboard b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f83f6fd58..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/Base.lproj/Main.storyboard b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/Base.lproj/Main.storyboard deleted file mode 100644 index 2761c6085..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/Base.lproj/Main.storyboard +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/Info.plist b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/Info.plist deleted file mode 100644 index 16be3b681..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-app/Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/BooleanExtensions.swift b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/BooleanExtensions.swift deleted file mode 100644 index 02201247c..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/BooleanExtensions.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// BooleanExtensions.swift -// sample-appUITests -// -// Created by Anton Malinskiy on 9/15/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import Foundation - -extension Bool { - static func random() -> Bool { - return arc4random_uniform(2) == 0 - } -} diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/CrashingTests.swift b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/CrashingTests.swift deleted file mode 100644 index 44d0095fd..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/CrashingTests.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// CrashingTests.swift -// sample-appUITests -// -// Created by Panforov, Yurii (Agoda) on 22/11/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import XCTest - -class CrashingTests: XCTestCase { - - private var app: XCUIApplication! - - override func setUp() { - super.setUp() - - continueAfterFailure = false - - app = XCUIApplication() - app.launch() - } - - override func tearDown() { - app = nil - - super.tearDown() - } - - func testButton() { - let button = app.buttons.element(boundBy: 2) - XCTAssertTrue(button.waitForExistence()) - XCTAssertTrue(button.isHittable) - - button.tap() - - XCTAssertTrue(button.waitForExistence()) - } -} - -private let standardTimeout: TimeInterval = 30.0 -private extension XCUIElement { - @discardableResult - func waitForExistence() -> Bool { - return waitForExistence(timeout: standardTimeout) - } -} - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/FailingTests.swift b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/FailingTests.swift deleted file mode 100644 index fe9b511df..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/FailingTests.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// Failingtest.swift -// sample-appUITests -// -// Created by Anton Malinskiy on 9/15/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import XCTest - -class FailingTests: XCTestCase { - - private var app: XCUIApplication! - - override func setUp() { - super.setUp() - - continueAfterFailure = true - - app = XCUIApplication() - app.launch() - } - - override func tearDown() { - app = nil - - super.tearDown() - } - - func testAlwaysFailing() { - XCTAssertTrue(false) - } - -} - -private let standardTimeout: TimeInterval = 30.0 -private extension XCUIElement { - @discardableResult - func waitForExistence() -> Bool { - return waitForExistence(timeout: standardTimeout) - } -} diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/FlakyTests.swift b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/FlakyTests.swift deleted file mode 100644 index bd8bbf618..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/FlakyTests.swift +++ /dev/null @@ -1,83 +0,0 @@ -// -// AbstractFailingTests.swift -// sample-appUITests -// -// Created by Anton Malinskiy on 9/15/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import Foundation -import XCTest - -class FlakyTests: XCTestCase { - - private var app: XCUIApplication! - - override func setUp() { - super.setUp() - - continueAfterFailure = true - - app = XCUIApplication() - app.launch() - } - - override func tearDown() { - app = nil - - super.tearDown() - } - - func testTextFlaky() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky1() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky2() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky3() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky4() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky5() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky6() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky7() { - usleep(100) - XCTAssertTrue(Bool.random()) - } - - func testTextFlaky8() { - usleep(100) - XCTAssertTrue(Bool.random()) - } -} - -private let standardTimeout: TimeInterval = 30.0 -private extension XCUIElement { - @discardableResult - func waitForExistence() -> Bool { - return waitForExistence(timeout: standardTimeout) - } -} diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/Info.plist b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/Info.plist deleted file mode 100644 index 6c40a6cd0..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/MoreTests.swift b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/MoreTests.swift deleted file mode 100644 index f7043e79f..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/MoreTests.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// sample_appUITests.swift -// sample-appUITests -// -// Created by Panforov, Yurii (Agoda) on 28/8/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import XCTest - -class MoreTests: XCTestCase { - - private var app: XCUIApplication! - - override func setUp() { - super.setUp() - - continueAfterFailure = false - - app = XCUIApplication() - app.launch() - } - - override func tearDown() { - app = nil - - super.tearDown() - } - - func testPresentModal() { - let button = app.buttons.element(boundBy: 1) - button.waitForExistence() - button.tap() - - let modalLabelPredicate = NSPredicate(format: "%K == %@", "label", "Modal Label") - let modalLabel = app.staticTexts.element(matching: modalLabelPredicate) - XCTAssertTrue(modalLabel.exists) - } - - - func testDismissModal() { - let button = app.buttons.element(boundBy: 1) - button.tap() - - let dismissButtonPredicate = NSPredicate(format: "%K == %@", "label", "Close") - let dismissButton = app.buttons.element(matching: dismissButtonPredicate) - dismissButton.tap() - - let dismissedLabel = app.staticTexts.firstMatch - XCTAssertEqual(dismissedLabel.label, "Label") - } -} - -private let standardTimeout: TimeInterval = 30.0 -private extension XCUIElement { - @discardableResult - func waitForExistence() -> Bool { - return waitForExistence(timeout: standardTimeout) - } -} diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/SkippedSuite.swift b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/SkippedSuite.swift deleted file mode 100644 index c45dc1612..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/SkippedSuite.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// sample_appUITests.swift -// sample-appUITests -// -// Created by Panforov, Yurii (Agoda) on 28/8/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import XCTest - -class SkippedSuite: XCTestCase { - - private var app: XCUIApplication! - - override func setUp() { - super.setUp() - - continueAfterFailure = false - - app = XCUIApplication() - app.launch() - } - - override func tearDown() { - app = nil - - super.tearDown() - } - - func testTruth() { - XCTAssertTrue(true) - } - - - func testLies() { - XCTAssertFalse(false) - } -} - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/SlowTests.swift b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/SlowTests.swift deleted file mode 100644 index 8c1d6d37c..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/SlowTests.swift +++ /dev/null @@ -1,102 +0,0 @@ -// -// SlowTests.swift -// sample-appUITests -// -// Created by Anton Malinskiy on 9/15/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -// -// AbstractFailingTests.swift -// sample-appUITests -// -// Created by Anton Malinskiy on 9/15/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import Foundation -import XCTest - -class SlowTests: XCTestCase { - - private var app: XCUIApplication! - - override func setUp() { - super.setUp() - - continueAfterFailure = true - - app = XCUIApplication() - app.launch() - } - - override func tearDown() { - app = nil - - super.tearDown() - } - - func testTextSlow() { - sleep(5) - let button = app.buttons.firstMatch - button.waitForExistence() - button.tap() - - let label = app.staticTexts.firstMatch - label.waitForExistence() - XCTAssertEqual(label.label, "Label") - } - - func testTextSlow1() { - sleep(5) - let button = app.buttons.firstMatch - button.waitForExistence() - button.tap() - - let label = app.staticTexts.firstMatch - label.waitForExistence() - XCTAssertEqual(label.label, "Label") - } - - func testTextSlow2() { - sleep(5) - let button = app.buttons.firstMatch - button.waitForExistence() - button.tap() - - let label = app.staticTexts.firstMatch - label.waitForExistence() - XCTAssertEqual(label.label, "Label") - } - - func testTextSlow3() { - sleep(5) - let button = app.buttons.firstMatch - button.waitForExistence() - button.tap() - - let label = app.staticTexts.firstMatch - label.waitForExistence() - XCTAssertEqual(label.label, "Label") - } - - func testTextSlow4() { - sleep(5) - let button = app.buttons.firstMatch - button.waitForExistence() - button.tap() - - let label = app.staticTexts.firstMatch - label.waitForExistence() - XCTAssertEqual(label.label, "Label") - } -} - -private let standardTimeout: TimeInterval = 30.0 -private extension XCUIElement { - @discardableResult - func waitForExistence() -> Bool { - return waitForExistence(timeout: standardTimeout) - } -} - diff --git a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/StoryboardTests.swift b/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/StoryboardTests.swift deleted file mode 100644 index 66b007ee2..000000000 --- a/vendor/vendor-ios/src/test/resources/sample-xcworkspace/sample-appUITests/StoryboardTests.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// sample_appUITests.swift -// sample-appUITests -// -// Created by Panforov, Yurii (Agoda) on 28/8/18. -// Copyright © 2018 Panforov, Yurii (Agoda). All rights reserved. -// - -import XCTest - -class StoryboardTests: XCTestCase { - - private var app: XCUIApplication! - - override func setUp() { - super.setUp() - - continueAfterFailure = false - - app = XCUIApplication() - app.launch() - } - - override func tearDown() { - app = nil - - super.tearDown() - } - - func testButton() { - let button = app.buttons.firstMatch - XCTAssertTrue(button.waitForExistence()) - XCTAssertTrue(button.isHittable) - - button.tap() - - let label = app.staticTexts.firstMatch - XCTAssertTrue(label.waitForExistence()) - } - - func testDisabledButton() { - let button = app.buttons.firstMatch - XCTAssertTrue(button.waitForExistence()) - XCTAssertTrue(button.isHittable) - } - - func testLabel() { - let button = app.buttons.firstMatch - button.waitForExistence() - button.tap() - - let label = app.staticTexts.firstMatch - label.waitForExistence() - XCTAssertEqual(label.label, "Label") - } - - func disabledTestButton() { - let button = app.buttons.firstMatch - button.tap() - - let label = app.staticTexts.firstMatch - XCTAssertEqual(label.label, "Label") - } -} - -private let standardTimeout: TimeInterval = 30.0 -private extension XCUIElement { - @discardableResult - func waitForExistence() -> Bool { - return waitForExistence(timeout: standardTimeout) - } -} - diff --git a/vendor/vendor-test/src/main/kotlin/com/malinskiy/marathon/test/StubExecutionResults.kt b/vendor/vendor-test/src/main/kotlin/com/malinskiy/marathon/test/StubExecutionResults.kt deleted file mode 100644 index fea9ab00c..000000000 --- a/vendor/vendor-test/src/main/kotlin/com/malinskiy/marathon/test/StubExecutionResults.kt +++ /dev/null @@ -1,4 +0,0 @@ -package com.malinskiy.marathon.test - -class StubExecutionResults() { -} \ No newline at end of file diff --git a/vendor/vendor-test/src/main/kotlin/com/malinskiy/marathon/test/factory/ConfigurationFactory.kt b/vendor/vendor-test/src/main/kotlin/com/malinskiy/marathon/test/factory/ConfigurationFactory.kt index 4d1669fbe..5838d5ae5 100644 --- a/vendor/vendor-test/src/main/kotlin/com/malinskiy/marathon/test/factory/ConfigurationFactory.kt +++ b/vendor/vendor-test/src/main/kotlin/com/malinskiy/marathon/test/factory/ConfigurationFactory.kt @@ -2,7 +2,6 @@ package com.malinskiy.marathon.test.factory import com.malinskiy.marathon.analytics.internal.pub.Tracker import com.malinskiy.marathon.device.DeviceProvider -import com.malinskiy.marathon.execution.AnalyticsConfiguration import com.malinskiy.marathon.execution.CacheConfiguration import com.malinskiy.marathon.execution.Configuration import com.malinskiy.marathon.execution.FilteringConfiguration @@ -37,7 +36,6 @@ class ConfigurationFactory { var debug: Boolean? = null var batchingStrategy: BatchingStrategy? = null var customAnalyticsTracker: Tracker? = null - var analyticsConfiguration: AnalyticsConfiguration? = null var excludeSerialRegexes: List? = null var ignoreFailureRegexes: List? = null var failFastFailureRegexes: List? = null @@ -60,7 +58,6 @@ class ConfigurationFactory { var testBatchTimeoutMillis: Long? = null var testOutputTimeoutMillis: Long? = null var noDevicesTimeoutMillis: Long? = null - var analyticsTracking: Boolean = false fun tests(block: () -> List) { val testParser = vendorConfiguration.testParser() @@ -76,7 +73,6 @@ class ConfigurationFactory { Configuration( name = name, outputDir = outputDir, - analyticsConfiguration = analyticsConfiguration, customAnalyticsTracker = customAnalyticsTracker, poolingStrategy = poolingStrategy, shardingStrategy = shardingStrategy, @@ -102,7 +98,6 @@ class ConfigurationFactory { testOutputTimeoutMillis = testOutputTimeoutMillis, noDevicesTimeoutMillis = noDevicesTimeoutMillis, debug = debug, - vendorConfiguration = vendorConfiguration, - analyticsTracking = analyticsTracking + vendorConfiguration = vendorConfiguration ) }