diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-06-30 15:12:48 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-06-30 18:07:29 +0100 |
commit | cf42e4d3879da45171e58dbcda25d6671aeb8f3e (patch) | |
tree | 5e1e2f31cff125877bcf7ca49587dfcbc8307cdb | |
parent | d4ecaee4d354147e5839ea71c65ea74092793a42 (diff) | |
download | libguestfs-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-x | src/generator.ml | 10 |
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"; |