Skip to content

Commit

Permalink
Remove the preCheck for windows tests (#2099)
Browse files Browse the repository at this point in the history
* Remove the `preCheck` for windows tests

This was copying DLLs need into place.  I don't think this is needed any more because it DLLs are copied into the `/bin` directory of the test derivation by the `installPhase` in `builder/comp-builder.nix`.

* Remove preCheck and postCheck
  • Loading branch information
hamishmack authored Oct 30, 2023
1 parent c1036ce commit 97ef998
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions overlays/mingw_w64.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,24 +98,4 @@ let
'';
testWrapper = lib.optional hostPlatform.isWindows "${wineTestWrapper}/bin/test-wrapper";

preCheck = lib.optionalString hostPlatform.isWindows ''
echo "================================================================================"
echo "RUNNING TESTS for $name via wine64"
echo "================================================================================"
# copy all .dlls into the local directory.
# we ask ghc-pkg for *all* dynamic-library-dirs and then iterate over the unique set
# to copy over dlls as needed.
echo "Copying library dependencies..."
for libdir in $(${hostPlatform.config}-ghc-pkg field "*" dynamic-library-dirs --simple-output|xargs|sed 's/ /\n/g'|sort -u); do
if [ -d "$libdir" ]; then
find "$libdir" -iname '*.dll' -exec cp {} . \;
fi
done
'';
postCheck = lib.optionalString hostPlatform.isWindows ''
echo "================================================================================"
echo "END RUNNING TESTS"
echo "================================================================================"
'';

in { inherit preCheck testWrapper postCheck setupBuildFlags configureFlags; }
in { inherit testWrapper setupBuildFlags configureFlags; }

0 comments on commit 97ef998

Please sign in to comment.