Skip to content

Commit

Permalink
other ways of ignoring Deneb fork choice ref tests
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Sep 21, 2023
1 parent 42c1ff2 commit f0181c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ private TestExecutor getExecutorFor(final TestDefinition testDefinition) {
testExecutor = COMMON_TEST_TYPES.get(testDefinition.getTestType());
}

// TODO: https://github.com/Consensys/teku/issues/7539
if (testDefinition.getFork().equals(TestFork.DENEB)
&& testExecutor instanceof ForkChoiceTestExecutor) {
testExecutor = TestExecutor.IGNORE_TESTS;
}

if (testExecutor == null) {
return Assertions.fail("Unsupported test type " + testDefinition.getTestType());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.nio.file.Path;
import java.util.List;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Stream;
import tech.pegasys.teku.ethtests.TestFork;
import tech.pegasys.teku.infrastructure.async.ExceptionThrowingFunction;
Expand All @@ -32,10 +31,6 @@ public class ReferenceTestFinder {
private static final List<String> SUPPORTED_FORKS =
List.of(
TestFork.PHASE0, TestFork.ALTAIR, TestFork.BELLATRIX, TestFork.CAPELLA, TestFork.DENEB);
// should only be used to temporarily disable specific reference tests,
// otherwise should return false
private static final Predicate<TestDefinition> IGNORE_TESTS =
test -> test.getFork().equals(TestFork.DENEB) && test.getTestType().startsWith("fork_choice");

@MustBeClosed
public static Stream<TestDefinition> findReferenceTests() throws IOException {
Expand Down Expand Up @@ -63,8 +58,7 @@ private static Stream<TestDefinition> findTestTypes(final Path specDirectory) th
new SszTestFinder("ssz_static"),
new ShufflingTestFinder(),
new PyspecTestFinder())
.flatMap(unchecked(finder -> finder.findTests(fork, spec, testsPath)))
.filter(test -> !IGNORE_TESTS.test(test));
.flatMap(unchecked(finder -> finder.findTests(fork, spec, testsPath)));
});
}

Expand Down

0 comments on commit f0181c7

Please sign in to comment.