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:Matthew Pickering <matthewtpickering@gmail.com> Co-authored-by:
Artem Pelenitsyn <a.pelenitsyn@gmail.com> Co-authored-by:
brandon s allbery kf8nh <allbery.b@gmail.com>
Showing
- Cabal-tests/Cabal-tests.cabal 1 addition, 1 deletionCabal-tests/Cabal-tests.cabal
- Cabal-tests/lib/Test/Utils/TempTestDir.hs 8 additions, 7 deletionsCabal-tests/lib/Test/Utils/TempTestDir.hs
- Cabal-tests/tests/UnitTests/Distribution/PackageDescription/Check.hs 1 addition, 1 deletion.../tests/UnitTests/Distribution/PackageDescription/Check.hs
- cabal-testsuite/PackageTests/Backpack/Includes3/cabal-repo.test.hs 2 additions, 3 deletions...tsuite/PackageTests/Backpack/Includes3/cabal-repo.test.hs
- cabal-testsuite/PackageTests/Backpack/T6385/cabal.test.hs 3 additions, 3 deletionscabal-testsuite/PackageTests/Backpack/T6385/cabal.test.hs
- cabal-testsuite/PackageTests/BuildTargets/UseLocalPackageForSetup/use-local-package-as-setup-dep.test.hs 4 additions, 4 deletions...calPackageForSetup/use-local-package-as-setup-dep.test.hs
- cabal-testsuite/PackageTests/CopyHie/cabal.test.hs 4 additions, 5 deletionscabal-testsuite/PackageTests/CopyHie/cabal.test.hs
- cabal-testsuite/PackageTests/HaddockArgs/hoogle.test.hs 2 additions, 2 deletionscabal-testsuite/PackageTests/HaddockArgs/hoogle.test.hs
- cabal-testsuite/PackageTests/HaddockArgs/quickjump.test.hs 6 additions, 7 deletionscabal-testsuite/PackageTests/HaddockArgs/quickjump.test.hs
- cabal-testsuite/PackageTests/HaddockBuildDepends/cabal.test.hs 2 additions, 3 deletions...-testsuite/PackageTests/HaddockBuildDepends/cabal.test.hs
- cabal-testsuite/PackageTests/NewBuild/CustomSetup/LocalPackageWithCustomSetup/build-local-package-with-custom-setup.test.hs 2 additions, 3 deletions...CustomSetup/build-local-package-with-custom-setup.test.hs
- cabal-testsuite/PackageTests/NewBuild/CustomSetup/RemotePackageWithCustomSetup/build-package-from-repo-with-custom-setup.test.hs 3 additions, 3 deletions...omSetup/build-package-from-repo-with-custom-setup.test.hs
- cabal-testsuite/PackageTests/NewBuild/T4375/cabal.test.hs 3 additions, 3 deletionscabal-testsuite/PackageTests/NewBuild/T4375/cabal.test.hs
- cabal-testsuite/PackageTests/NewConfigure/ConfigFile/cabal.test.hs 5 additions, 5 deletions...tsuite/PackageTests/NewConfigure/ConfigFile/cabal.test.hs
- cabal-testsuite/PackageTests/NewFreeze/FreezeFile/new_freeze.test.hs 10 additions, 10 deletions...uite/PackageTests/NewFreeze/FreezeFile/new_freeze.test.hs
- cabal-testsuite/PackageTests/OfflineFlag/offlineFlag.test.hs 5 additions, 5 deletionscabal-testsuite/PackageTests/OfflineFlag/offlineFlag.test.hs
- cabal-testsuite/PackageTests/Regression/T5409/use-different-versions-of-dependency-for-library-and-build-tool.test.hs 2 additions, 3 deletions...versions-of-dependency-for-library-and-build-tool.test.hs
- cabal-testsuite/PackageTests/Regression/T5782Diamond/cabal.test.hs 7 additions, 5 deletions...tsuite/PackageTests/Regression/T5782Diamond/cabal.test.hs
- cabal-testsuite/PackageTests/WarnEarlyOverwrite/clean-install-by-copy.test.hs 3 additions, 2 deletions...ageTests/WarnEarlyOverwrite/clean-install-by-copy.test.hs
- cabal-testsuite/PackageTests/WarnEarlyOverwrite/clean-install-by-symlink.test.hs 3 additions, 2 deletions...Tests/WarnEarlyOverwrite/clean-install-by-symlink.test.hs
Loading
Please register or sign in to comment