summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-06-30 15:12:48 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-06-30 18:07:29 +0100
commitcf42e4d3879da45171e58dbcda25d6671aeb8f3e (patch)
tree5e1e2f31cff125877bcf7ca49587dfcbc8307cdb
parentd4ecaee4d354147e5839ea71c65ea74092793a42 (diff)
downloadlibguestfs-cf42e4d3879da45171e58dbcda25d6671aeb8f3e.tar.gz
libguestfs-cf42e4d3879da45171e58dbcda25d6671aeb8f3e.tar.xz
libguestfs-cf42e4d3879da45171e58dbcda25d6671aeb8f3e.zip
Clean up the output of the C API test code.
Set output mode to unbuffered so that we see ordinary output messages and errors at the same time. Align "skipped" messages.
-rwxr-xr-xsrc/generator.ml10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/generator.ml b/src/generator.ml
index 960973da..242d2920 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -4278,6 +4278,8 @@ int main (int argc, char *argv[])
int fd;
int nr_tests, test_num = 0;
+ setbuf (stdout, NULL);
+
no_test_warnings ();
g = guestfs_create ();
@@ -4459,7 +4461,7 @@ static int %s_skip (void)
static int %s (void)
{
if (%s_skip ()) {
- printf (\"%%s skipped (reason: environment variable set)\\n\", \"%s\");
+ printf (\" %%s skipped (reason: environment variable set)\\n\", \"%s\");
return 0;
}
@@ -4467,17 +4469,17 @@ static int %s (void)
(match prereq with
| Disabled ->
- pr " printf (\"%%s skipped (reason: test disabled in generator)\\n\", \"%s\");\n" test_name
+ pr " printf (\" %%s skipped (reason: test disabled in generator)\\n\", \"%s\");\n" test_name
| If _ ->
pr " if (! %s_prereq ()) {\n" test_name;
- pr " printf (\"%%s skipped (reason: test prerequisite)\\n\", \"%s\");\n" test_name;
+ pr " printf (\" %%s skipped (reason: test prerequisite)\\n\", \"%s\");\n" test_name;
pr " return 0;\n";
pr " }\n";
pr "\n";
generate_one_test_body name i test_name init test;
| Unless _ ->
pr " if (%s_prereq ()) {\n" test_name;
- pr " printf (\"%%s skipped (reason: test prerequisite)\\n\", \"%s\");\n" test_name;
+ pr " printf (\" %%s skipped (reason: test prerequisite)\\n\", \"%s\");\n" test_name;
pr " return 0;\n";
pr " }\n";
pr "\n";