Add short tests

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2019-12-09 16:49:46 +01:00
parent 0b4db5530c
commit 1a2401a816
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA
3 changed files with 19 additions and 3 deletions

View File

@ -76,7 +76,7 @@ jobs:
- store_artifacts:
path: lotus-storage-miner
test:
test: &test
description: |
Run tests with gotestsum.
parameters:
@ -154,6 +154,9 @@ jobs:
- "~/go/src/github.com"
- "~/go/src/golang.org"
test-short:
<<: *test
build_macos:
description: build darwin lotus binary
macos:
@ -254,8 +257,9 @@ workflows:
jobs:
- lint-changes:
args: "--new-from-rev origin/master"
- test:
codecov-upload: true
- test
- test-short:
go-test-flags: "--timeout 10m --short"
- mod-tidy-check
- build-all
- build_macos:

View File

@ -124,6 +124,9 @@ func post(t *testing.T, sb *sectorbuilder.SectorBuilder, seals ...seal) time.Tim
}
func TestSealAndVerify(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode")
}
if runtime.NumCPU() < 10 && os.Getenv("CI") == "" { // don't bother on slow hardware
t.Skip("this is slow")
}
@ -193,6 +196,9 @@ func TestSealAndVerify(t *testing.T) {
}
func TestSealPoStNoCommit(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode")
}
if runtime.NumCPU() < 10 && os.Getenv("CI") == "" { // don't bother on slow hardware
t.Skip("this is slow")
}
@ -259,6 +265,9 @@ func TestSealPoStNoCommit(t *testing.T) {
}
func TestSealAndVerify2(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode")
}
if runtime.NumCPU() < 10 && os.Getenv("CI") == "" { // don't bother on slow hardware
t.Skip("this is slow")
}

View File

@ -292,5 +292,8 @@ func TestAPIRPC(t *testing.T) {
}
func TestAPIDealFlow(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode")
}
test.TestDealFlow(t, builder)
}