separate conformance suite on CI.
This commit is contained in:
parent
b9d67296ef
commit
f1c452754f
@ -146,6 +146,10 @@ jobs:
|
|||||||
description: |
|
description: |
|
||||||
Upload coverage report to https://codecov.io/. Requires the codecov API token to be
|
Upload coverage report to https://codecov.io/. Requires the codecov API token to be
|
||||||
set as an environment variable for private projects.
|
set as an environment variable for private projects.
|
||||||
|
skip-conformance:
|
||||||
|
type: string
|
||||||
|
default: "0"
|
||||||
|
description: "Skip conformance tests (default: no)."
|
||||||
executor: << parameters.executor >>
|
executor: << parameters.executor >>
|
||||||
steps:
|
steps:
|
||||||
- install-deps
|
- install-deps
|
||||||
@ -161,6 +165,7 @@ jobs:
|
|||||||
name: go test
|
name: go test
|
||||||
environment:
|
environment:
|
||||||
LOTUS_TEST_WINDOW_POST: << parameters.winpost-test >>
|
LOTUS_TEST_WINDOW_POST: << parameters.winpost-test >>
|
||||||
|
SKIP_CONFORMANCE: << parameters.skip-conformance >>
|
||||||
command: |
|
command: |
|
||||||
mkdir -p /tmp/test-reports/<< parameters.test-suite-name >>
|
mkdir -p /tmp/test-reports/<< parameters.test-suite-name >>
|
||||||
mkdir -p /tmp/test-artifacts
|
mkdir -p /tmp/test-artifacts
|
||||||
@ -191,6 +196,8 @@ jobs:
|
|||||||
<<: *test
|
<<: *test
|
||||||
test-window-post:
|
test-window-post:
|
||||||
<<: *test
|
<<: *test
|
||||||
|
test-conformance:
|
||||||
|
<<: *test
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
description: build darwin lotus binary
|
description: build darwin lotus binary
|
||||||
@ -326,17 +333,24 @@ workflows:
|
|||||||
- test:
|
- test:
|
||||||
codecov-upload: true
|
codecov-upload: true
|
||||||
test-suite-name: full
|
test-suite-name: full
|
||||||
|
skip-conformance: "1"
|
||||||
- test-window-post:
|
- test-window-post:
|
||||||
go-test-flags: "-run=TestWindowedPost"
|
go-test-flags: "-run=TestWindowedPost"
|
||||||
|
skip-conformance: "1"
|
||||||
winpost-test: "1"
|
winpost-test: "1"
|
||||||
test-suite-name: window-post
|
test-suite-name: window-post
|
||||||
- test-short:
|
- test-short:
|
||||||
go-test-flags: "--timeout 10m --short"
|
go-test-flags: "--timeout 10m --short"
|
||||||
test-suite-name: short
|
test-suite-name: short
|
||||||
|
skip-conformance: "1"
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only:
|
only:
|
||||||
- /^v\d+\.\d+\.\d+$/
|
- /^v\d+\.\d+\.\d+$/
|
||||||
|
- test-conformance:
|
||||||
|
test-suite-name: conformance
|
||||||
|
packages: "./conformance"
|
||||||
|
skip-conformance: "0"
|
||||||
- build-debug
|
- build-debug
|
||||||
- build-all:
|
- build-all:
|
||||||
requires:
|
requires:
|
||||||
|
@ -24,12 +24,12 @@ const (
|
|||||||
// It is mounted on the Lotus repo as a git submodule.
|
// It is mounted on the Lotus repo as a git submodule.
|
||||||
//
|
//
|
||||||
// When running this test, the corpus root can be overridden through the
|
// When running this test, the corpus root can be overridden through the
|
||||||
// -corpus.root CLI flag to run an alternate corpus.
|
// -conformance.corpus CLI flag to run an alternate corpus.
|
||||||
defaultCorpusRoot = "../extern/test-vectors/corpus"
|
defaultCorpusRoot = "../extern/test-vectors/corpus"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// corpusRoot is the effective corpus root path, taken from the `-corpus.root` CLI flag,
|
// corpusRoot is the effective corpus root path, taken from the `-conformance.corpus` CLI flag,
|
||||||
// falling back to defaultCorpusRoot if not provided.
|
// falling back to defaultCorpusRoot if not provided.
|
||||||
corpusRoot string
|
corpusRoot string
|
||||||
// ignore is a set of paths relative to root to skip.
|
// ignore is a set of paths relative to root to skip.
|
||||||
@ -37,11 +37,15 @@ var (
|
|||||||
".git": {},
|
".git": {},
|
||||||
"schema.json": {},
|
"schema.json": {},
|
||||||
}
|
}
|
||||||
|
skip bool
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
// read the alternative root from the -corpus.root CLI flag.
|
// read the alternative root from the -conformance.corpus CLI flag.
|
||||||
flag.StringVar(&corpusRoot, "corpus.root", defaultCorpusRoot, "test vector corpus directory")
|
flag.StringVar(&corpusRoot, "conformance.corpus", defaultCorpusRoot, "test vector corpus directory")
|
||||||
|
if strings.TrimSpace(os.Getenv("SKIP_CONFORMANCE")) == "1" {
|
||||||
|
skip = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestConformance is the entrypoint test that runs all test vectors found
|
// TestConformance is the entrypoint test that runs all test vectors found
|
||||||
@ -51,6 +55,9 @@ func init() {
|
|||||||
// as well as files beginning with _. It parses each file as a test vector, and
|
// as well as files beginning with _. It parses each file as a test vector, and
|
||||||
// runs it via the Driver.
|
// runs it via the Driver.
|
||||||
func TestConformance(t *testing.T) {
|
func TestConformance(t *testing.T) {
|
||||||
|
if skip {
|
||||||
|
t.SkipNow()
|
||||||
|
}
|
||||||
var vectors []string
|
var vectors []string
|
||||||
err := filepath.Walk(corpusRoot+"/", func(path string, info os.FileInfo, err error) error {
|
err := filepath.Walk(corpusRoot+"/", func(path string, info os.FileInfo, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user