Skip to content

Commit

Permalink
Add install by copy test and skip symlink install for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Oct 31, 2023
1 parent 0e19571 commit 7f696e5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# cabal v2-install
Wrote tarball sdist to <ROOT>/clean-install-by-copy.dist/work/./dist/sdist/WarnEarlyOverwrite-0.1.0.0.tar.gz
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
- WarnEarlyOverwrite-0.1.0.0 (exe:warn-early-overwrite) (requires build)
Configuring executable 'warn-early-overwrite' for WarnEarlyOverwrite-0.1.0.0...
Preprocessing executable 'warn-early-overwrite' for WarnEarlyOverwrite-0.1.0.0...
Building executable 'warn-early-overwrite' for WarnEarlyOverwrite-0.1.0.0...
Installing executable warn-early-overwrite in <PATH>
Warning: The directory <GBLTMPDIR>/ghc-<GHCVER>/incoming/new-<RAND><GBLTMPDIR>/ghc-<GHCVER>/<PACKAGE>-<HASH>/bin is not in the system search path.
Copying 'warn-early-overwrite' to '<GBLTMPDIR>/warn-early-overwrite'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Test.Cabal.Prelude

main = withShorterPathForNewBuildStore $ \storeDir -> cabalTest $ do
let options = ["--store-dir=" ++ storeDir, "--installdir=" ++ storeDir]
-- Use install method copy that should surely work on Windows too.
cabalG options "v2-install" ["--install-method=copy"]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# cabal v2-install
Wrote tarball sdist to <ROOT>/clean-install.dist/work/./dist/sdist/WarnEarlyOverwrite-0.1.0.0.tar.gz
Wrote tarball sdist to <ROOT>/clean-install-by-symlink.dist/work/./dist/sdist/WarnEarlyOverwrite-0.1.0.0.tar.gz
Resolving dependencies...
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Test.Cabal.Prelude

main = withShorterPathForNewBuildStore $ \storeDir -> cabalTest $ do
-- The default install method is symlink, which may not work on Windows.
-- The default install method is symlink that may not work on Windows.
skipIfWindows
let options = ["--store-dir=" ++ storeDir, "--installdir=" ++ storeDir]
cabalG options "v2-install" []

0 comments on commit 7f696e5

Please sign in to comment.