Repository navigation
test: enable spec tests related to eip-7549 #6741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 26 commits
6ddf100
14e6fd8
32e8ae0
f491628
39b259e
2ba9a22
8061a4d
c509eb0
c7f4b26
0ff25d9
cd74406
a4761e8
2cf273d
316a500
295642f
13878fa
bddcf2b
4285f75
8bcc864
6610dc1
3d88a33
8fc72da
8be57b1
323e74c
40b7eb7
3c6e2e6
ff0e397
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,8 @@ const ARTIFACT_FILENAMES = new Set([ | |
| ]); | ||
|
|
||
| export interface SkipOpts { | ||
| skippedPrefixes?: string[]; | ||
| skippedTestSuites?: RegExp[]; | ||
| skippedTests?: RegExp[]; | ||
| skippedForks?: string[]; | ||
| skippedRunners?: string[]; | ||
| skippedHandlers?: string[]; | ||
|
|
@@ -57,14 +58,17 @@ const coveredTestRunners = [ | |
| // ], | ||
| // ``` | ||
| export const defaultSkipOpts: SkipOpts = { | ||
| skippedForks: ["electra", "eip7594"], | ||
| skippedForks: ["eip7594"], | ||
| // TODO: capella | ||
| // BeaconBlockBody proof in lightclient is the new addition in v1.3.0-rc.2-hotfix | ||
| // Skip them for now to enable subsequently | ||
| skippedPrefixes: [ | ||
| "capella/light_client/single_merkle_proof/BeaconBlockBody", | ||
| "deneb/light_client/single_merkle_proof/BeaconBlockBody", | ||
| skippedTestSuites: [ | ||
| /^capella\/light_client\/single_merkle_proof\/BeaconBlockBody.*/, | ||
| /^deneb\/light_client\/single_merkle_proof\/BeaconBlockBody.*/, | ||
| // /^electra\/(?!operations\/attestations)(?!operations\/attester_slashing)/, | ||
| /^electra\/(?!operations\/attestation)/, | ||
| ], | ||
| skippedTests: [], | ||
| skippedRunners: ["merkle_proof", "networking"], | ||
| }; | ||
|
|
||
|
|
@@ -100,7 +104,10 @@ export function specTestIterator( | |
| opts: SkipOpts = defaultSkipOpts | ||
| ): void { | ||
| for (const forkStr of readdirSyncSpec(configDirpath)) { | ||
| if (opts?.skippedForks?.includes(forkStr)) { | ||
| if ( | ||
| opts?.skippedForks?.includes(forkStr) || | ||
| (process.env.SPEC_FILTER_FORK && forkStr !== process.env.SPEC_FILTER_FORK) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious why we would want to specify fork that we want to skip in a env variable
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quickly run the spec tests for some forks. Whilde debugging, if we run for all forks it take too much time. SPEC_FILTER_FORK=electra yarn test:spec:minimal |
||
| ) { | ||
| continue; | ||
| } | ||
| const fork = forkStr as ForkName; | ||
|
|
@@ -134,7 +141,7 @@ export function specTestIterator( | |
| for (const testSuite of readdirSyncSpec(testHandlerDirpath)) { | ||
| const testId = `${fork}/${testRunnerName}/${testHandler}/${testSuite}`; | ||
|
|
||
| if (opts?.skippedPrefixes?.some((skippedPrefix) => testId.startsWith(skippedPrefix))) { | ||
| if (opts?.skippedTestSuites?.some((skippedMatch) => testId.match(skippedMatch))) { | ||
| displaySkipTest(testId); | ||
| } else if (fork === undefined) { | ||
| displayFailTest(testId, `Unknown fork ${forkStr}`); | ||
|
|
@@ -150,7 +157,11 @@ export function specTestIterator( | |
| // Generic testRunner | ||
| else { | ||
| const {testFunction, options} = testRunner.fn(fork, testHandler, testSuite); | ||
|
|
||
| if (opts.skippedTests && options.shouldSkip === undefined) { | ||
| options.shouldSkip = (_testCase: any, name: string, _index: number): boolean => { | ||
| return opts?.skippedTests?.some((skippedMatch) => name.match(skippedMatch)) ?? false; | ||
| }; | ||
| } | ||
| describeDirectorySpecTest(testId, testSuiteDirpath, testFunction, options); | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.