From 88ec9fd4bec043ef736b63844d4ddaf04768c7c2 Mon Sep 17 00:00:00 2001 From: Mamy Ratsimbazafy Date: Thu, 12 Sep 2019 07:33:07 -0400 Subject: [PATCH] "industrialize" skipping win64 CI (#441) * "industrialize" skipping win64 CI - reintroduce actually working tests - skip BLS priv_to_pub (tested in blscurve + broken by #440 and #435) * missing echo * try/except OSError doesn't seem to work in unittest so plain ignore + move x64 first for fail fast * ignore transfers completely in WIn64 --- .appveyor.yml | 2 +- tests/official/fixtures_utils.nim | 7 +++++++ tests/official/test_fixture_bls.nim | 7 ++++--- tests/official/test_fixture_operations_deposits.nim | 4 +--- .../test_fixture_operations_proposer_slashings.nim | 4 +--- tests/official/test_fixture_operations_transfer.nim | 8 +++----- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 3d15a1df0..134b1cd84 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -21,8 +21,8 @@ matrix: fast_finish: false platform: - - x86 - x64 + - x86 install: - git submodule update --init --recursive diff --git a/tests/official/fixtures_utils.nim b/tests/official/fixtures_utils.nim index 522dacdf7..55633e23a 100644 --- a/tests/official/fixtures_utils.nim +++ b/tests/official/fixtures_utils.nim @@ -48,3 +48,10 @@ 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 diff --git a/tests/official/test_fixture_bls.nim b/tests/official/test_fixture_bls.nim index 152023dbb..4efb661d9 100644 --- a/tests/official/test_fixture_bls.nim +++ b/tests/official/test_fixture_bls.nim @@ -54,9 +54,10 @@ const BLSDir = JsonTestsDir/"general"/"phase0"/"bls" suite "Official - BLS tests": test "Private to public key conversion": for file in walkDirRec(BLSDir/"priv_to_pub"): - let t = parseTest(file, Json, BLSPrivToPub) - let implResult = t.input.pubkey() - check: implResult == t.output + skipWin64: + 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"): diff --git a/tests/official/test_fixture_operations_deposits.nim b/tests/official/test_fixture_operations_deposits.nim index 3de41655f..31272c637 100644 --- a/tests/official/test_fixture_operations_deposits.nim +++ b/tests/official/test_fixture_operations_deposits.nim @@ -63,7 +63,7 @@ template runTest(testName: string, identifier: untyped) = suite "Official - Operations - Deposits " & preset(): # TODO https://github.com/status-im/nim-beacon-chain/issues/435 # CI Win64 - "The parameter is incorrect" - when not (defined(windows) and sizeof(int) == 8): + 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) @@ -78,5 +78,3 @@ suite "Official - Operations - Deposits " & preset(): # 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) - else: - echo " Skipped for Windows 64-bit CI" diff --git a/tests/official/test_fixture_operations_proposer_slashings.nim b/tests/official/test_fixture_operations_proposer_slashings.nim index 09aa6ff63..9fd84bbe7 100644 --- a/tests/official/test_fixture_operations_proposer_slashings.nim +++ b/tests/official/test_fixture_operations_proposer_slashings.nim @@ -66,7 +66,7 @@ template runTest(identifier: untyped) = suite "Official - Operations - Proposer slashing " & preset(): # TODO https://github.com/status-im/nim-beacon-chain/issues/435 # CI Win64 - "The parameter is incorrect" - when not (defined(windows) and sizeof(int) == 8): + skipWin64: runTest(success) runTest(invalid_sig_1) runTest(invalid_sig_2) @@ -77,5 +77,3 @@ suite "Official - Operations - Proposer slashing " & preset(): runTest(proposer_is_not_activated) runTest(proposer_is_slashed) runTest(proposer_is_withdrawn) - else: - echo " Skipped for Windows 64-bit CI" diff --git a/tests/official/test_fixture_operations_transfer.nim b/tests/official/test_fixture_operations_transfer.nim index 8dec2b293..af86d5139 100644 --- a/tests/official/test_fixture_operations_transfer.nim +++ b/tests/official/test_fixture_operations_transfer.nim @@ -66,8 +66,8 @@ template runTest(identifier: untyped) = suite "Official - Operations - Transfers " & preset(): # TODO https://github.com/status-im/nim-beacon-chain/issues/435 # CI Win64 - "The parameter is incorrect" - when not (defined(windows) and sizeof(int) == 8): - when const_preset == "minimal": + when const_preset == "minimal": + skipWin64: runTest(success_non_activated) runTest(success_withdrawable) runTest(success_active_above_max_effective) @@ -91,7 +91,5 @@ suite "Official - Operations - Transfers " & preset(): runTest(non_existent_sender) runTest(non_existent_recipient) runTest(invalid_pubkey) - else: - echo " No transfer tests in mainnet preset" else: - echo " Skipped for Windows 64-bit CI" + echo " No transfer tests in mainnet preset"