Add possibility to add pre and post action hooks
authorMatthieu Patou <mat@matws.net>
Sun, 14 Nov 2010 07:49:19 +0000 (10:49 +0300)
committerMatthieu Patou <mat@matws.net>
Tue, 23 Nov 2010 18:10:11 +0000 (21:10 +0300)
build_test.fns

index bd42cabf3e2539b411368c66edb734e5ff282b78..9c409ee55f8fe3e24d7f9fa30558f1e509e20b88 100644 (file)
@@ -809,9 +809,25 @@ test_tree() {
                        mount
                        vmstat
 
+                       if [ "x$PREHOOKS" != "x" ]; then
+                               for hooks in $PREHOOKS; do
+                                       if [ "x$hooks" = "x$action" ]; then
+                                               ( prehook_$action )
+                                       fi
+                               done
+                       fi
+
                        ( action_$action )
                        action_status=$?
 
+                       if [ "x$POSTHOOKS" != "x" ]; then
+                               for hooks in $POSTHOOKS; do
+                                       if [ "x$hooks" = "x$action" ]; then
+                                               ( posthook_$action )
+                                       fi
+                               done
+                       fi
+
                        df .
 
                        if [ $action_status != 0 ]; then