-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify skip message and add an it-test for
skip
- Loading branch information
Showing
6 changed files
with
76 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invoker.goals=clean verify site -e -ntp |
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,43 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>it.scoverage-maven-plugin</groupId> | ||
<artifactId>integration_tests_parent</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<relativePath>../integration_tests_parent/pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>test_skip_configured</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<name>Test Scoverage is Skipped when configured</name> | ||
<description>Test Scoverage is Skipped when configured</description> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>net.alchim31.maven</groupId> | ||
<artifactId>scala-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.scalatest</groupId> | ||
<artifactId>scalatest-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
6 changes: 6 additions & 0 deletions
6
src/it/test_skip_configured/src/main/scala/HelloServiceScala.scala
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,6 @@ | ||
package service | ||
|
||
object HelloServiceScala { | ||
def hello = { "Hello" } | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
src/it/test_skip_configured/src/test/scala/HelloServiceScalaTest.scala
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,12 @@ | ||
package service | ||
|
||
import org.scalatest.wordspec.AnyWordSpec | ||
|
||
class HelloServiceScalaTest extends AnyWordSpec { | ||
|
||
"HelloService" should { | ||
"say hello" in { | ||
assert(HelloServiceScala.hello == "Hello") | ||
} | ||
} | ||
} |
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,13 @@ | ||
try { | ||
|
||
def logFile = new File(basedir, "build.log") | ||
def lines = logFile.readLines() | ||
assert lines.contains("[INFO] Skipping Scoverage execution as configured") | ||
assert !lines.contains("Generating \"SCoverage\" report") | ||
|
||
return true | ||
|
||
} catch (Throwable e) { | ||
e.printStackTrace() | ||
return false | ||
} |
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