mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
054c5f0e10
Always specify the preDistPhases attribute as a list instead of a string. Append elements to the preDistPhases Bash variable using appendToVar instead of string or Bash array concatenation. Handle element insertion before a specific element using string substitution as before, but handle both structured and unstructured attributes.
18 lines
466 B
Bash
18 lines
466 B
Bash
# Setup hook for unittest.
|
|
echo "Sourcing unittest-check-hook"
|
|
|
|
unittestCheckPhase() {
|
|
echo "Executing unittestCheckPhase"
|
|
runHook preCheck
|
|
|
|
eval "@pythonCheckInterpreter@ -m unittest discover $unittestFlagsArray"
|
|
|
|
runHook postCheck
|
|
echo "Finished executing unittestCheckPhase"
|
|
}
|
|
|
|
if [ -z "${dontUseUnittestCheck-}" ] && [ -z "${installCheckPhase-}" ]; then
|
|
echo "Using unittestCheckPhase"
|
|
appendToVar preDistPhases unittestCheckPhase
|
|
fi
|