Skip to content

Commit

Permalink
Makefile,tests: env vars s/PARITY/OPENETHEREUM/
Browse files Browse the repository at this point in the history
'Parity' has changed management and has
been renamed to openethereum.

Signed-off-by: meows <b5c6@protonmail.com>
  • Loading branch information
meowsbits committed Jun 1, 2020
1 parent 5384558 commit 91a45ec
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ test-coregeth: test-coregeth-features test-coregeth-chainspecs ## Runs all tests
test-coregeth-features: test-coregeth-features-parity test-coregeth-features-coregeth test-coregeth-features-multigethv0 ## Runs tests specific to multi-geth using Fork/Feature configs.

test-coregeth-features-parity:
@echo "Testing fork/feature/datatype implementation; equivalence - PARITY."
env COREGETH_TESTS_CHAINCONFIG_FEATURE_EQUIVALENCE_PARITY=on go test -count=1 ./tests
@echo "Testing fork/feature/datatype implementation; equivalence - OPENETHEREUM."
env COREGETH_TESTS_CHAINCONFIG_FEATURE_EQUIVALENCE_OPENETHEREUM=on go test -count=1 ./tests

test-coregeth-features-coregeth:
@echo "Testing fork/feature/datatype implementation; equivalence - MULTIGETH."
Expand All @@ -55,19 +55,19 @@ test-coregeth-features-multigethv0:

test-coregeth-chainspecs: ## Run tests specific to multi-geth using chainspec file configs.
@echo "Testing Parity JSON chainspec equivalence."
env COREGETH_TESTS_CHAINCONFIG_PARITY_SPECS=on go test -count=1 ./tests
env COREGETH_TESTS_CHAINCONFIG_OPENETHEREUM_SPECS=on go test -count=1 ./tests

tests-generate: tests-generate-state tests-generate-difficulty ## Generate all tests.

tests-generate-state: ## Generate state tests.
@echo "Generating state tests."
env COREGETH_TESTS_CHAINCONFIG_PARITY_SPECS=on \
env COREGETH_TESTS_CHAINCONFIG_OPENETHEREUM_SPECS=on \
env COREGETH_TESTS_GENERATE_STATE_TESTS=on \
go run build/ci.go test -v ./tests -run TestGenState

tests-generate-difficulty: ## Generate difficulty tests.
@echo "Generating difficulty tests."
env COREGETH_TESTS_CHAINCONFIG_PARITY_SPECS=on \
env COREGETH_TESTS_CHAINCONFIG_OPENETHEREUM_SPECS=on \
env COREGETH_TESTS_GENERATE_DIFFICULTY_TESTS=on \
go run build/ci.go test -v ./tests -run TestDifficultyGen

Expand Down
2 changes: 1 addition & 1 deletion tests/difficulty_mgen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestDifficultyGen(t *testing.T) {
if !generateTests {
t.Skip()
}
if os.Getenv(CG_CHAINCONFIG_CHAINSPECS_PARITY_KEY) == "" {
if os.Getenv(CG_CHAINCONFIG_CHAINSPECS_OPENETHEREUM_KEY) == "" {
t.Fatal("Must run test generation with JSON file chain configurations.")
}

Expand Down
8 changes: 4 additions & 4 deletions tests/init_mgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ var (

// Feature Equivalence tests use convert.Convert to
// run tests using alternating ChainConfig data type implementations.
CG_CHAINCONFIG_FEATURE_EQ_COREGETH_KEY = "COREGETH_TESTS_CHAINCONFIG_FEATURE_EQUIVALENCE_COREGETH"
CG_CHAINCONFIG_FEATURE_EQ_MULTIGETHV0_KEY = "COREGETH_TESTS_CHAINCONFIG_FEATURE_EQUIVALENCE_MULTIGETHV0"
CG_CHAINCONFIG_FEATURE_EQ_PARITY_KEY = "COREGETH_TESTS_CHAINCONFIG_FEATURE_EQUIVALENCE_PARITY"
CG_CHAINCONFIG_FEATURE_EQ_COREGETH_KEY = "COREGETH_TESTS_CHAINCONFIG_FEATURE_EQUIVALENCE_COREGETH"
CG_CHAINCONFIG_FEATURE_EQ_MULTIGETHV0_KEY = "COREGETH_TESTS_CHAINCONFIG_FEATURE_EQUIVALENCE_MULTIGETHV0"
CG_CHAINCONFIG_FEATURE_EQ_OPENETHEREUM_KEY = "COREGETH_TESTS_CHAINCONFIG_FEATURE_EQUIVALENCE_OPENETHEREUM"

// Parity specs tests use Parity JSON config data (in params/parity.json.d/)
// when applicable as equivalent config implementations for the default Go data type
// configs.
CG_CHAINCONFIG_CHAINSPECS_PARITY_KEY = "COREGETH_TESTS_CHAINCONFIG_PARITY_SPECS"
CG_CHAINCONFIG_CHAINSPECS_OPENETHEREUM_KEY = "COREGETH_TESTS_CHAINCONFIG_OPENETHEREUM_SPECS"
)

type chainspecRefsT map[string]chainspecRef
Expand Down
4 changes: 2 additions & 2 deletions tests/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func init() {
difficultyChainConfigurations[k] = pspec
}

} else if os.Getenv(CG_CHAINCONFIG_FEATURE_EQ_PARITY_KEY) != "" {
} else if os.Getenv(CG_CHAINCONFIG_FEATURE_EQ_OPENETHEREUM_KEY) != "" {
log.Println("converting to Parity data type.")

for i, config := range Forks {
Expand All @@ -169,7 +169,7 @@ func init() {
difficultyChainConfigurations[k] = pspec
}

} else if os.Getenv(CG_CHAINCONFIG_CHAINSPECS_PARITY_KEY) != "" {
} else if os.Getenv(CG_CHAINCONFIG_CHAINSPECS_OPENETHEREUM_KEY) != "" {
log.Println("Setting chain configurations from Parity chainspecs")

for k, v := range MapForkNameChainspecFileState {
Expand Down
2 changes: 1 addition & 1 deletion tests/state_mgen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestGenState(t *testing.T) {
if os.Getenv(CG_GENERATE_STATE_TESTS_KEY) == "" {
t.Skip()
}
if os.Getenv(CG_CHAINCONFIG_CHAINSPECS_PARITY_KEY) == "" {
if os.Getenv(CG_CHAINCONFIG_CHAINSPECS_OPENETHEREUM_KEY) == "" {
t.Fatal("Must use chainspec files for fork configurations.")
}

Expand Down

0 comments on commit 91a45ec

Please sign in to comment.