Search in sources :

Example 1 with DaemonLogsAnalyzer

use of org.gradle.integtests.fixtures.daemon.DaemonLogsAnalyzer in project gradle by gradle.

the class AbstractGradleExecuter method cleanupIsolatedDaemons.

private void cleanupIsolatedDaemons() {
    List<DaemonLogsAnalyzer> analyzers = new ArrayList<>();
    List<GradleVersion> versions = (gradleVersionOverride != null) ? ImmutableList.of(gradleVersion, gradleVersionOverride) : ImmutableList.of(gradleVersion);
    for (File dir : isolatedDaemonBaseDirs) {
        for (GradleVersion version : versions) {
            try {
                DaemonLogsAnalyzer analyzer = new DaemonLogsAnalyzer(dir, version.getVersion());
                analyzers.add(analyzer);
                analyzer.killAll();
            } catch (Exception e) {
                getLogger().warn("Problem killing isolated daemons of Gradle version " + version + " in " + dir, e);
            }
        }
    }
    if (checkDaemonCrash) {
        analyzers.forEach(DaemonLogsAnalyzer::assertNoCrashedDaemon);
    }
}
Also used : DaemonLogsAnalyzer(org.gradle.integtests.fixtures.daemon.DaemonLogsAnalyzer) ArrayList(java.util.ArrayList) GradleVersion(org.gradle.util.GradleVersion) File(java.io.File) TestFile(org.gradle.test.fixtures.file.TestFile) UncheckedException(org.gradle.internal.UncheckedException) UncheckedIOException(org.gradle.api.UncheckedIOException) IOException(java.io.IOException)

Aggregations

File (java.io.File)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 UncheckedIOException (org.gradle.api.UncheckedIOException)1 DaemonLogsAnalyzer (org.gradle.integtests.fixtures.daemon.DaemonLogsAnalyzer)1 UncheckedException (org.gradle.internal.UncheckedException)1 TestFile (org.gradle.test.fixtures.file.TestFile)1 GradleVersion (org.gradle.util.GradleVersion)1