test: Add a flag for test which need console output
Some tests cannot run when the console is silent. An example is an expo test which checks text entry into a textline object. The console must be enabled so that the characters actually reach the putc_xy() in console_truetype, since in scene_textline_send_key(), the lineedit restores the vidconsole state, outputs the character and then saves the state again. If the character is never output, then the state won't be updated and the lineedit will be inconsistent. Rather than having individual tests handle this manually, add an explicit flag, in the hope that this quirk does not trip anyone else up. Put the flag next to the existing UTF_CONSOLE flag, since they are related. Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
@@ -410,7 +410,8 @@ static int test_pre_run(struct unit_test_state *uts, struct unit_test *test)
|
||||
gd_set_bloblist(NULL);
|
||||
}
|
||||
|
||||
ut_silence_console(uts);
|
||||
if (!(test->flags & UTF_NO_SILENT))
|
||||
ut_silence_console(uts);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user