WIP: Testing with automatic fetching

This commit is contained in:
2020-10-26 19:43:02 +01:00
parent 59346fa97e
commit 3bd4e61f3f
7 changed files with 149 additions and 20 deletions

33
garlic/pp/check.nix Normal file
View File

@@ -0,0 +1,33 @@
{
stdenv
}:
resultTree:
stdenv.mkDerivation {
name = "check";
preferLocalBuild = true;
phases = [ "installPhase" ];
installPhase = ''
echo "checking result tree: ${resultTree}"
cd ${resultTree}
for exp in *-experiment; do
cd ${resultTree}/$exp
echo "$exp: checking units"
for unit in *-unit; do
cd ${resultTree}/$exp/$unit
if [ ! -e status ]; then
echo "missing $unit/status file, aborting"
exit 1
fi
st=$(cat status)
if [ "$st" != "completed" ]; then
echo "unit $unit is not complete yet, aborting"
exit 1
fi
done
echo "$exp: execution complete"
done
ln -s $out ${resultTree}
'';
}