Repository navigation
Run tests requiring hackage-repo-tool on Windows - #5219
Merged
Merged
Conversation
Member
|
Thanks, this is very nice. Re: CABAL_DIR - I may be mistaken, but didn't we already have something like that in the test suite to make it use a non-default .cabal dir? |
Collaborator
Author
|
Thanks. I wasn't able to find an existing way to override the cabal directory. I thought that cabal-testsuite only set HOME, which doesn't work on Windows. The closest feature I could find was CABAL_CONFIG, which only overrides the config file location. |
sebright
force-pushed
the
appveyor-hackage-repo-tool
branch
from
March 25, 2018 20:10
39bed2f to
dbd5676
Compare
Collaborator
Author
|
Awesome! I updated the PR to use the version from Hackage. |
sebright
force-pushed
the
appveyor-hackage-repo-tool
branch
3 times, most recently
from
March 31, 2018 03:49
1a8c711 to
1911c73
Compare
sebright
force-pushed
the
appveyor-hackage-repo-tool
branch
from
April 29, 2018 06:08
1911c73 to
a629cc0
Compare
Collaborator
Author
|
@23Skidoo Do you think this PR is ready to be merged? |
CABAL_DIR can be used to run integration tests independently on Windows, since setting HOME doesn't affect the location of the APPDATA directory.
This change gives each test a new cabal directory on Windows and prevents the tests from accessing the user's cabal directory. This commit also re-enables PackageTests/Regression/T4154/install-time-with-constraint.test.hs on Windows.
This commit uses a temporary directory for the nix store in several of the new-build tests in cabal-testsuite. The directory is given a very short path on Windows in order to avoid issues with long store paths.
This commit uses a relative path to specify the test remote repository on Windows, to avoid the path conversion issue described in haskell#5218.
…haskell#5204). I disabled one test that still fails on Windows: PackageTests/NewBuild/CustomSetup/RemotePackageWithCustomSetup/build-package-from-repo-with-custom-setup.test.hs
sebright
force-pushed
the
appveyor-hackage-repo-tool
branch
from
May 3, 2018 05:02
a629cc0 to
1826980
Compare
Member
|
OK, let's merge this now, I'll try to find time to look into |
Member
|
Merged, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please include the following checklist in your PR:
[ci skip]is used to avoid triggering the build bots.Please also shortly describe how you tested your change. Bonus points for added tests!
This PR installs hackage-repo-tool in the AppVeyor build and works around several issues to allow the tests to run. The commits are:
Run tar with --force-local on Windows in cabal-tests, to handle colons in paths.
Add CABAL_DIR environment variable for specifying the cabal directory.
CABAL_DIR can be used to run integration tests independently on Windows,
since setting HOME doesn't affect the location of the APPDATA directory.
Set CABAL_DIR in cabal-tests (fixes #5187).
This change gives each test a new cabal directory on Windows and prevents the
tests from accessing the user's cabal directory.
This commit also re-enables
PackageTests/Regression/T4154/install-time-with-constraint.test.hs on Windows.
Work around issue #4515 in several new-build integration tests.
This commit uses a temporary directory for the nix store in several of the
new-build tests in cabal-testsuite. The directory is given a very short path on
Windows in order to avoid issues with long store paths.
Work around issue #5218 in cabal-testsuite.
This commit uses a relative path to specify the test remote repository on
Windows, to avoid the path conversion issue described in #5218.
Use hackage-repo-tool when running cabal-testsuite on AppVeyor (closes #5204).
appveyor.yml currently downloads hackage-security from Github, since the changes
that allow building on Windows haven't been released yet.
I disabled one test that still fails on Windows:
PackageTests/NewBuild/CustomSetup/RemotePackageWithCustomSetup/build-package-from-repo-with-custom-setup.test.hs
The only non-test change is the CABAL_DIR environment variable for overriding the cabal directory. I'm not completely sure that is the right solution for preventing the tests from accessing the user's cabal directory, since it could cause an incompatibility between cabal-install and older custom setup executables that don't recognize the variable. (I only tested it by building cabal-install, so far.) Does it make sense to add the variable only for testing?
/cc @23Skidoo @ezyang