on iko/ghcjs-patch-master help sign in
Save test executables and logs
26c8723Moritz Angermann
builder/comp-builder.nix+10
@@ -179,9 +179,19 @@ in stdenv.mkDerivation ({
179 runHook postBuild
179 runHook postBuild
180 '';
180 '';
181
181
182+ # Note: Cabal does *not* copy test executables during the `install` phase.
183+ # Thus we'll just copy them during the check phase.
182 checkPhase = ''
184 checkPhase = ''
183 runHook preCheck
185 runHook preCheck
184 $SETUP_HS test
186 $SETUP_HS test
187+ mkdir -p $out/${name}
188+ cp dist/test/*.log $out/${name}/
189+ if [ -f "dist/build/${componentId.cname}/${componentId.cname}" ]; then
190+ cp dist/build/${componentId.cname}/${componentId.cname} $out/${name}/
191+ fi
192+ if [ -f "dist/build/${componentId.cname}/${componentId.cname}.exe" ]; then
193+ cp dist/build/${componentId.cname}/${componentId.cname} $out/${name}/
194+ fi
185 runHook postCheck
195 runHook postCheck
186 '';
196 '';
187
197