Skip to content

Commit

Permalink
Add JBang script that will be used by Jenkins job
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvavrik committed Feb 15, 2024
1 parent 956b946 commit 6e8c98d
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 4 deletions.
16 changes: 16 additions & 0 deletions jbang-scripts/FlakyTestRunSummarizer.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//usr/bin/env jbang "$0" "$@" ; exit $?

//DEPS io.quarkus.qe:flaky-run-reporter:0.1.1.Beta1-SNAPSHOT

import io.quarkus.qe.reporter.flakyrun.summary.FlakyRunSummaryReporter;

public class FlakyTestRunSummarizer {
public static void main(String... args) {
try {
new FlakyRunSummaryReporter(args).createReport();
System.exit(0);
} catch (Exception e) {
System.exit(1);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.quarkus.qe.reporter.flakyrun;
package io.quarkus.qe.reporter.flakyrun.mavenextension;

import io.quarkus.qe.reporter.flakyrun.reporter.FlakyRunReporter;
import org.apache.maven.AbstractMavenLifecycleParticipant;
import org.apache.maven.execution.MavenSession;
import org.codehaus.plexus.component.annotations.Component;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.quarkus.qe.reporter.flakyrun;
package io.quarkus.qe.reporter.flakyrun.reporter;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down Expand Up @@ -29,7 +29,7 @@ public class FlakyRunReporter {
private static final Path MAVEN_FAILSAFE_REPORTS_PATH = Path.of(TARGET_DIR, "failsafe-reports");
private final Logger logger;

FlakyRunReporter(Logger logger) {
public FlakyRunReporter(Logger logger) {
this.logger = logger;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.quarkus.qe.reporter.flakyrun;
package io.quarkus.qe.reporter.flakyrun.reporter;

import io.quarkus.bot.build.reporting.model.ProjectReport;
import org.apache.maven.plugins.surefire.report.ReportTestCase;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package io.quarkus.qe.reporter.flakyrun.summary;

import java.util.List;

public record FlakyRunSummary(String projectName, String projectBaseDir, String testFullName,
List<FlakyRunSummaryItem> flakes) {

public record FlakyRunSummaryItem(String failureMessage, String failureType, String failureStackTrace,
String dateTime) {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package io.quarkus.qe.reporter.flakyrun.summary;

public class FlakyRunSummaryReporter {
public FlakyRunSummaryReporter(String[] args) {
// FIXME impl. me!
for (String arg : args) {
System.out.println("system arg is " + arg);
}
}

public void createReport() {

}
}

0 comments on commit 6e8c98d

Please sign in to comment.