data61 / cuda-fixnum

Extended-precision modular arithmetic library that targets CUDA.
Other
41 stars 28 forks source link

gentests.py doesn't generate tests by default? #71

Closed jkrauska closed 5 years ago

jkrauska commented 5 years ago

Requires test to be listed in argv?

Nothing generated

$ python3 gentests.py
Generating input arguments... done (0.00s). Created 13 arguments.
primes =  [3, 5, 7, 251, 241, 239]
Generating input arguments... done (0.00s). Created 21 arguments.
primes =  [3, 5, 7, 65521, 65519, 65497]
Generating input arguments... done (0.00s). Created 35 arguments.
primes =  [3, 5, 7, 4294967291, 4294967279, 4294967231]
Generating input arguments... done (0.00s). Created 61 arguments.
primes =  [3, 5, 7, 18446744073709551557, 18446744073709551533, 18446744073709551521]
Generating input arguments... done (0.00s). Created 111 arguments.
primes =  [3, 5, 7, 340282366920938463463374607431768211297, 340282366920938463463374607431768211283, 340282366920938463463374607431768211223]
Generating input arguments... done (0.00s). Created 209 arguments.
primes =  [3, 5, 7, 115792089237316195423570985008687907853269984665640564039457584007913129639747, 115792089237316195423570985008687907853269984665640564039457584007913129639579, 115792089237316195423570985008687907853269984665640564039457584007913129639501]
Generating input arguments... done (0.00s). Created 403 arguments.
primes =  [3, 5, 7, 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006083527, 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006083467, 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006083221]

only add_cy generated

$ python3 gentests.py  add_cy
Generating input arguments... done (0.00s). Created 13 arguments.
primes =  [3, 5, 7, 251, 241, 239]
Writing 169 tests into "add_cy_4"... done (0.00s).
Generating input arguments... done (0.00s). Created 21 arguments.
primes =  [3, 5, 7, 65521, 65519, 65497]
Writing 441 tests into "add_cy_8"... done (0.00s).
Generating input arguments... done (0.00s). Created 35 arguments.
primes =  [3, 5, 7, 4294967291, 4294967279, 4294967231]
Writing 1225 tests into "add_cy_16"... done (0.00s).
Generating input arguments... done (0.00s). Created 61 arguments.
primes =  [3, 5, 7, 18446744073709551557, 18446744073709551533, 18446744073709551521]
Writing 3721 tests into "add_cy_32"... done (0.00s).
Generating input arguments... done (0.00s). Created 111 arguments.
primes =  [3, 5, 7, 340282366920938463463374607431768211297, 340282366920938463463374607431768211283, 340282366920938463463374607431768211223]
Writing 12321 tests into "add_cy_64"... done (0.01s).
Generating input arguments... done (0.00s). Created 209 arguments.
primes =  [3, 5, 7, 115792089237316195423570985008687907853269984665640564039457584007913129639747, 115792089237316195423570985008687907853269984665640564039457584007913129639579, 115792089237316195423570985008687907853269984665640564039457584007913129639501]
Writing 43681 tests into "add_cy_128"... done (0.06s).
Generating input arguments... done (0.00s). Created 403 arguments.
primes =  [3, 5, 7, 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006083527, 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006083467, 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006083221]
Writing 162409 tests into "add_cy_256"... done (0.28s).
unzvfu commented 5 years ago

Right, without arguments it should probably just list the possible functions you can specify.

unzvfu commented 5 years ago

Fixed in 12225be33f51c54d6241e4fe7b45f12442a75c2c. Now generates all tests by default. Can limit to generating only selected tests by specifying them on the command line (this is only useful if you're fiddling with gentests.py itself, e.g. adding a new test function).