forked from haskell/cabal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testsuite: pass -i argument to runghc invocations
This commit modifies the generation of runghc commands to pass an additional -i argument to account for the change in working directory. This ensures that, in the testsuite, runghc is able to see other modules. For example, an invocation of runghc to run a Custom Setup script will now properly see the modules imported, e.g. if one has a directory structure like test.cabal Setup.hs SetupDep.hs and Setup.hs imports SetupDep.hs.
- Loading branch information
Showing
8 changed files
with
54 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Main where | ||
|
||
import SetupDep ( depMain ) | ||
|
||
main :: IO () | ||
main = depMain |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module SetupDep where | ||
|
||
import Distribution.Simple | ||
|
||
depMain :: IO () | ||
depMain = defaultMain |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
packages: . |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
cabal-version: 2.2 | ||
name: setup-dep | ||
version: 0.1.0.0 | ||
synopsis: Test for a Setup.hs with a dependency | ||
license: BSD-3-Clause | ||
author: NA | ||
maintainer: NA | ||
category: Testing | ||
build-type: Custom | ||
|
||
custom-setup | ||
setup-depends: Cabal, base | ||
|
||
library | ||
build-depends: base | ||
default-language: Haskell2010 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Setup configure | ||
Configuring setup-dep-0.1.0.0... | ||
# Setup build | ||
Preprocessing library for setup-dep-0.1.0.0... | ||
Building library for setup-dep-0.1.0.0... |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Test.Cabal.Prelude | ||
main = setupTest $ do | ||
setup "configure" [] | ||
setup "build" [] |
This file contains 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
This file contains 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