xxx: testing: src/script/build-with-container.py

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2025-12-19 13:19:00 -05:00
parent c568a338d8
commit 01a71ace29

View File

@ -837,41 +837,41 @@ def bc_configure(ctx):
_run(cmd, check=True, ctx=ctx)
@Builder.set(Steps.BUILD)
def bc_build(ctx):
"""Execute a standard build."""
ctx.build.wants(Steps.NPM_CACHE, ctx)
ctx.build.wants(Steps.CONFIGURE, ctx)
def _build(ctx, target, *, extra_args=None):
cmd = _container_cmd(
ctx,
[
"bash",
"-c",
f"cd {ctx.cli.homedir} && source ./src/script/run-make.sh && build vstart",
(
f"cd {ctx.cli.homedir}"
" && source ./src/script/run-make.sh"
f" && build {target}"
),
],
extra_args=extra_args,
)
with ctx.user_command():
_run(cmd, check=True, ctx=ctx)
@Builder.set(Steps.BUILD)
def bc_build(ctx):
"""Execute a standard build."""
ctx.build.wants(Steps.NPM_CACHE, ctx)
ctx.build.wants(Steps.CONFIGURE, ctx)
_build(ctx, "vstart")
@Builder.set(Steps.BUILD_TESTS)
def bc_build_tests(ctx):
"""Build the tests."""
ctx.build.wants(Steps.NPM_CACHE, ctx)
ctx.build.wants(Steps.CONFIGURE, ctx)
cmd = _container_cmd(
ctx,
[
"bash",
"-c",
f"cd {ctx.cli.homedir} && source ./src/script/run-make.sh && build tests",
],
# for compatibility with earlier versions that baked this env var
# into the build images
extra_args=['-eFOR_MAKE_CHECK=1'],
)
with ctx.user_command():
_run(cmd, check=True, ctx=ctx)
# for compatibility with earlier versions that baked this env var
# into the build images
extra_args=['-eFOR_MAKE_CHECK=1']
_build(ctx, "tests", extra_args=extra_args)
@Builder.set(Steps.TESTS)