* [FEATURE] Make package tests possible between build and install.
(merge from trunk)
This commit is contained in:
@@ -198,6 +198,8 @@ class Builder:
|
|||||||
|
|
||||||
self.run_setup_action()
|
self.run_setup_action()
|
||||||
self.run_build_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()
|
self.run_install_action()
|
||||||
|
|
||||||
# after all, we are ready to build/prepare the packages
|
# 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.run_action_function(ctx.const.build_func)
|
||||||
self.set_state("buildaction")
|
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):
|
def run_install_action(self):
|
||||||
ctx.ui.action(_("Installing..."))
|
ctx.ui.action(_("Installing..."))
|
||||||
|
|
||||||
@@ -937,6 +943,12 @@ def __buildState_buildaction(pb, last):
|
|||||||
__buildState_setupaction(pb, last)
|
__buildState_setupaction(pb, last)
|
||||||
pb.run_build_action()
|
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):
|
def __buildState_installaction(pb, last):
|
||||||
|
|
||||||
if order[last] < order["buildaction"]:
|
if order[last] < order["buildaction"]:
|
||||||
@@ -979,6 +991,10 @@ def build_until(pspec, state):
|
|||||||
__buildState_buildaction(pb, last)
|
__buildState_buildaction(pb, last)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if state == "check":
|
||||||
|
__buildState_checkaction(pb, last)
|
||||||
|
return
|
||||||
|
|
||||||
if state == "install":
|
if state == "install":
|
||||||
__buildState_installaction(pb, last)
|
__buildState_installaction(pb, last)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -445,6 +445,8 @@ to be downloaded from a repository containing sources.
|
|||||||
help=_("Bypass errors from ActionsAPI"))
|
help=_("Bypass errors from ActionsAPI"))
|
||||||
group.add_option("--ignore-safety", action="store_true",
|
group.add_option("--ignore-safety", action="store_true",
|
||||||
default=False, help=_("Bypass safety switch"))
|
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",
|
group.add_option("--create-static", action="store_true",
|
||||||
default=False, help=_("Create a static package with ar files"))
|
default=False, help=_("Create a static package with ar files"))
|
||||||
group.add_option("--no-install", action="store_true",
|
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"))
|
const="setup", help=_("Break build after running configure step"))
|
||||||
group.add_option("--build", dest="until", action="store_const",
|
group.add_option("--build", dest="until", action="store_const",
|
||||||
const="build", help=_("Break build after running compile step"))
|
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",
|
group.add_option("--install", dest="until", action="store_const",
|
||||||
const="install", help=_("Break build after running install step"))
|
const="install", help=_("Break build after running install step"))
|
||||||
group.add_option("--package", dest="until", action="store_const",
|
group.add_option("--package", dest="until", action="store_const",
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ class Constants:
|
|||||||
# functions in actions_file
|
# functions in actions_file
|
||||||
self.__c.setup_func = "setup"
|
self.__c.setup_func = "setup"
|
||||||
self.__c.build_func = "build"
|
self.__c.build_func = "build"
|
||||||
|
self.__c.check_func = "check"
|
||||||
self.__c.install_func = "install"
|
self.__c.install_func = "install"
|
||||||
|
|
||||||
# file types
|
# file types
|
||||||
|
|||||||
Reference in New Issue
Block a user