Move testing to `release` mode only.

Reduce number of test vectors.
This commit is contained in:
cheatfate 2018-09-28 03:43:58 +03:00
parent 06071e5ad8
commit ea38d7b5b8
2 changed files with 3 additions and 13 deletions

View File

@ -11,17 +11,8 @@ requires "nim > 0.18.0"
requires "https://github.com/cheatfate/nimcrypto" requires "https://github.com/cheatfate/nimcrypto"
task test, "Run all tests": 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 -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 -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 -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 -d:release tests/tpairing"
exec "nim c -f -r tests/tvectors"
exec "nim c -f -r -d:release tests/tvectors" exec "nim c -f -r -d:release tests/tvectors"

View File

@ -2,10 +2,9 @@ import unittest
import nimcrypto/utils import nimcrypto/utils
import ../bncurve/[fields, groups] import ../bncurve/[fields, groups]
when not defined(release): # Total size of test vectors is 10_000, but CI is too slow to test it
const TestsCount = 10 # in reasonable time, so we will test only 1000 vectors.
else: const TestsCount = 1000
const TestsCount = 10000
const const
FRExpected = [ FRExpected = [