From 395dff973d59cac5076c4990502e2f1ee72d2a84 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Wed, 22 Jun 2022 15:50:31 -0400 Subject: [PATCH 1/9] updates --- .vscode/settings.json | 22 +++++++++++++++++++++- go.mod | 4 ++++ go.sum | 12 ++++++++++++ tools/tools.go | 1 + 4 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 2c0a4eb2d63..09b9c90d216 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -23,5 +23,25 @@ "[proto3]": { "editor.defaultFormatter": "xaver.clang-format" }, - "clang-format.style": "{BasedOnStyle: Google, IndentWidth: 2, ColumnLimit: 120, AlignConsecutiveAssignments: true, AlignConsecutiveDeclarations: true, SpacesInSquareBrackets: true}" + "clang-format.style": "{BasedOnStyle: Google, IndentWidth: 2, ColumnLimit: 120, AlignConsecutiveAssignments: true, AlignConsecutiveDeclarations: true, SpacesInSquareBrackets: true}", + "workbench.colorCustomizations": { + "activityBar.activeBackground": "#403778", + "activityBar.activeBorder": "#000000", + "activityBar.background": "#403778", + "activityBar.foreground": "#e7e7e7", + "activityBar.inactiveForeground": "#e7e7e799", + "activityBarBadge.background": "#000000", + "activityBarBadge.foreground": "#e7e7e7", + "sash.hoverBorder": "#403778", + "statusBar.background": "#2d2755", + "statusBar.foreground": "#e7e7e7", + "statusBarItem.hoverBackground": "#403778", + "statusBarItem.remoteBackground": "#2d2755", + "statusBarItem.remoteForeground": "#e7e7e7", + "titleBar.activeBackground": "#2d2755", + "titleBar.activeForeground": "#e7e7e7", + "titleBar.inactiveBackground": "#2d275599", + "titleBar.inactiveForeground": "#e7e7e799" + }, + "peacock.color": "#2d2755" } diff --git a/go.mod b/go.mod index b6a836e495e..1ab05990184 100644 --- a/go.mod +++ b/go.mod @@ -25,6 +25,7 @@ require ( github.com/stretchr/testify v1.7.4 github.com/tendermint/tendermint v0.34.19 github.com/tendermint/tm-db v0.6.8-0.20220506192307-f628bb5dc95b + github.com/zimmski/go-mutesting v0.0.0-20210610104036-6d9217011a00 google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd google.golang.org/grpc v1.46.2 gopkg.in/yaml.v2 v2.4.0 @@ -151,6 +152,7 @@ require ( github.com/imdario/mergo v0.3.12 // indirect github.com/improbable-eng/grpc-web v0.14.1 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jessevdk/go-flags v1.4.0 // indirect github.com/jgautheron/goconst v1.5.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect @@ -246,6 +248,8 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/yagipy/maintidx v1.0.0 // indirect github.com/yeya24/promlinter v0.2.0 // indirect + github.com/zimmski/go-tool v0.0.0-20150119110811-2dfdc9ac8439 // indirect + github.com/zimmski/osutil v0.0.0-20190128123334-0d0b3ca231ac // indirect github.com/zondax/hid v0.9.0 // indirect gitlab.com/bosi/decorder v0.2.1 // indirect go.etcd.io/bbolt v1.3.6 // indirect diff --git a/go.sum b/go.sum index d26ae8dc774..f2268961f97 100644 --- a/go.sum +++ b/go.sum @@ -756,6 +756,7 @@ github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= @@ -795,6 +796,7 @@ github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSX github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/errcheck v1.6.0 h1:YTDO4pNy7AUN/021p+JGHycQyYNIyMoenM1YDVK6RlY= github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -889,6 +891,7 @@ github.com/mattn/go-runewidth v0.0.10 h1:CoZ3S2P7pvtP45xOtBw+/mDL2z0RKI576gSkzRR github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/goveralls v0.0.3/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -993,6 +996,7 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= @@ -1385,6 +1389,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/zimmski/go-mutesting v0.0.0-20210610104036-6d9217011a00 h1:KNiPkpQpqXvq40f8hh/1T7QasLJT/1MuBoOYA2vlxJk= +github.com/zimmski/go-mutesting v0.0.0-20210610104036-6d9217011a00/go.mod h1:RJt5SMnyha63GbdwCKJiX9djvvEC4KsfXJSZ5oTmSPw= +github.com/zimmski/go-tool v0.0.0-20150119110811-2dfdc9ac8439 h1:yHqsjUkj0HWbKPw/6ZqC0/eMklaRpqubA199vaRLzzE= +github.com/zimmski/go-tool v0.0.0-20150119110811-2dfdc9ac8439/go.mod h1:G4FVqCRvfz74AEB1crDNdQuvMfOoKtk7DlePsnV2yGs= +github.com/zimmski/osutil v0.0.0-20190128123334-0d0b3ca231ac h1:uiFRlKzyIzHeLOthe0ethUkSGW7POlqxU3Tc21R8QpQ= +github.com/zimmski/osutil v0.0.0-20190128123334-0d0b3ca231ac/go.mod h1:wJ9WGevuM/rw8aB2pQPFMUgXZWeaouI0ueFamR0DUPE= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= gitlab.com/bosi/decorder v0.2.1 h1:ehqZe8hI4w7O4b1vgsDZw1YU1PE7iJXrQWFMsocbQ1w= @@ -1758,6 +1768,7 @@ golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= @@ -1782,6 +1793,7 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191018212557-ed542cd5b28a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= diff --git a/tools/tools.go b/tools/tools.go index a16035f6194..61580ec665d 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -9,5 +9,6 @@ package tools import ( _ "github.com/golangci/golangci-lint/cmd/golangci-lint" + _ "github.com/zimmski/go-mutesting/cmd/go-mutesting" _ "mvdan.cc/gofumpt" ) From b59d5d72fc085004313dec6d8df4e0db06d25872 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Thu, 23 Jun 2022 09:34:47 -0400 Subject: [PATCH 2/9] updates --- Makefile | 6 ++++++ mutation.blacklist | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 mutation.blacklist diff --git a/Makefile b/Makefile index 36f7705f530..adbff44c401 100644 --- a/Makefile +++ b/Makefile @@ -217,6 +217,7 @@ PACKAGES_UNIT=$(shell go list ./... | grep -E -v 'simapp|e2e') PACKAGES_E2E=$(shell go list ./... | grep '/e2e') PACKAGES_SIM=$(shell go list ./... | grep '/simapp') TEST_PACKAGES=./... +MUTATION_SOURCES=x/tokenfactory/types/genesis.go include sims.mk @@ -242,6 +243,9 @@ test-e2e: test-e2e-skip-upgrade: @VERSION=$(VERSION) OSMOSIS_E2E_SKIP_UPGRADE=True go test -mod=readonly -timeout=25m -v $(PACKAGES_E2E) +test-mutation: + @go run github.com/zimmski/go-mutesting/cmd/go-mutesting --blacklist=mutation.blacklist $(MUTATION_SOURCES) + benchmark: @go test -mod=readonly -bench=. $(PACKAGES_UNIT) @@ -251,6 +255,8 @@ docker-build-debug: docker-build-e2e-chain-init: @docker build -t osmosis-e2e-chain-init:debug -f tests/e2e/chain_init/chain-init.Dockerfile . +.PHONY: test-mutation + ############################################################################### ### Linting ### ############################################################################### diff --git a/mutation.blacklist b/mutation.blacklist new file mode 100644 index 00000000000..ffc6cbd3ab9 --- /dev/null +++ b/mutation.blacklist @@ -0,0 +1,2 @@ +5e97df8a85d3b16dbc06853634d1098d +c687108accd09dfaf228c709d724e223 From d914e7a9abc897c40a4b41ca9b0edc856bcd0eb9 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Thu, 23 Jun 2022 13:22:37 -0400 Subject: [PATCH 3/9] updates --- scripts/mutation-test.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/mutation-test.sh diff --git a/scripts/mutation-test.sh b/scripts/mutation-test.sh new file mode 100644 index 00000000000..f113d27db95 --- /dev/null +++ b/scripts/mutation-test.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -eo pipefail + +# Only consider the following: +# * go files in types or keeper packages +# * ignore test and Protobuf files +MUTATION_SOURCES=$(find ./x -type f \( -path '*/keeper/*' -or -path '*/types/*' \) \( -name '*.go' -and -not -name '*_test.go' -and -not -name '*pb*' \)) + +# XXX: Filter on a module-by-module basis and expand when we think other modules +# are ready. +MUTATION_SOURCES=$(echo "$MUTATION_SOURCES" | grep './x/tokenfactory') + +# Collect multiple lines into a single line to be fed into go-mutesting +MUTATION_SOURCES=$(echo $MUTATION_SOURCES | tr '\n' ' ') + +OUTPUT=$(go run github.com/zimmski/go-mutesting/cmd/go-mutesting --blacklist=mutation.blacklist $MUTATION_SOURCES) +echo "$OUTPUT" | grep 'The mutation score' From ea3c2bbe99ae028687677e5302c165530ab39892 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Thu, 23 Jun 2022 13:39:21 -0400 Subject: [PATCH 4/9] updates --- scripts/mutation-test.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/mutation-test.sh b/scripts/mutation-test.sh index f113d27db95..852ffd92959 100644 --- a/scripts/mutation-test.sh +++ b/scripts/mutation-test.sh @@ -9,10 +9,18 @@ MUTATION_SOURCES=$(find ./x -type f \( -path '*/keeper/*' -or -path '*/types/*' # XXX: Filter on a module-by-module basis and expand when we think other modules # are ready. -MUTATION_SOURCES=$(echo "$MUTATION_SOURCES" | grep './x/tokenfactory') +MUTATION_SOURCES=$(echo "$MUTATION_SOURCES" | grep './x/tokenfactory/types/genesis.go') # Collect multiple lines into a single line to be fed into go-mutesting MUTATION_SOURCES=$(echo $MUTATION_SOURCES | tr '\n' ' ') OUTPUT=$(go run github.com/zimmski/go-mutesting/cmd/go-mutesting --blacklist=mutation.blacklist $MUTATION_SOURCES) -echo "$OUTPUT" | grep 'The mutation score' +RESULT=$(echo "$OUTPUT" | grep 'The mutation score') +SCORE=$(echo "$RESULT" | grep -Eo '[[:digit:]].[[:digit:]]+') + +echo $RESULT + +# Return a non-zero exit code if the score is below 75% +if (( $(echo "$SCORE < 0.75" |bc -l) )); then + exit 1 +fi From 3acc62e80eff271b9cea421172a165d6ab435fa7 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Thu, 23 Jun 2022 13:49:50 -0400 Subject: [PATCH 5/9] updates --- scripts/mutation-test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/mutation-test.sh b/scripts/mutation-test.sh index 852ffd92959..2ab50fa71f6 100644 --- a/scripts/mutation-test.sh +++ b/scripts/mutation-test.sh @@ -9,18 +9,21 @@ MUTATION_SOURCES=$(find ./x -type f \( -path '*/keeper/*' -or -path '*/types/*' # XXX: Filter on a module-by-module basis and expand when we think other modules # are ready. -MUTATION_SOURCES=$(echo "$MUTATION_SOURCES" | grep './x/tokenfactory/types/genesis.go') +MUTATION_SOURCES=$(echo "$MUTATION_SOURCES" | grep './x/tokenfactory') # Collect multiple lines into a single line to be fed into go-mutesting MUTATION_SOURCES=$(echo $MUTATION_SOURCES | tr '\n' ' ') OUTPUT=$(go run github.com/zimmski/go-mutesting/cmd/go-mutesting --blacklist=mutation.blacklist $MUTATION_SOURCES) + +# Fetch the final result output and the overall mutation testing score RESULT=$(echo "$OUTPUT" | grep 'The mutation score') -SCORE=$(echo "$RESULT" | grep -Eo '[[:digit:]].[[:digit:]]+') +SCORE=$(echo "$RESULT" | grep -Eo '[[:digit:]]\.[[:digit:]]+') echo $RESULT # Return a non-zero exit code if the score is below 75% if (( $(echo "$SCORE < 0.75" |bc -l) )); then + echo "Mutation testing score below desired level ($SCORE < 0.75)" exit 1 fi From 25ca23d7055d0791a8dd114211f6badbc2eef707 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Thu, 23 Jun 2022 13:50:21 -0400 Subject: [PATCH 6/9] updates --- scripts/mutation-test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/mutation-test.sh b/scripts/mutation-test.sh index 2ab50fa71f6..f55bacba7c7 100644 --- a/scripts/mutation-test.sh +++ b/scripts/mutation-test.sh @@ -8,7 +8,8 @@ set -eo pipefail MUTATION_SOURCES=$(find ./x -type f \( -path '*/keeper/*' -or -path '*/types/*' \) \( -name '*.go' -and -not -name '*_test.go' -and -not -name '*pb*' \)) # XXX: Filter on a module-by-module basis and expand when we think other modules -# are ready. +# are ready. Once all modules are considered stable enough to be tested, remove +# this filter entirely. MUTATION_SOURCES=$(echo "$MUTATION_SOURCES" | grep './x/tokenfactory') # Collect multiple lines into a single line to be fed into go-mutesting From 0aacd8471155977bc8580a7a7ccafc5ab5954fdb Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Fri, 24 Jun 2022 18:09:31 -0400 Subject: [PATCH 7/9] updates --- mutation.blacklist | 15 +++++++++++++++ scripts/mutation-test.sh | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/mutation.blacklist b/mutation.blacklist index ffc6cbd3ab9..b3cb6960fb8 100644 --- a/mutation.blacklist +++ b/mutation.blacklist @@ -1,2 +1,17 @@ 5e97df8a85d3b16dbc06853634d1098d c687108accd09dfaf228c709d724e223 +e0a94628d81060a58a0f337669d8c1b2 +cad9e2d07aef6c2b8b92cd45b967767e +e8ddedbe2017d4fab15bf667f3397a11 +8bcee916b182bef486e985dbb6e17b50 +4a74b15c0413af5e35a516703ca54b42 +4b64c56c0dc40d10f3b6c537ad4bfb60 +e825ed00c400d534f2b7bdf807ecebc1 +18bb2350caff92ca2789908e330648dc +8ba27181039a3eedbedc883abc001cbd +aae6f80f1cb9dae11fe88689212dcefa +3972f03c978efacbe7d543ce7c88c524 +a8f49ca925a805332b9dd904043523aa +d324f7030cf0e30e0642f7455ab2dc70 +1e7bd81c28d790254caa3bdf56ee3cfd +bb978a440ee887c80417067a3b06a291 diff --git a/scripts/mutation-test.sh b/scripts/mutation-test.sh index f55bacba7c7..02efea6c32f 100644 --- a/scripts/mutation-test.sh +++ b/scripts/mutation-test.sh @@ -2,6 +2,8 @@ set -eo pipefail +DISABLED_MUTATORS='branch/*' + # Only consider the following: # * go files in types or keeper packages # * ignore test and Protobuf files @@ -15,7 +17,7 @@ MUTATION_SOURCES=$(echo "$MUTATION_SOURCES" | grep './x/tokenfactory') # Collect multiple lines into a single line to be fed into go-mutesting MUTATION_SOURCES=$(echo $MUTATION_SOURCES | tr '\n' ' ') -OUTPUT=$(go run github.com/zimmski/go-mutesting/cmd/go-mutesting --blacklist=mutation.blacklist $MUTATION_SOURCES) +OUTPUT=$(go run github.com/zimmski/go-mutesting/cmd/go-mutesting --blacklist=mutation.blacklist --disable=$DISABLED_MUTATORS $MUTATION_SOURCES) # Fetch the final result output and the overall mutation testing score RESULT=$(echo "$OUTPUT" | grep 'The mutation score') From 3a254fd607d3097e0ebd0ade804d3689da7fa3b6 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Wed, 13 Jul 2022 14:58:02 -0400 Subject: [PATCH 8/9] updates --- Makefile | 3 +-- mutation.blacklist | 17 ----------------- scripts/mutation-test.sh | 2 +- 3 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 mutation.blacklist diff --git a/Makefile b/Makefile index 3aa72380dbc..c77488d3ff8 100644 --- a/Makefile +++ b/Makefile @@ -212,7 +212,6 @@ PACKAGES_UNIT=$(shell go list ./... | grep -E -v 'simapp|e2e') PACKAGES_E2E=$(shell go list ./... | grep '/e2e') PACKAGES_SIM=$(shell go list ./... | grep '/simapp') TEST_PACKAGES=./... -MUTATION_SOURCES=x/tokenfactory/types/genesis.go include sims.mk @@ -239,7 +238,7 @@ test-e2e-skip-upgrade: @VERSION=$(VERSION) OSMOSIS_E2E_SKIP_UPGRADE=True go test -mod=readonly -timeout=25m -v $(PACKAGES_E2E) test-mutation: - @go run github.com/zimmski/go-mutesting/cmd/go-mutesting --blacklist=mutation.blacklist $(MUTATION_SOURCES) + @sh scripts/mutation-test.sh benchmark: @go test -mod=readonly -bench=. $(PACKAGES_UNIT) diff --git a/mutation.blacklist b/mutation.blacklist deleted file mode 100644 index b3cb6960fb8..00000000000 --- a/mutation.blacklist +++ /dev/null @@ -1,17 +0,0 @@ -5e97df8a85d3b16dbc06853634d1098d -c687108accd09dfaf228c709d724e223 -e0a94628d81060a58a0f337669d8c1b2 -cad9e2d07aef6c2b8b92cd45b967767e -e8ddedbe2017d4fab15bf667f3397a11 -8bcee916b182bef486e985dbb6e17b50 -4a74b15c0413af5e35a516703ca54b42 -4b64c56c0dc40d10f3b6c537ad4bfb60 -e825ed00c400d534f2b7bdf807ecebc1 -18bb2350caff92ca2789908e330648dc -8ba27181039a3eedbedc883abc001cbd -aae6f80f1cb9dae11fe88689212dcefa -3972f03c978efacbe7d543ce7c88c524 -a8f49ca925a805332b9dd904043523aa -d324f7030cf0e30e0642f7455ab2dc70 -1e7bd81c28d790254caa3bdf56ee3cfd -bb978a440ee887c80417067a3b06a291 diff --git a/scripts/mutation-test.sh b/scripts/mutation-test.sh index 02efea6c32f..350aa0d9c7c 100644 --- a/scripts/mutation-test.sh +++ b/scripts/mutation-test.sh @@ -17,7 +17,7 @@ MUTATION_SOURCES=$(echo "$MUTATION_SOURCES" | grep './x/tokenfactory') # Collect multiple lines into a single line to be fed into go-mutesting MUTATION_SOURCES=$(echo $MUTATION_SOURCES | tr '\n' ' ') -OUTPUT=$(go run github.com/zimmski/go-mutesting/cmd/go-mutesting --blacklist=mutation.blacklist --disable=$DISABLED_MUTATORS $MUTATION_SOURCES) +OUTPUT=$(go run github.com/zimmski/go-mutesting/cmd/go-mutesting --disable=$DISABLED_MUTATORS $MUTATION_SOURCES) # Fetch the final result output and the overall mutation testing score RESULT=$(echo "$OUTPUT" | grep 'The mutation score') From e2ce2ae050762069144ac8a765cd6c214a36c4f2 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Wed, 13 Jul 2022 16:30:11 -0400 Subject: [PATCH 9/9] updates --- .vscode/settings.json | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 09b9c90d216..2c0a4eb2d63 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -23,25 +23,5 @@ "[proto3]": { "editor.defaultFormatter": "xaver.clang-format" }, - "clang-format.style": "{BasedOnStyle: Google, IndentWidth: 2, ColumnLimit: 120, AlignConsecutiveAssignments: true, AlignConsecutiveDeclarations: true, SpacesInSquareBrackets: true}", - "workbench.colorCustomizations": { - "activityBar.activeBackground": "#403778", - "activityBar.activeBorder": "#000000", - "activityBar.background": "#403778", - "activityBar.foreground": "#e7e7e7", - "activityBar.inactiveForeground": "#e7e7e799", - "activityBarBadge.background": "#000000", - "activityBarBadge.foreground": "#e7e7e7", - "sash.hoverBorder": "#403778", - "statusBar.background": "#2d2755", - "statusBar.foreground": "#e7e7e7", - "statusBarItem.hoverBackground": "#403778", - "statusBarItem.remoteBackground": "#2d2755", - "statusBarItem.remoteForeground": "#e7e7e7", - "titleBar.activeBackground": "#2d2755", - "titleBar.activeForeground": "#e7e7e7", - "titleBar.inactiveBackground": "#2d275599", - "titleBar.inactiveForeground": "#e7e7e799" - }, - "peacock.color": "#2d2755" + "clang-format.style": "{BasedOnStyle: Google, IndentWidth: 2, ColumnLimit: 120, AlignConsecutiveAssignments: true, AlignConsecutiveDeclarations: true, SpacesInSquareBrackets: true}" }