* Add an installCheckPhase.
svn path=/nixpkgs/branches/stdenv-updates/; revision=33967
This commit is contained in:
parent
661d16d3fe
commit
be901fa8be
@ -767,6 +767,19 @@ fixupPhase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
installCheckPhase() {
|
||||||
|
runHook preInstallCheck
|
||||||
|
|
||||||
|
echo "installcheck flags: $makeFlags ${makeFlagsArray[@]} $installCheckFlags ${installCheckFlagsArray[@]}"
|
||||||
|
make ${makefile:+-f $makefile} \
|
||||||
|
${enableParallelBuilding:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}} \
|
||||||
|
$makeFlags "${makeFlagsArray[@]}" \
|
||||||
|
$installCheckFlags "${installCheckFlagsArray[@]}" ${installCheckTarget:-installcheck}
|
||||||
|
|
||||||
|
runHook postInstallCheck
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
distPhase() {
|
distPhase() {
|
||||||
runHook preDist
|
runHook preDist
|
||||||
|
|
||||||
@ -795,6 +808,7 @@ showPhaseHeader() {
|
|||||||
checkPhase) header "running tests";;
|
checkPhase) header "running tests";;
|
||||||
installPhase) header "installing";;
|
installPhase) header "installing";;
|
||||||
fixupPhase) header "post-installation fixup";;
|
fixupPhase) header "post-installation fixup";;
|
||||||
|
installCheckPhase) header "running install tests";;
|
||||||
*) header "$phase";;
|
*) header "$phase";;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@ -811,7 +825,7 @@ genericBuild() {
|
|||||||
if [ -z "$phases" ]; then
|
if [ -z "$phases" ]; then
|
||||||
phases="$prePhases unpackPhase patchPhase $preConfigurePhases \
|
phases="$prePhases unpackPhase patchPhase $preConfigurePhases \
|
||||||
configurePhase $preBuildPhases buildPhase checkPhase \
|
configurePhase $preBuildPhases buildPhase checkPhase \
|
||||||
$preInstallPhases installPhase fixupPhase \
|
$preInstallPhases installPhase fixupPhase installCheckPhase \
|
||||||
$preDistPhases distPhase $postPhases";
|
$preDistPhases distPhase $postPhases";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -820,6 +834,7 @@ genericBuild() {
|
|||||||
if [ "$curPhase" = checkPhase -a -z "$doCheck" ]; then continue; fi
|
if [ "$curPhase" = checkPhase -a -z "$doCheck" ]; then continue; fi
|
||||||
if [ "$curPhase" = installPhase -a -n "$dontInstall" ]; then continue; fi
|
if [ "$curPhase" = installPhase -a -n "$dontInstall" ]; then continue; fi
|
||||||
if [ "$curPhase" = fixupPhase -a -n "$dontFixup" ]; then continue; fi
|
if [ "$curPhase" = fixupPhase -a -n "$dontFixup" ]; then continue; fi
|
||||||
|
if [ "$curPhase" = installCheckPhase -a -z "$doInstallCheck" ]; then continue; fi
|
||||||
if [ "$curPhase" = distPhase -a -z "$doDist" ]; then continue; fi
|
if [ "$curPhase" = distPhase -a -z "$doDist" ]; then continue; fi
|
||||||
|
|
||||||
if [ -n "$tracePhases" ]; then
|
if [ -n "$tracePhases" ]; then
|
||||||
|
@ -34,6 +34,8 @@ stdenv.mkDerivation rec {
|
|||||||
CFLAGS=-O3 CXXFLAGS=-O3
|
CFLAGS=-O3 CXXFLAGS=-O3
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
doInstallCheck = true;
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
postUnpack =
|
postUnpack =
|
||||||
'' export CPATH="${bzip2.hostDrv}/include"
|
'' export CPATH="${bzip2.hostDrv}/include"
|
||||||
@ -51,14 +53,11 @@ stdenv.mkDerivation rec {
|
|||||||
'' + stdenv.lib.optionalString (
|
'' + stdenv.lib.optionalString (
|
||||||
stdenv.cross ? nix && stdenv.cross.nix ? system
|
stdenv.cross ? nix && stdenv.cross.nix ? system
|
||||||
) ''--with-system=${stdenv.cross.nix.system}'';
|
) ''--with-system=${stdenv.cross.nix.system}'';
|
||||||
doCheck = false;
|
doInstallCheck = false;
|
||||||
postInstall = ":";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postInstall = "make installcheck";
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "The Nix Deployment System";
|
description = "The Nix Deployment System";
|
||||||
homepage = http://nixos.org/;
|
homepage = http://nixos.org/;
|
||||||
|
Loading…
Reference in New Issue
Block a user