xbps-src: add make_check_pre
$make_check_pre can be used for wrapper commands like xvfb-run or dbus-run-session which are common ways to make tests work. This way many templates can avoid defining their own do_check function.
This commit is contained in:
parent
f991e72bf1
commit
71b11fdbdb
|
@ -600,6 +600,9 @@ path of the Python wheel produced by the build phase that will be installed; whe
|
||||||
`python-pep517` build style will look for a wheel matching the package name and version in the
|
`python-pep517` build style will look for a wheel matching the package name and version in the
|
||||||
current directory with respect to the install.
|
current directory with respect to the install.
|
||||||
|
|
||||||
|
- `make_check_pre` The expression in front of `${make_cmd}`. This can be used for wrapper commands
|
||||||
|
or for setting environment variables for the check command. By default empty.
|
||||||
|
|
||||||
- `patch_args` The arguments to be passed in to the `patch(1)` command when applying
|
- `patch_args` The arguments to be passed in to the `patch(1)` command when applying
|
||||||
patches to the package sources during `do_patch()`. Patches are stored in
|
patches to the package sources during `do_patch()`. Patches are stored in
|
||||||
`srcpkgs/<pkgname>/patches` and must be in `-p1` format. By default set to `-Np1`.
|
`srcpkgs/<pkgname>/patches` and must be in `-p1` format. By default set to `-Np1`.
|
||||||
|
|
|
@ -11,7 +11,7 @@ do_build() {
|
||||||
do_check() {
|
do_check() {
|
||||||
: ${make_cmd:=cargo}
|
: ${make_cmd:=cargo}
|
||||||
|
|
||||||
${make_cmd} test --release --target ${RUST_TARGET} ${configure_args} \
|
${make_check_pre} ${make_cmd} test --release --target ${RUST_TARGET} ${configure_args} \
|
||||||
${make_check_args}
|
${make_check_args}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ do_check() {
|
||||||
|
|
||||||
: ${make_check_target:=test}
|
: ${make_check_target:=test}
|
||||||
|
|
||||||
${make_cmd} ${make_check_args} ${make_check_target}
|
${make_check_pre} ${make_cmd} ${make_check_args} ${make_check_target}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
|
|
@ -29,7 +29,7 @@ do_check() {
|
||||||
: ${make_cmd:=make}
|
: ${make_cmd:=make}
|
||||||
: ${make_check_target:=check}
|
: ${make_check_target:=check}
|
||||||
|
|
||||||
${make_cmd} ${make_check_args} ${make_check_target}
|
${make_check_pre} ${make_cmd} ${make_check_args} ${make_check_target}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
|
|
@ -30,7 +30,7 @@ do_check() {
|
||||||
: ${make_cmd:=make}
|
: ${make_cmd:=make}
|
||||||
: ${make_check_target:=check}
|
: ${make_check_target:=check}
|
||||||
|
|
||||||
${make_cmd} ${make_check_args} ${make_check_target}
|
${make_check_pre} ${make_cmd} ${make_check_args} ${make_check_target}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
|
|
@ -30,7 +30,7 @@ do_check() {
|
||||||
: ${make_cmd:=make}
|
: ${make_cmd:=make}
|
||||||
: ${make_check_target:=check}
|
: ${make_check_target:=check}
|
||||||
|
|
||||||
${make_cmd} ${make_check_args} ${make_check_target}
|
${make_check_pre} ${make_cmd} ${make_check_args} ${make_check_target}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
|
|
@ -138,7 +138,7 @@ do_check() {
|
||||||
: ${make_check_target:=test}
|
: ${make_check_target:=test}
|
||||||
: ${meson_builddir:=build}
|
: ${meson_builddir:=build}
|
||||||
|
|
||||||
${make_cmd} -C ${meson_builddir} ${makejobs} ${make_check_args} ${make_check_target}
|
${make_check_pre} ${make_cmd} -C ${meson_builddir} ${makejobs} ${make_check_args} ${make_check_target}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
|
|
@ -41,7 +41,7 @@ do_check() {
|
||||||
if [ ! -x ./Build ]; then
|
if [ ! -x ./Build ]; then
|
||||||
msg_error "$pkgver: cannot find ./Build script!\n"
|
msg_error "$pkgver: cannot find ./Build script!\n"
|
||||||
fi
|
fi
|
||||||
./Build test
|
${make_check_pre} ./Build test
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
|
|
@ -79,7 +79,7 @@ do_check() {
|
||||||
: ${make_cmd:=make}
|
: ${make_cmd:=make}
|
||||||
: ${make_check_target:=test}
|
: ${make_check_target:=test}
|
||||||
|
|
||||||
${make_cmd} ${make_check_args} ${make_check_target}
|
${make_check_pre} ${make_cmd} ${make_check_args} ${make_check_target}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
|
|
@ -49,7 +49,7 @@ do_check() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
python${pyver} setup.py ${make_check_target:-test} ${make_check_args}
|
${make_check_pre} python${pyver} setup.py ${make_check_target:-test} ${make_check_args}
|
||||||
rm build
|
rm build
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ do_build() {
|
||||||
|
|
||||||
do_check() {
|
do_check() {
|
||||||
if python3 -c 'import pytest' >/dev/null 2>&1; then
|
if python3 -c 'import pytest' >/dev/null 2>&1; then
|
||||||
PYTHONPATH="$(cd build/lib* && pwd)" \
|
${make_check_pre} PYTHONPATH="$(cd build/lib* && pwd)" \
|
||||||
python3 -m pytest ${make_check_args} ${make_check_target}
|
python3 -m pytest ${make_check_args} ${make_check_target}
|
||||||
else
|
else
|
||||||
# Fall back to deprecated setup.py test orchestration without pytest
|
# Fall back to deprecated setup.py test orchestration without pytest
|
||||||
|
@ -37,7 +37,7 @@ do_check() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
: ${make_check_target:=test}
|
: ${make_check_target:=test}
|
||||||
python3 setup.py ${make_check_target} ${make_check_args}
|
${make_check_pre} python3 setup.py ${make_check_target} ${make_check_args}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ do_build() {
|
||||||
|
|
||||||
do_check() {
|
do_check() {
|
||||||
if python3 -c 'import pytest' >/dev/null 2>&1; then
|
if python3 -c 'import pytest' >/dev/null 2>&1; then
|
||||||
python3 -m pytest ${make_check_args} ${make_check_target}
|
${make_check_pre} python3 -m pytest ${make_check_args} ${make_check_target}
|
||||||
else
|
else
|
||||||
msg_warn "Unable to determine tests for PEP517 Python templates"
|
msg_warn "Unable to determine tests for PEP517 Python templates"
|
||||||
return 0
|
return 0
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
do_check() {
|
do_check() {
|
||||||
RAKULIB=lib prove -r -e raku t/
|
${make_check_pre} RAKULIB=lib prove -r -e raku t/
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
|
|
@ -7,7 +7,7 @@ unset -v archs distfiles checksum build_style build_helper nocross broken
|
||||||
unset -v configure_script configure_args wrksrc build_wrksrc create_wrksrc
|
unset -v configure_script configure_args wrksrc build_wrksrc create_wrksrc
|
||||||
unset -v make_build_args make_check_args make_install_args
|
unset -v make_build_args make_check_args make_install_args
|
||||||
unset -v make_build_target make_check_target make_install_target
|
unset -v make_build_target make_check_target make_install_target
|
||||||
unset -v make_cmd meson_cmd gem_cmd fetch_cmd
|
unset -v make_cmd meson_cmd gem_cmd fetch_cmd make_check_pre
|
||||||
unset -v python_version stackage
|
unset -v python_version stackage
|
||||||
unset -v cmake_builddir meson_builddir
|
unset -v cmake_builddir meson_builddir
|
||||||
unset -v meson_crossfile
|
unset -v meson_crossfile
|
||||||
|
|
Loading…
Reference in New Issue