Merge pull request #1438 from filecoin-project/frrist/display-chainval-testname
print chain-validation test name when running
This commit is contained in:
commit
9df4fce282
@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
suites "github.com/filecoin-project/chain-validation/suites"
|
suites "github.com/filecoin-project/chain-validation/suites"
|
||||||
@ -46,7 +47,9 @@ func TestChainValidationMessageSuite(t *testing.T) {
|
|||||||
if TestSuiteSkipper.Skip(testCase) {
|
if TestSuiteSkipper.Skip(testCase) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
testCase(t, f)
|
t.Run(caseName(testCase), func(t *testing.T) {
|
||||||
|
testCase(t, f)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,6 +59,14 @@ func TestChainValidationTipSetSuite(t *testing.T) {
|
|||||||
if TestSuiteSkipper.Skip(testCase) {
|
if TestSuiteSkipper.Skip(testCase) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
testCase(t, f)
|
t.Run(caseName(testCase), func(t *testing.T) {
|
||||||
|
testCase(t, f)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func caseName(testCase suites.TestCase) string {
|
||||||
|
fqName := runtime.FuncForPC(reflect.ValueOf(testCase).Pointer()).Name()
|
||||||
|
toks := strings.Split(fqName, ".")
|
||||||
|
return toks[len(toks)-1]
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user