-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implementing "parallelism-safe" Yatspec results (squashed commit for …
…upstream PR)
- Loading branch information
Showing
23 changed files
with
598 additions
and
92 deletions.
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
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
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
Binary file not shown.
16 changes: 16 additions & 0 deletions
16
src/com/googlecode/yatspec/junit/SpecResultMetadataListener.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,16 @@ | ||
package com.googlecode.yatspec.junit; | ||
|
||
import com.googlecode.yatspec.state.Result; | ||
import com.googlecode.yatspec.state.ResultMetadata; | ||
import com.googlecode.yatspec.state.ResultMetadataOnly; | ||
|
||
import java.io.File; | ||
import java.util.Collection; | ||
import java.util.Collections; | ||
|
||
public interface SpecResultMetadataListener extends SpecResultListener { | ||
void completeMetadata(File yatspecOutputDir, Collection<ResultMetadata> results) throws Exception; | ||
default void complete(File yatspecOutputDir, Result result) throws Exception { | ||
completeMetadata(yatspecOutputDir, Collections.singleton(ResultMetadataOnly.fromResult(result))); | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,22 +1,23 @@ | ||
package com.googlecode.yatspec.rendering; | ||
|
||
import com.googlecode.totallylazy.Sequence; | ||
import com.googlecode.yatspec.state.Result; | ||
import com.googlecode.yatspec.state.ResultMetadata; | ||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
import java.util.concurrent.CopyOnWriteArrayList; | ||
|
||
import static com.googlecode.totallylazy.Sequences.sequence; | ||
|
||
public class Index { | ||
private final List<Result> files = new CopyOnWriteArrayList<Result>(); | ||
private final List<ResultMetadata> files = new CopyOnWriteArrayList<ResultMetadata>(); | ||
|
||
public Index add(Result result) { | ||
files.add(result); | ||
public Index addAll(Collection<ResultMetadata> results) { | ||
files.addAll(results); | ||
return this; | ||
} | ||
|
||
public Sequence<Result> entries() { | ||
public Sequence<ResultMetadata> entries() { | ||
return sequence(files); | ||
} | ||
} |
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
11 changes: 6 additions & 5 deletions
11
src/com/googlecode/yatspec/rendering/html/index/HtmlIndexRenderer.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
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
Oops, something went wrong.