From ea38d7b5b8441376e6c1b170cf48d6939e6a2ef4 Mon Sep 17 00:00:00 2001 From: cheatfate Date: Fri, 28 Sep 2018 03:43:58 +0300 Subject: [PATCH] Move testing to `release` mode only. Reduce number of test vectors. --- bncurve.nimble | 9 --------- tests/tvectors.nim | 7 +++---- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/bncurve.nimble b/bncurve.nimble index c17cfe2..ab5c38e 100644 --- a/bncurve.nimble +++ b/bncurve.nimble @@ -11,17 +11,8 @@ requires "nim > 0.18.0" requires "https://github.com/cheatfate/nimcrypto" task test, "Run all tests": - exec "nim c -f -r tests/tarith" exec "nim c -f -r -d:release tests/tarith" - - exec "nim c -f -r tests/tfields" exec "nim c -f -r -d:release tests/tfields" - - exec "nim c -f -r tests/tgroups" exec "nim c -f -r -d:release tests/tgroups" - - exec "nim c -f -r tests/tpairing" exec "nim c -f -r -d:release tests/tpairing" - - exec "nim c -f -r tests/tvectors" exec "nim c -f -r -d:release tests/tvectors" diff --git a/tests/tvectors.nim b/tests/tvectors.nim index e30de9a..8a8aabb 100644 --- a/tests/tvectors.nim +++ b/tests/tvectors.nim @@ -2,10 +2,9 @@ import unittest import nimcrypto/utils import ../bncurve/[fields, groups] -when not defined(release): - const TestsCount = 10 -else: - const TestsCount = 10000 +# Total size of test vectors is 10_000, but CI is too slow to test it +# in reasonable time, so we will test only 1000 vectors. +const TestsCount = 1000 const FRExpected = [