maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SUREFIRE-1610) Provide a flag for skipping test execution that isn't shared with Failsafe
Date Sun, 09 Dec 2018 19:21:00 GMT

    [ https://issues.apache.org/jira/browse/SUREFIRE-1610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16714066#comment-16714066
] 

ASF GitHub Bot commented on SUREFIRE-1610:
------------------------------------------

srdo closed pull request #206: SUREFIRE-1610: Add skipUTs flag to SurefirePlugin
URL: https://github.com/apache/maven-surefire/pull/206
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
b/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
index fdc758ad1..1b5ad7c12 100644
--- a/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
+++ b/maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java
@@ -329,6 +329,15 @@
      */
     @Parameter( property = "surefire.skipAfterFailureCount", defaultValue = "0" )
     private int skipAfterFailureCount;
+    
+    /**
+     * Set this to "true" to skip running tests, but still compile them. Its use is NOT RECOMMENDED,
but quite
+     * convenient on occasion.
+     * 
+     * @since 3.0.0-M3
+     */
+    @Parameter( property = "skipUTs", defaultValue = "false" )
+    private boolean skipUTs;
 
     /**
      * After the plugin process is shutdown by sending <i>SIGTERM signal (CTRL+C)</i>,
<i>SHUTDOWN command</i> is
@@ -376,7 +385,7 @@ protected void handleSummary( RunResult summary, Exception firstForkException
)
     @Override
     protected boolean isSkipExecution()
     {
-        return isSkip() || isSkipTests() || isSkipExec();
+        return isSkip() || isSkipTests() || isSkipExec() || isSkipUTs();
     }
 
     @Override
@@ -411,6 +420,16 @@ public void setSkipTests( boolean skipTests )
         this.skipTests = skipTests;
     }
 
+    public boolean isSkipUTs()
+    {
+        return skipUTs;
+    }
+
+    public void setSkipUTs( boolean skipUTs )
+    {
+        this.skipUTs = skipUTs;
+    }
+
     @Override
     public boolean isSkipExec()
     {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Provide a flag for skipping test execution that isn't shared with Failsafe
> --------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1610
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1610
>             Project: Maven Surefire
>          Issue Type: Wish
>          Components: Maven Surefire Plugin
>    Affects Versions: 3.0.0-M1
>            Reporter: Stig Rohde Døssing
>            Priority: Minor
>
> I have a project using both Surefire and Failsafe for running tests. I would like to
be able to run all tests, only Surefire tests, only Failsafe tests or no tests by supplying
command line flags.
> -DskipTests skips all tests
> -DskipITs skips Failsafe tests
> It would be nice if Surefire had an extra "skip tests" flag that wasn't shared with Failsafe,
similar to skipITs, so I could disable only the Surefire tests.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message