utils/t/bits-testgen.py: Set the `SEED' from the command-line correctly.
[mLib] / utils / t / bits-testgen.py
index 810b519..05e4baf 100644 (file)
@@ -18,7 +18,9 @@ def arg(default = None):
   else: return default
 
 R.seed(None)
-SEED = int(arg(R.randrange(0, 1 << 32)))
+seed = arg()
+if seed is None: SEED = R.randrange(0, 1 << 32)
+else: SEED = int(seed, 0)
 R.seed(SEED)
 
 print '### Test vectors for 64-bit arithmetic macros'