From 4223e411b604e7edb2e46296f3f86a6c29ddb3dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 28 Aug 2023 13:24:00 +0200 Subject: [PATCH 1/3] ci: Use larger executer for cli tests --- .circleci/config.yml | 4 ++++ .circleci/template.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6b9ee160a..e9e43c656 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -995,6 +995,7 @@ workflows: suite: utest-unit-cli target: "./cli/... ./cmd/... ./api/..." get-params: true + executor: golang-2xl - test: name: test-unit-node requires: @@ -1002,12 +1003,14 @@ workflows: suite: utest-unit-node target: "./node/..." + - test: name: test-unit-rest requires: - build suite: utest-unit-rest target: "./blockstore/... ./build/... ./chain/... ./conformance/... ./gateway/... ./journal/... ./lib/... ./markets/... ./paychmgr/... ./tools/..." + executor: golang-2xl - test: name: test-unit-storage @@ -1016,6 +1019,7 @@ workflows: suite: utest-unit-storage target: "./storage/... ./extern/..." + - test: go-test-flags: "-run=TestMulticoreSDR" requires: diff --git a/.circleci/template.yml b/.circleci/template.yml index 1fea9acdf..52086239a 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -558,6 +558,7 @@ workflows: suite: utest-[[ $suite ]] target: "[[ $pkgs ]]" [[if eq $suite "unit-cli"]]get-params: true[[end]] + [[if eq $suite "unit-cli"]]executor: golang-2xl[[end]] [[- if eq $suite "unit-rest"]]executor: golang-2xl[[end]] [[- end]] - test: From d83956aa6d439a2faa8a4b48b72f31c8695faa61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 28 Aug 2023 13:43:50 +0200 Subject: [PATCH 2/3] ci: Ensure params in sealer tests --- storage/sealer/manager_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/storage/sealer/manager_test.go b/storage/sealer/manager_test.go index 8acd474a3..14eb21ddc 100644 --- a/storage/sealer/manager_test.go +++ b/storage/sealer/manager_test.go @@ -6,6 +6,9 @@ import ( "context" "encoding/json" "fmt" + "github.com/filecoin-project/go-paramfetch" + "github.com/filecoin-project/lotus/build" + "golang.org/x/xerrors" "io" "os" "path/filepath" @@ -198,6 +201,16 @@ func (m NullReader) NullBytes() int64 { return m.N } +func TestMain(m *testing.M) { + err := paramfetch.GetParams(context.TODO(), build.ParametersJSON(), build.SrsJSON(), uint64(2048)) + if err != nil { + panic(xerrors.Errorf("failed to acquire Groth parameters for 2KiB sectors: %w", err)) + } + + code := m.Run() + os.Exit(code) +} + func TestSnapDeals(t *testing.T) { logging.SetAllLoggers(logging.LevelWarn) ctx := context.Background() From f8faa85cba6434e8bf599aa19fb9786cb4b11878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 28 Aug 2023 16:12:14 +0200 Subject: [PATCH 3/3] make gen --- storage/sealer/manager_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/storage/sealer/manager_test.go b/storage/sealer/manager_test.go index 14eb21ddc..99ead1e8e 100644 --- a/storage/sealer/manager_test.go +++ b/storage/sealer/manager_test.go @@ -6,9 +6,6 @@ import ( "context" "encoding/json" "fmt" - "github.com/filecoin-project/go-paramfetch" - "github.com/filecoin-project/lotus/build" - "golang.org/x/xerrors" "io" "os" "path/filepath" @@ -24,13 +21,16 @@ import ( logging "github.com/ipfs/go-log/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "golang.org/x/xerrors" ffi "github.com/filecoin-project/filecoin-ffi" + "github.com/filecoin-project/go-paramfetch" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/proof" "github.com/filecoin-project/go-statestore" proof7 "github.com/filecoin-project/specs-actors/v7/actors/runtime/proof" + "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/storage/paths" "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper" "github.com/filecoin-project/lotus/storage/sealer/fsutil"