Skip to content

Commit

Permalink
feat(apple): fix tests and add apple macos vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
Malinskiy committed Feb 9, 2024
1 parent 07e0b3f commit 012f6b5
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 2 deletions.
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ include("core")
include("configuration")
include("vendor:vendor-android")
include("vendor:vendor-apple:ios")
include("vendor:vendor-apple:macos")
include("vendor:vendor-apple:base")
include("vendor:vendor-test")
include("marathon-gradle-plugin")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

package com.malinskiy.marathon.ios.cmd

import com.malinskiy.marathon.apple.ios.cmd.CommandExecutor
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async
import kotlinx.coroutines.delay
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.malinskiy.marathon.ios.cmd.local

import com.malinskiy.marathon.apple.ios.cmd.BaseCommandExecutorTest
import com.malinskiy.marathon.apple.ios.cmd.local.KotlinProcessCommandExecutor
import com.malinskiy.marathon.ios.cmd.BaseCommandExecutorTest


class KotlinProcessCommandExecutorTest : BaseCommandExecutorTest() {
override fun createExecutor() = KotlinProcessCommandExecutor()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.malinskiy.marathon.ios.cmd.remote.ssh.sshj

import com.malinskiy.marathon.apple.ios.cmd.BaseCommandExecutorTest
import com.malinskiy.marathon.apple.ios.cmd.remote.ssh.sshj.auth.SshAuthentication
import com.malinskiy.marathon.ios.cmd.BaseCommandExecutorTest
import org.testcontainers.junit.jupiter.Container
import org.testcontainers.junit.jupiter.Testcontainers

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.malinskiy.marathon.ios.configuration

import com.malinskiy.marathon.apple.ios.configuration.AppleTarget
import org.amshove.kluent.shouldBeEqualTo
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.CsvSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator
import com.fasterxml.jackson.module.kotlin.KotlinFeature
import com.fasterxml.jackson.module.kotlin.KotlinModule
import com.fasterxml.jackson.module.kotlin.readValue
import com.malinskiy.marathon.apple.ios.configuration.AppleTarget
import com.malinskiy.marathon.apple.ios.configuration.Marathondevices
import com.malinskiy.marathon.apple.ios.configuration.Transport
import com.malinskiy.marathon.apple.ios.configuration.Worker
import com.malinskiy.marathon.config.vendor.ios.SshAuthentication
import org.amshove.kluent.shouldBeEqualTo
import org.junit.jupiter.api.BeforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.malinskiy.marathon.ios.logparser.parser

import assertk.assertThat
import assertk.assertions.isEqualTo
import com.malinskiy.marathon.apple.ios.logparser.parser.TestRunProgressParser
import com.malinskiy.marathon.apple.ios.test.TestEvent
import com.malinskiy.marathon.time.Timer
import org.junit.jupiter.api.BeforeEach
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.malinskiy.marathon.ios.xctestrun.v0

import com.malinskiy.marathon.apple.ios.plist.PropertyList
import com.malinskiy.marathon.apple.ios.xctestrun.v0.TestTarget
import com.malinskiy.marathon.apple.ios.xctestrun.v0.Xctestrun
import org.amshove.kluent.shouldBeEqualTo
import org.junit.jupiter.api.Test
import java.io.ByteArrayOutputStream
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.malinskiy.marathon.ios.xctestrun.v1

import com.malinskiy.marathon.apple.ios.plist.PropertyList
import com.malinskiy.marathon.apple.ios.xctestrun.v1.Xctestrun
import org.amshove.kluent.shouldBeEqualTo
import org.amshove.kluent.shouldContainSame
import org.junit.jupiter.api.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package com.malinskiy.marathon.ios.xctestrun.v2

import com.malinskiy.marathon.apple.ios.plist.PropertyList
import com.malinskiy.marathon.apple.ios.xctestrun.v2.CodeCoverageBuildableInfo
import com.malinskiy.marathon.apple.ios.xctestrun.v2.TestConfiguration
import com.malinskiy.marathon.apple.ios.xctestrun.v2.TestPlan
import com.malinskiy.marathon.apple.ios.xctestrun.v2.TestTarget
import com.malinskiy.marathon.apple.ios.xctestrun.v2.Xctestrun
import org.amshove.kluent.shouldBeEqualTo
import org.junit.jupiter.api.Test
import java.io.ByteArrayOutputStream
import java.io.File
import com.malinskiy.marathon.apple.ios.xctestrun.v2.Metadata as Metadata

class XctestrunTest {
@Test
Expand Down
26 changes: 26 additions & 0 deletions vendor/vendor-apple/macos/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
plugins {
`java-library`
jacoco
id("org.jetbrains.kotlin.jvm")
id("org.jetbrains.dokka")
}

dependencies {
implementation(project(":vendor:vendor-apple:base"))
testImplementation(TestLibraries.kluent)
testImplementation(TestLibraries.assertk)
testImplementation(TestLibraries.mockitoKotlin)
testImplementation(TestLibraries.testContainers)
testImplementation(TestLibraries.testContainersJupiter)
testImplementation(TestLibraries.junit5)
testImplementation(TestLibraries.coroutinesTest)
testRuntimeOnly(TestLibraries.jupiterEngine)
}

setupDeployment()
setupKotlinCompiler()
setupTestTask()

tasks.jar.configure {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

0 comments on commit 012f6b5

Please sign in to comment.