summaryrefslogtreecommitdiffstats
path: root/post/post.c
diff options
context:
space:
mode:
authorYuri Tikhonov <yur@emcraft.com>2008-05-08 15:45:26 +0200
committerWolfgang Denk <wd@denx.de>2008-05-20 23:24:37 +0200
commit28a385065882d6cb6ac5f443311ff87887ed7c13 (patch)
tree7cab6291695142af19613a6b46280ae8f250674a /post/post.c
parenta525145d8110d15b4389d23c3ea8a78f22509d3f (diff)
downloadblackbird-obmc-uboot-28a385065882d6cb6ac5f443311ff87887ed7c13.tar.gz
blackbird-obmc-uboot-28a385065882d6cb6ac5f443311ff87887ed7c13.zip
POST: add POST_STOP flag
Don't run futher tests in case of a test fails that is marked as POST_STOP. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
Diffstat (limited to 'post/post.c')
-rw-r--r--post/post.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/post/post.c b/post/post.c
index c016c3ae40..d31829ba16 100644
--- a/post/post.c
+++ b/post/post.c
@@ -238,14 +238,20 @@ static int post_run_single (struct post_test *test,
if (test_flags & POST_PREREL) {
if ((*test->test) (flags) == 0)
post_log_mark_succ ( test->testid );
- else if (test_flags & POST_CRITICAL)
- gd->flags |= GD_FLG_POSTFAIL;
+ else {
+ 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");
show_boot_progress (-32);
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");
@@ -271,6 +277,9 @@ int post_run (char *name, int flags)
if (name == NULL) {
unsigned int last;
+ if (gd->flags & GD_FLG_POSTSTOP)
+ return 0;
+
if (post_bootmode_get (&last) & POST_POWERTEST) {
if (last & POST_FAIL_SAVE) {
last &= ~POST_FAIL_SAVE;
@@ -285,6 +294,8 @@ int post_run (char *name, int flags)
flags | POST_REBOOT, last);
for (i = last + 1; i < post_list_size; i++) {
+ if (gd->flags & GD_FLG_POSTSTOP)
+ break;
post_run_single (post_list + i,
test_flags[i],
flags, i);
@@ -292,6 +303,8 @@ int post_run (char *name, int flags)
}
} else {
for (i = 0; i < post_list_size; i++) {
+ if (gd->flags & GD_FLG_POSTSTOP)
+ break;
post_run_single (post_list + i,
test_flags[i],
flags, i);
OpenPOWER on IntegriCloud