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
14 changed files with 17 additions and 14 deletions
|
@ -25,7 +25,7 @@ do_build() {
|
|||
|
||||
do_check() {
|
||||
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}
|
||||
else
|
||||
# Fall back to deprecated setup.py test orchestration without pytest
|
||||
|
@ -37,7 +37,7 @@ do_check() {
|
|||
fi
|
||||
|
||||
: ${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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue