forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep test folders of failed build tools integration tests (elastic#89296
) (elastic#89308) Backports the following commits to 7.17: - Keep test folders of failed build tools integration tests (elastic#89296)
- Loading branch information
Showing
3 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...ols/src/testFixtures/java/org/elasticsearch/gradle/internal/test/TestResultExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
package org.elasticsearch.gradle.internal.test; | ||
|
||
import org.spockframework.runtime.AbstractRunListener; | ||
import org.spockframework.runtime.extension.IGlobalExtension; | ||
import org.spockframework.runtime.model.ErrorInfo; | ||
import org.spockframework.runtime.model.IterationInfo; | ||
import org.spockframework.runtime.model.SpecInfo; | ||
|
||
public class TestResultExtension implements IGlobalExtension { | ||
|
||
@Override | ||
public void visitSpec(SpecInfo spec) { | ||
spec.addListener(new ErrorListener()); | ||
} | ||
|
||
public static class ErrorListener extends AbstractRunListener { | ||
ErrorInfo errorInfo; | ||
|
||
@Override | ||
public void beforeIteration(IterationInfo iteration) { | ||
errorInfo = null; | ||
} | ||
|
||
@Override | ||
public void error(ErrorInfo error) { | ||
errorInfo = error; | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...ixtures/resources/META-INF/services/org.spockframework.runtime.extension.IGlobalExtension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
# or more contributor license agreements. Licensed under the Elastic License | ||
# 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
# in compliance with, at your election, the Elastic License 2.0 or the Server | ||
# Side Public License, v 1. | ||
# | ||
|
||
org.elasticsearch.gradle.internal.test.TestResultExtension |