KEYCLOAK-9640 Unify surefire versions
This commit is contained in:
parent
c230ccb7e8
commit
e739344556
4 changed files with 39 additions and 32 deletions
|
@ -35,7 +35,6 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.8.1</version>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<redirectTestOutputToFile>false</redirectTestOutputToFile>
|
<redirectTestOutputToFile>false</redirectTestOutputToFile>
|
||||||
<enableAssertions>true</enableAssertions>
|
<enableAssertions>true</enableAssertions>
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.8.1</version>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<redirectTestOutputToFile>false</redirectTestOutputToFile>
|
<redirectTestOutputToFile>false</redirectTestOutputToFile>
|
||||||
<enableAssertions>true</enableAssertions>
|
<enableAssertions>true</enableAssertions>
|
||||||
|
|
|
@ -261,7 +261,6 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>2.19.1</version>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<failIfNoTests>false</failIfNoTests>
|
<failIfNoTests>false</failIfNoTests>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -1,44 +1,54 @@
|
||||||
package org.keycloak.testsuite;
|
package org.keycloak.testsuite;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.util.Scanner;
|
||||||
import java.io.IOException;
|
import java.util.regex.Matcher;
|
||||||
import java.io.InputStreamReader;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* A simple utility class for trimming test output (if successful).
|
||||||
|
*
|
||||||
|
* Created to shrink down the output for Travis.
|
||||||
|
*
|
||||||
* Created by st on 03/07/17.
|
* Created by st on 03/07/17.
|
||||||
*/
|
*/
|
||||||
public class LogTrimmer {
|
public class LogTrimmer {
|
||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
private static Pattern TEST_START_PATTERN = Pattern.compile("(\\[INFO\\] )?Running (.*)");
|
||||||
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
|
private static int TEST_NAME_GROUP = 2;
|
||||||
String testRunning = null;
|
|
||||||
StringBuilder sb = new StringBuilder();
|
public static void main(String[] args) {
|
||||||
for(String l = br.readLine(); l != null; l = br.readLine()) {
|
try (Scanner scanner = new Scanner(System.in)) {
|
||||||
if (testRunning == null) {
|
String testRunning = null;
|
||||||
if (l.startsWith("Running")) {
|
String line = null;
|
||||||
testRunning = l.split(" ")[1];
|
Matcher testMatcher = null;
|
||||||
System.out.println(l);
|
StringBuilder testText = new StringBuilder();
|
||||||
} else {
|
|
||||||
System.out.println("-- " + l);
|
while (scanner.hasNextLine()) {
|
||||||
}
|
line = scanner.nextLine();
|
||||||
} else {
|
if (testRunning == null) {
|
||||||
if (l.contains("Tests run:")) {
|
testMatcher = TEST_START_PATTERN.matcher(line);
|
||||||
if (!(l.contains("Failures: 0") && l.contains("Errors: 0"))) {
|
if (testMatcher.find()) {
|
||||||
System.out.println("--------- " + testRunning + " output start ---------");
|
testRunning = testMatcher.group(TEST_NAME_GROUP);
|
||||||
System.out.println(sb.toString());
|
System.out.println(line);
|
||||||
System.out.println("--------- " + testRunning + " output end ---------");
|
} else {
|
||||||
|
System.out.println("-- " + line);
|
||||||
}
|
}
|
||||||
System.out.println(l);
|
|
||||||
|
|
||||||
|
|
||||||
testRunning = null;
|
|
||||||
sb = new StringBuilder();
|
|
||||||
} else {
|
} else {
|
||||||
sb.append(testRunning.substring(testRunning.lastIndexOf('.') + 1) + " ++ " + l);
|
if (line.contains("Tests run:")) {
|
||||||
sb.append("\n");
|
if (!(line.contains("Failures: 0") && line.contains("Errors: 0"))) {
|
||||||
|
System.out.println("--------- " + testRunning + " output start ---------");
|
||||||
|
System.out.println(testText.toString());
|
||||||
|
System.out.println("--------- " + testRunning + " output end ---------");
|
||||||
|
}
|
||||||
|
System.out.println(line);
|
||||||
|
testRunning = null;
|
||||||
|
testText = new StringBuilder();
|
||||||
|
} else {
|
||||||
|
testText.append(testRunning.substring(testRunning.lastIndexOf('.') + 1) + " ++ " + line);
|
||||||
|
testText.append("\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue