libxl: allow specification of testidl random seed.
authorIan Campbell <ian.campbell@citrix.com>
Thu, 1 Mar 2012 12:26:13 +0000 (12:26 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 1 Mar 2012 12:26:13 +0000 (12:26 +0000)
Useful if you are interested in before/after results of changing the IDL or
generator.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/gentest.py

index 410b9b76de52e707c836fb23ddefaccd64919797..ef0cecf0fe5a19a45b8ec10af8340eef839ca6c6 100644 (file)
@@ -1,5 +1,6 @@
 #!/usr/bin/python
 
+import os
 import sys
 import re
 import random
@@ -72,7 +73,7 @@ if __name__ == '__main__':
         print >>sys.stderr, "Usage: gentest.py <idl> <implementation>"
         sys.exit(1)
 
-    random.seed()
+    random.seed(os.getenv('LIBXL_TESTIDL_SEED'))
 
     (builtins,types) = idl.parse(sys.argv[1])