First automated video test (running videotest and comparing results)
This commit is contained in:
parent
cd0f6eec7b
commit
5036166022
16 changed files with 1150 additions and 97 deletions
|
@ -30,9 +30,34 @@ grub_functional_test (grub_extcmd_context_t ctxt __attribute__ ((unused)),
|
|||
char **args __attribute__ ((unused)))
|
||||
{
|
||||
grub_test_t test;
|
||||
int ok = 1;
|
||||
|
||||
FOR_LIST_ELEMENTS (test, grub_test_list)
|
||||
grub_test_run (test);
|
||||
ok = ok && !grub_test_run (test);
|
||||
if (ok)
|
||||
grub_printf ("ALL TESTS PASSED\n");
|
||||
else
|
||||
grub_printf ("TEST FAILURE\n");
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_functional_all_tests (grub_extcmd_context_t ctxt __attribute__ ((unused)),
|
||||
int argc __attribute__ ((unused)),
|
||||
char **args __attribute__ ((unused)))
|
||||
{
|
||||
grub_test_t test;
|
||||
int ok = 1;
|
||||
|
||||
grub_dl_load ("exfctest");
|
||||
grub_dl_load ("videotest_checksum");
|
||||
|
||||
FOR_LIST_ELEMENTS (test, grub_test_list)
|
||||
ok = ok && !grub_test_run (test);
|
||||
if (ok)
|
||||
grub_printf ("ALL TESTS PASSED\n");
|
||||
else
|
||||
grub_printf ("TEST FAILURE\n");
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
|
@ -41,6 +66,8 @@ static grub_extcmd_t cmd;
|
|||
GRUB_MOD_INIT (functional_test)
|
||||
{
|
||||
cmd = grub_register_extcmd ("functional_test", grub_functional_test, 0, 0,
|
||||
"Run all loaded functional tests.", 0);
|
||||
cmd = grub_register_extcmd ("all_functional_test", grub_functional_all_tests, 0, 0,
|
||||
"Run all functional tests.", 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue