Skip to content
Snippets Groups Projects
Unverified Commit acf9de76 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub
Browse files

testsuite: Refactor withShorterPathForNewBuildStore (backport #9505) (#10059)


* testsuite: Refactor withShorterPathForNewBuildStore

This makes `withShorterPathForNewBuildStore` fit more nicely into the
rest of the testing infrastructure.

* Move `withShorterPathForNewBuildStore` to `TestM` monad
* Move responsibility for passing `--store-dir` to `cabalGArgs` function
* Move `findDependencyInStore` into `TestM`, and remove requirement to
  pass path to store directory.
* Introduce `testStoreDir` function which returns the store location
  (and honours `withShorterPathForNewBuildStore`)
* Migrate tests which use `withShorterPathForNewBuildStore`.

(cherry picked from commit 2a2d0b30)

# Conflicts:
#	Cabal-tests/Cabal-tests.cabal
#	Cabal-tests/lib/Test/Utils/TempTestDir.hs

* !fixup resolve conflicts

* fixup! always import `(</>)`

---------

Co-authored-by: default avatarMatthew Pickering <matthewtpickering@gmail.com>
Co-authored-by: default avatarArtem Pelenitsyn <a.pelenitsyn@gmail.com>
Co-authored-by: Brandon S. Allbery's avatarbrandon s allbery kf8nh <allbery.b@gmail.com>
parent 5cd189cf
No related branches found
No related tags found
No related merge requests found
Showing
with 76 additions and 77 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment