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 err.formatMsg(path), "\n"
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":
test "Private to public key conversion":
for file in walkDirRec(BLSDir/"priv_to_pub"):
skipWin64:
let t = parseTest(file, Json, BLSPrivToPub)
let implResult = t.input.pubkey()
check: implResult == t.output
let t = parseTest(file, Json, BLSPrivToPub)
let implResult = t.input.pubkey()
check: implResult == t.output
test "Message signing":
for file in walkDirRec(BLSDir/"sign_msg"):

View File

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

View File

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

View File

@ -82,8 +82,7 @@ suite "Official - Sanity - Blocks " & preset():
runValidTest("Skipped Slots", skipped_slots, 1)
runValidTest("Empty epoch transition", empty_epoch_transition, 1)
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("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("Historical batch", historical_batch, 1)
when const_preset=="minimal":
skipWin64:
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 consensus", eth1_data_votes_consensus, 17)
runValidTest("ETH1 data votes no consensus", eth1_data_votes_no_consensus, 16)