mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-04 00:44:27 +00:00
9bd6147027
* bls spec tests * add more bls tests * use ioutil instead of bazel runfiles * dont read bytes * skip tests that overflow uint64 * manually fix input data * add tests * lint and gaz * add all new changes * some refactoring, cleanup, remove new API methods that only exist for tests * gaz * Remove yamls, skip test
22 lines
586 B
Go
22 lines
586 B
Go
package spectest
|
|
|
|
import (
|
|
"io/ioutil"
|
|
|
|
"github.com/bazelbuild/rules_go/go/tools/bazel"
|
|
)
|
|
|
|
const prefix = "/eth2_spec_tests/tests/bls/"
|
|
|
|
// Load BLS yaml from spec test bls directory. The file parameter should be in
|
|
// the format of the path starting at the bls directory.
|
|
// Example: aggregate_pubkeys/aggregate_pubkeys.yaml where the full path would
|
|
// be tests/bls/aggregate_pubkeys/aggregate_pubkeys.yaml.
|
|
func loadBlsYaml(file string) ([]byte, error) {
|
|
filepath, err := bazel.Runfile(prefix + file)
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return ioutil.ReadFile(filepath)
|
|
}
|