* grub-core/tests/lib/test.c (grub_test_run): Return non-zero on

test failures, so that a failing unit test correctly causes 'make
check' to fail.
This commit is contained in:
Colin Watson 2013-01-02 16:42:48 +00:00
parent 45d26abb40
commit c3fc8394a0
2 changed files with 15 additions and 5 deletions

View file

@ -1,3 +1,9 @@
2013-01-02 Colin Watson <cjwatson@ubuntu.com>
* grub-core/tests/lib/test.c (grub_test_run): Return non-zero on
test failures, so that a failing unit test correctly causes 'make
check' to fail.
2013-01-02 Colin Watson <cjwatson@ubuntu.com> 2013-01-02 Colin Watson <cjwatson@ubuntu.com>
Fix failing printf test. Fix failing printf test.

View file

@ -225,10 +225,14 @@ grub_test_run (grub_test_t test)
failure->line, (failure->message ? : "<no message>")); failure->line, (failure->message ? : "<no message>"));
if (!failure_list) if (!failure_list)
grub_printf ("%s: PASS\n", test->name); {
grub_printf ("%s: PASS\n", test->name);
return GRUB_ERR_NONE;
}
else else
grub_printf ("%s: FAIL\n", test->name); {
grub_printf ("%s: FAIL\n", test->name);
free_failures (); free_failures ();
return GRUB_ERR_NONE; return GRUB_ERR_TEST_FAILURE;
}
} }