You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2018/03/25 18:30:33 UTC
[maven-compiler-plugin] branch TEST_TO_FIX_MCOMPILER-192 updated:
Enhanced test.
This is an automated email from the ASF dual-hosted git repository.
khmarbaise pushed a commit to branch TEST_TO_FIX_MCOMPILER-192
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git
The following commit(s) were added to refs/heads/TEST_TO_FIX_MCOMPILER-192 by this push:
new aaea92e Enhanced test.
aaea92e is described below
commit aaea92e40e26a50ab6419ba5ad6a7a66311c5caf
Author: Karl Heinz Marbaise <kh...@apache.org>
AuthorDate: Sun Mar 25 20:30:24 2018 +0200
Enhanced test.
---
src/it/MCOMPILER-192/verify.groovy | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/src/it/MCOMPILER-192/verify.groovy b/src/it/MCOMPILER-192/verify.groovy
index df3d144..55074eb 100644
--- a/src/it/MCOMPILER-192/verify.groovy
+++ b/src/it/MCOMPILER-192/verify.groovy
@@ -22,26 +22,21 @@ assert logFile.exists()
def content = logFile.getText('UTF-8')
-def checkResultSquare = content.contains ( '[INFO]' )
-def checkResult = content.contains ( '[INFO] BUILD FAILURE' )
-def checkExpected = content.contains( 'Usage: javac <options> <source files>' )
-def anothExpected = content.contains( '[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.1-SNAPSHOT:compile (default-compile) on project blah: Compilation failure -> [Help 1]')
-def twoFilesBeingCompiled = content.contains ( '[INFO] Compiling 2 source files to ' )
-
def jenkins = System.getenv ( 'JENKINS_URL' );
println "Jenkins: ${jenkins}"
+def causedByExpected = content.contains ( 'Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure' )
+def twoFilesBeingCompiled = content.contains ( '[INFO] Compiling 2 source files to ' )
+def checkResult = content.contains ( '[INFO] BUILD FAILURE' )
+def compilationFailure1 = content.contains( '[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:')
+def compilationFailure2 = content.contains( ':compile (default-compile) on project blah: Compilation failure -> [Help 1]')
-println "checkResult: ${checkResult} checkResultSquare: ${checkResultSquare} checkExpected:${checkExpected} anothExpected:${anothExpected} twoFilesBeingCompiled:${twoFilesBeingCompiled}"
-
-// Just a test ..
-if ( !content.contains ( '[INFO] BUILD FAILURE' ) ) {
- throw new RuntimeException( "BUILD FAILURE NOT EXISTING." )
-}
+println "Jenkins: causedByExpected:${causedByExpected} twoFilesBeingCompiled:${twoFilesBeingCompiled} checkResult: ${checkResult} compilationFailure1: ${compilationFailure1} compilationFailure2: ${compilationFailure2}"
+def finalResult = twoFilesBeingCompiled && checkResult && causedByExpected && compilationFailure1 && compilationFailure2
// Disable for Jenkins. Once fixed, this test will fail again. In that case remove the JENKINS_URL again.
-if ( !content.contains( 'Usage: javac <options> <source files>' ) ) {
- throw new RuntimeException( "log not containing Usage: javac <options> <source files> but <startLog>" + content + "</startLog>")
+if ( !finalResult ) {
+ throw new RuntimeException( "log does not contain expected result to be failed but <startLog>" + content + "</startLog>")
}
--
To stop receiving notification emails like this one, please contact
khmarbaise@apache.org.