aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/gentest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libxl/gentest.py')
-rw-r--r--tools/libxl/gentest.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/libxl/gentest.py b/tools/libxl/gentest.py
index 5828cfd17a..47c7f0b4ae 100644
--- a/tools/libxl/gentest.py
+++ b/tools/libxl/gentest.py
@@ -21,10 +21,10 @@ if __name__ == '__main__':
sys.exit(1)
random.seed()
-
+
idl = sys.argv[1]
(_,types) = libxltypes.parse(idl)
-
+
impl = sys.argv[2]
f = open(impl, "w")
f.write("""
@@ -39,7 +39,7 @@ int main(int argc, char **argv)
f.write(" %s %s_val;\n" % (ty.typename, ty.typename))
f.write(" int rc;\n")
f.write("\n")
-
+
for ty in [t for t in types if isinstance(t,libxltypes.Enumeration)]:
f.write(" printf(\"%s -- to string:\\n\");\n" % (ty.typename))
for v in ty.values:
@@ -53,7 +53,7 @@ int main(int argc, char **argv)
f.write(" %s_val = -1;\n" % (ty.typename))
f.write(" rc = %s_from_string(\"%s\", &%s_val);\n" %\
(ty.typename, n, ty.typename))
-
+
f.write(" printf(\"\\t%s = \\\"%%s\\\" = %%d (rc %%d)\\n\", \"%s\", %s_val, rc);\n" %\
(v, n, ty.typename))
f.write("\n")