* [FEATURE] Make package tests possible between build and install.

(merge from trunk)
This commit is contained in:
Faik Uygur
2007-03-26 09:06:23 +00:00
parent c3f444880b
commit 7f69e6eb99
3 changed files with 21 additions and 0 deletions
+16
View File
@@ -198,6 +198,8 @@ class Builder:
self.run_setup_action()
self.run_build_action()
if ctx.get_option('debug') and not ctx.get_option('ignore_check'):
self.run_check_action()
self.run_install_action()
# after all, we are ready to build/prepare the packages
@@ -324,6 +326,10 @@ class Builder:
self.run_action_function(ctx.const.build_func)
self.set_state("buildaction")
def run_check_action(self):
ctx.ui.action(_("Testing package..."))
self.run_action_function(ctx.const.check_func)
def run_install_action(self):
ctx.ui.action(_("Installing..."))
@@ -937,6 +943,12 @@ def __buildState_buildaction(pb, last):
__buildState_setupaction(pb, last)
pb.run_build_action()
def __buildState_checkaction(pb, last):
if order[last] < order["buildaction"]:
__buildState_buildaction(pb, last)
pb.run_check_action()
def __buildState_installaction(pb, last):
if order[last] < order["buildaction"]:
@@ -979,6 +991,10 @@ def build_until(pspec, state):
__buildState_buildaction(pb, last)
return
if state == "check":
__buildState_checkaction(pb, last)
return
if state == "install":
__buildState_installaction(pb, last)
return
+4
View File
@@ -445,6 +445,8 @@ to be downloaded from a repository containing sources.
help=_("Bypass errors from ActionsAPI"))
group.add_option("--ignore-safety", action="store_true",
default=False, help=_("Bypass safety switch"))
group.add_option("--ignore-check", action="store_true",
default=False, help=_("Bypass testing step"))
group.add_option("--create-static", action="store_true",
default=False, help=_("Create a static package with ar files"))
group.add_option("--no-install", action="store_true",
@@ -462,6 +464,8 @@ to be downloaded from a repository containing sources.
const="setup", help=_("Break build after running configure step"))
group.add_option("--build", dest="until", action="store_const",
const="build", help=_("Break build after running compile step"))
group.add_option("--check", dest="until", action="store_const",
const="check", help=_("Break build after running check step"))
group.add_option("--install", dest="until", action="store_const",
const="install", help=_("Break build after running install step"))
group.add_option("--package", dest="until", action="store_const",
+1
View File
@@ -87,6 +87,7 @@ class Constants:
# functions in actions_file
self.__c.setup_func = "setup"
self.__c.build_func = "build"
self.__c.check_func = "check"
self.__c.install_func = "install"
# file types