3485f095ad
- add bustedCheckHook in the nativeCheckInputs and busted will run when doCheck is enabled. You can customize its call via "bustedFlags" and prevent it from running with "dontBustedCheck". If "nlua" is available, busted will automatically run busted with nlua as interpreter (already done in lux). Goal is to standardize the writing of tests so that if feels less like copy & paste. - removed the default checkPhase from buildLuarocksPackage which was running "luarocks test". None of the plugins was using as far as I know because no plugin out there (maybe 2 or 3) uses that ? it could be considered a breaking change but in practice I dont think it is.
25 lines
514 B
Bash
25 lines
514 B
Bash
# hook for running busted
|
|
# shellcheck shell=bash
|
|
echo "Sourcing busted-check-hook.sh"
|
|
|
|
bustedCheckPhase () {
|
|
echo "Executing bustedCheckPhase"
|
|
runHook preCheck
|
|
|
|
if command -v nlua && [ -z "${bustedNoNlua-}" ]; then
|
|
bustedFlags+=("--lua=nlua")
|
|
fi
|
|
|
|
busted "${bustedFlags[@]}"
|
|
|
|
runHook postCheck
|
|
echo "Finished executing bustedCheckPhase"
|
|
}
|
|
|
|
if [ -z "${dontBustedCheck-}" ] && [ -z "${checkPhase-}" ]; then
|
|
echo "Using bustedCheckPhase"
|
|
checkPhase+=" bustedCheckPhase"
|
|
fi
|
|
|
|
|