-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from platan/mark-previous
Allow to add mark showing total time of all tests
- Loading branch information
Showing
23 changed files
with
520 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/main/kotlin/io/github/platan/tests_execution_chart/config/Mark.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package io.github.platan.tests_execution_chart.config | ||
|
||
import org.gradle.api.model.ObjectFactory | ||
import org.gradle.api.provider.Property | ||
import org.gradle.api.tasks.Input | ||
import javax.inject.Inject | ||
|
||
abstract class Mark @Inject constructor(objectFactory: ObjectFactory, name: String) { | ||
|
||
@get:Input | ||
val enabled: Property<Boolean> = objectFactory.property(Boolean::class.java).convention(false) | ||
|
||
@get:Input | ||
val name: Property<String> = objectFactory.property(String::class.java).convention(name) | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/kotlin/io/github/platan/tests_execution_chart/config/Marks.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package io.github.platan.tests_execution_chart.config | ||
|
||
import org.gradle.api.Action | ||
import org.gradle.api.tasks.Nested | ||
|
||
abstract class Marks { | ||
|
||
@Nested | ||
abstract fun getTotalTimeOfAllTests(): TotalTimeOfAllTestsMark | ||
|
||
open fun totalTimeOfAllTests(action: Action<in Mark>) { | ||
action.execute(getTotalTimeOfAllTests()) | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/kotlin/io/github/platan/tests_execution_chart/config/TotalTimeOfAllTestsMark.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.github.platan.tests_execution_chart.config | ||
|
||
import org.gradle.api.model.ObjectFactory | ||
import javax.inject.Inject | ||
|
||
abstract class TotalTimeOfAllTestsMark @Inject constructor(objectFactory: ObjectFactory) : | ||
Mark(objectFactory, "total time of all tests") |
14 changes: 14 additions & 0 deletions
14
src/main/kotlin/io/github/platan/tests_execution_chart/report/Mark.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package io.github.platan.tests_execution_chart.report | ||
|
||
import kotlinx.serialization.Serializable | ||
import java.time.Duration | ||
|
||
@Serializable | ||
data class Mark( | ||
var name: String, | ||
var timestamp: Long | ||
) { | ||
fun shiftTimestamps(timeShift: Duration): Mark { | ||
return this.copy(timestamp = this.timestamp + timeShift.toMillis()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
...in/kotlin/io/github/platan/tests_execution_chart/reporters/mermaid/MermaidGanttDiagram.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.