re-enable some tests on Win64 since Nim 1.0.2 fixes https://github.com/nim-lang/Nim/issues/12186 (#513)

This commit is contained in:
Dustin Brody 2019-11-01 08:46:50 +00:00 committed by Mamy Ratsimbazafy
parent 753d5af447
commit 55dac3e36f
6 changed files with 30 additions and 47 deletions

View File

@ -48,10 +48,3 @@ proc parseTest*(path: string, Format: typedesc[Json or SSZ], T: typedesc): T =
stderr.write $Format & " load issue for file \"", path, "\"\n" stderr.write $Format & " load issue for file \"", path, "\"\n"
stderr.write err.formatMsg(path), "\n" stderr.write err.formatMsg(path), "\n"
quit 1 quit 1
template skipWin64*(body: untyped): untyped =
# Skip Win64 CI for https://github.com/status-im/nim-beacon-chain/issues/435
when defined(windows) and sizeof(int) == 8:
echo " [OSError] See #435. Ignoring in Windows 64-bit CI"
else:
body

View File

@ -49,10 +49,9 @@ const BLSDir = JsonTestsDir/"general"/"phase0"/"bls"
suite "Official - BLS tests": suite "Official - BLS tests":
test "Private to public key conversion": test "Private to public key conversion":
for file in walkDirRec(BLSDir/"priv_to_pub"): for file in walkDirRec(BLSDir/"priv_to_pub"):
skipWin64: let t = parseTest(file, Json, BLSPrivToPub)
let t = parseTest(file, Json, BLSPrivToPub) let implResult = t.input.pubkey()
let implResult = t.input.pubkey() check: implResult == t.output
check: implResult == t.output
test "Message signing": test "Message signing":
for file in walkDirRec(BLSDir/"sign_msg"): for file in walkDirRec(BLSDir/"sign_msg"):

View File

@ -61,20 +61,17 @@ template runTest(testName: string, identifier: untyped) =
`testImpl _ operations_deposits _ identifier`() `testImpl _ operations_deposits _ identifier`()
suite "Official - Operations - Deposits " & preset(): suite "Official - Operations - Deposits " & preset():
# TODO https://github.com/status-im/nim-beacon-chain/issues/435 runTest("new deposit under max", new_deposit_under_max)
# CI Win64 - "The parameter is incorrect" runTest("new deposit max", new_deposit_max)
skipWin64: runTest("new deposit over max", new_deposit_over_max)
runTest("new deposit under max", new_deposit_under_max) runTest("invalid signature new deposit", invalid_sig_new_deposit)
runTest("new deposit max", new_deposit_max) runTest("success top-up", success_top_up)
runTest("new deposit over max", new_deposit_over_max) runTest("invalid signature top-up", invalid_sig_top_up)
runTest("invalid signature new deposit", invalid_sig_new_deposit) runTest("invalid withdrawal credentials top-up", invalid_withdrawal_credentials_top_up)
runTest("success top-up", success_top_up)
runTest("invalid signature top-up", invalid_sig_top_up)
runTest("invalid withdrawal credentials top-up", invalid_withdrawal_credentials_top_up)
when false: when false:
# TODO - those should give an exception but do not # TODO - those should give an exception but do not
# probably because skipValidation is too strong # probably because skipValidation is too strong
# https://github.com/status-im/nim-beacon-chain/issues/407 # https://github.com/status-im/nim-beacon-chain/issues/407
runTest("wrong deposit for deposit count", wrong_deposit_for_deposit_count) runTest("wrong deposit for deposit count", wrong_deposit_for_deposit_count)
runTest("bad merkle proof", bad_merkle_proof) runTest("bad merkle proof", bad_merkle_proof)

View File

@ -64,16 +64,13 @@ template runTest(identifier: untyped) =
`testImpl_proposer_slashing _ identifier`() `testImpl_proposer_slashing _ identifier`()
suite "Official - Operations - Proposer slashing " & preset(): suite "Official - Operations - Proposer slashing " & preset():
# TODO https://github.com/status-im/nim-beacon-chain/issues/435 runTest(success)
# CI Win64 - "The parameter is incorrect" runTest(invalid_sig_1)
skipWin64: runTest(invalid_sig_2)
runTest(success) runTest(invalid_sig_1_and_2)
runTest(invalid_sig_1) runTest(invalid_proposer_index)
runTest(invalid_sig_2) runTest(epochs_are_different)
runTest(invalid_sig_1_and_2) runTest(headers_are_same)
runTest(invalid_proposer_index) runTest(proposer_is_not_activated)
runTest(epochs_are_different) runTest(proposer_is_slashed)
runTest(headers_are_same) runTest(proposer_is_withdrawn)
runTest(proposer_is_not_activated)
runTest(proposer_is_slashed)
runTest(proposer_is_withdrawn)

View File

@ -62,8 +62,7 @@ template runTest(identifier: untyped) =
`testImpl _ voluntary_exit _ identifier`() `testImpl _ voluntary_exit _ identifier`()
suite "Official - Operations - Voluntary exit " & preset(): suite "Official - Operations - Voluntary exit " & preset():
skipWin64: runTest(success)
runTest(success)
runTest(invalid_signature) runTest(invalid_signature)
runTest(success_exit_queue) runTest(success_exit_queue)
runTest(validator_exit_in_future) runTest(validator_exit_in_future)

View File

@ -82,8 +82,7 @@ suite "Official - Sanity - Blocks " & preset():
runValidTest("Skipped Slots", skipped_slots, 1) runValidTest("Skipped Slots", skipped_slots, 1)
runValidTest("Empty epoch transition", empty_epoch_transition, 1) runValidTest("Empty epoch transition", empty_epoch_transition, 1)
when const_preset=="minimal": when const_preset=="minimal":
skipWin64: runValidTest("Empty epoch transition not finalizing", empty_epoch_transition_not_finalizing, 1)
runValidTest("Empty epoch transition not finalizing", empty_epoch_transition_not_finalizing, 1)
runValidTest("Proposer slashing", proposer_slashing, 1) runValidTest("Proposer slashing", proposer_slashing, 1)
runValidTest("Attester slashing", attester_slashing, 1) runValidTest("Attester slashing", attester_slashing, 1)
@ -99,6 +98,5 @@ suite "Official - Sanity - Blocks " & preset():
runValidTest("Balance-driven status transitions", balance_driven_status_transitions, 1) runValidTest("Balance-driven status transitions", balance_driven_status_transitions, 1)
runValidTest("Historical batch", historical_batch, 1) runValidTest("Historical batch", historical_batch, 1)
when const_preset=="minimal": when const_preset=="minimal":
skipWin64: runValidTest("ETH1 data votes consensus", eth1_data_votes_consensus, 17)
runValidTest("ETH1 data votes consensus", eth1_data_votes_consensus, 17) runValidTest("ETH1 data votes no consensus", eth1_data_votes_no_consensus, 16)
runValidTest("ETH1 data votes no consensus", eth1_data_votes_no_consensus, 16)