- if ((*test->test) (flags) != 0)
- post_log ("FAILED\n");
- else
- post_log ("PASSED\n");
-
- if ((test_flags & POST_REBOOT) && !(flags & POST_MANUAL)) {
- post_bootmode_test_off ();
+ show_post_progress(i, POST_BEFORE, POST_FAILED);
+
+ if (test_flags & POST_PREREL) {
+ if ((*test->test)(flags) == 0) {
+ post_log_mark_succ(test->testid);
+ show_post_progress(i, POST_AFTER, POST_PASSED);
+ } else {
+ show_post_progress(i, POST_AFTER, POST_FAILED);
+ if (test_flags & POST_CRITICAL)
+ gd->flags |= GD_FLG_POSTFAIL;
+ if (test_flags & POST_STOP)
+ gd->flags |= GD_FLG_POSTSTOP;
+ }
+ } else {
+ if ((*test->test)(flags) != 0) {
+ post_log("FAILED\n");
+ bootstage_error(BOOTSTAGE_ID_POST_FAIL_R);
+ show_post_progress(i, POST_AFTER, POST_FAILED);
+ if (test_flags & POST_CRITICAL)
+ gd->flags |= GD_FLG_POSTFAIL;
+ if (test_flags & POST_STOP)
+ gd->flags |= GD_FLG_POSTSTOP;
+ } else {
+ post_log("PASSED\n");
+ show_post_progress(i, POST_AFTER, POST_PASSED);
+ }