Skip to content

Commit 00cfe56

Browse files
committed
chore: update gnovm makefile
Signed-off-by: Manfred Touron <[email protected]>
1 parent ea26338 commit 00cfe56

File tree

8 files changed

+40
-72
lines changed

8 files changed

+40
-72
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ proto/*
88
testdir
99
pkgs/sdk/vm/_testdata
1010
cmd/gnodev/gnodev
11-
build/*
11+
**/build/
1212
*.tx
1313
*.log.*
1414
*.log

gnovm/Makefile

Lines changed: 33 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ help:
33
@echo "Available make commands:"
44
@cat Makefile | grep '^[a-z]' | grep -v '=' | cut -d: -f1 | sort | sed 's/^/ /'
55

6+
rundep=go run -modfile ../misc/devdeps/go.mod
7+
68
.PHONY: build
79
build:
810
go build -o build/gno ./cmd/gno
@@ -22,83 +24,49 @@ fmt:
2224

2325
########################################
2426
# Test suite
25-
.PHONY: test test.go test.go1 test.go2 test.go3 test.go4 test.gno test.filesNative test.filesStdlibs test.realm test.packages test.flappy test.packages0 test.packages1 test.packages2 test.docker-integration
26-
test: test.gno test.go test.flappy
27+
.PHONY: test
28+
test: _test.cmd _test.pkg _test.gnolang
2729
@echo "Full test suite finished."
2830

29-
test.gno: test.filesNative test.filesStdlibs test.packages
30-
go test tests/*.go -v -run "TestFileStr"
31-
go test tests/*.go -v -run "TestSelectors"
32-
33-
test.go: test.go1 test.go2 test.go3 test.go4
34-
35-
test.go1:
36-
# test most of pkgs/* except amino and bft.
37-
# -p 1 shows test failures as they come
38-
# maybe another way to do this?
39-
go test `go list ./pkgs/... | grep -v pkgs/amino/ | grep -v pkgs/bft/` -v -p 1 -timeout=30m
31+
.PHONY: _test.cmd
32+
_test.cmd:
33+
go test ./cmd/... -v -p 1 -timeout=30m
4034

41-
test.go2:
42-
# test amino.
43-
go test ./pkgs/amino/... -v -p 1 -timeout=30m
35+
.PHONY: test.pkg
36+
test.pkg:
37+
go test ./pkg/... -v -p 1 -timeout=30m
4438

45-
test.go3:
46-
# test bft.
47-
go test ./pkgs/bft/... -v -p 1 -timeout=30m
48-
49-
test.go4:
50-
go test ./cmd/gnodev ./cmd/gnoland -v -p 1 -timeout=30m
51-
52-
test.filesNative:
39+
.PHONY: _test.gnolang
40+
_test.gnolang: _test.gnolang.native _test.gnolang.stdlibs _test.gnolang.realm _test.gnolang.pkg0 _test.gnolang.pkg1 _test.gnolang.pkg2 _test.gnolang.other
41+
_test.gnolang.other:
42+
go test tests/*.go -v -run "TestFileStr"
43+
go test tests/*.go -v -run "TestSelectors"
44+
_test.gnolang.native:
5345
go test tests/*.go -v -test.short -run "TestFilesNative/" --timeout 30m
54-
55-
test.filesNative.sync:
46+
_test.gnolang.native.sync:
5647
go test tests/*.go -v -test.short -run "TestFilesNative/" --timeout 30m --update-golden-tests
57-
58-
test.filesStdlibs:
48+
_test.gnolang.stdlibs:
5949
go test tests/*.go -v -test.short -run 'TestFiles$$/' --timeout 30m
60-
61-
test.filesStdlibs.sync:
50+
_test.gnolang.stdlibs.sync:
6251
go test tests/*.go -v -test.short -run 'TestFiles$$/' --timeout 30m --update-golden-tests
63-
64-
test.realm:
52+
_test.gnolang.realm:
6553
go test tests/*.go -v -run "TestFiles/^zrealm" --timeout 30m
66-
67-
test.packages: test.packages0 test.packages1 test.packages2
68-
69-
test.packages0:
54+
_test.gnolang.pkg0:
7055
go test tests/*.go -v -run "TestPackages/(bufio|crypto|encoding|errors|internal|io|math|sort|std|stdshim|strconv|strings|testing|unicode)" --timeout 30m
71-
72-
test.packages1:
56+
_test.gnolang.pkg1:
7357
go test tests/*.go -v -run "TestPackages/regexp" --timeout 30m
74-
75-
test.packages2:
58+
_test.gnolang.pkg2:
7659
go test tests/*.go -v -run "TestPackages/bytes" --timeout 30m
7760

7861
# Code gen
62+
stringer_cmd=$(rundep) golang.org/x/tools/cmd/stringer
7963
stringer:
80-
stringer -type=Kind
81-
stringer -type=Op
82-
stringer -type=TransCtrl
83-
stringer -type=TransField
84-
stringer -type=VPType
85-
stringer -type=Word
86-
87-
genproto:
88-
rm -rf proto/*
89-
find pkgs | grep -v "^pkgs\/amino" | grep "\.proto" | xargs rm
90-
find pkgs | grep -v "^pkgs\/amino" | grep "pbbindings" | xargs rm
91-
find pkgs | grep -v "^pkgs\/amino" | grep "pb.go" | xargs rm
92-
@rm gno.proto || true
93-
@rm pbbindings.go || true
94-
@rm gno.pb.go || true
95-
go run cmd/genproto/genproto.go
96-
97-
genproto2:
98-
rm -rf proto/*
99-
#find pkgs | grep -v "^pkgs\/amino" | grep "\.proto" | xargs rm
100-
find pkgs | grep -v "^pkgs\/amino" | grep "pbbindings" | xargs rm
101-
find pkgs | grep -v "^pkgs\/amino" | grep "pb.go" | xargs rm
102-
#@rm gno.proto || true
103-
@rm pbbindings.go || true
104-
@rm gno.pb.go || true
64+
$(stringer_cmd) -type=Kind ./pkg/gnolang
65+
$(stringer_cmd) -type=Op ./pkg/gnolang
66+
$(stringer_cmd) -type=TransCtrl ./pkg/gnolang
67+
$(stringer_cmd) -type=TransField ./pkg/gnolang
68+
$(stringer_cmd) -type=VPType ./pkg/gnolang
69+
$(stringer_cmd) -type=Word ./pkg/gnolang
70+
71+
# genproto:
72+
# see top-level Makefile.

gnovm/pkg/gnolang/kind_string.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gnovm/pkg/gnolang/op_string.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gnovm/pkg/gnolang/transctrl_string.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gnovm/pkg/gnolang/transfield_string.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gnovm/pkg/gnolang/vptype_string.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gnovm/pkg/gnolang/word_string.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)