-
Notifications
You must be signed in to change notification settings - Fork 698
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9717 from mpickering/wip/system-testsuite
testsuite: Run tests in temporary system directories
- Loading branch information
Showing
74 changed files
with
332 additions
and
312 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
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 |
---|---|---|
@@ -1,82 +1,82 @@ | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo bar/configure', contains the character ' ' (space). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo bar/configure', contains the character ' ' (space). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo bar/configure', contains the character ' ' (tab). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo bar/configure', contains the character ' ' (tab). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo | ||
Warning: The path to the './configure' script, '/<ROOT>/foo | ||
bar/configure', contains the character ' | ||
' (newline). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo"bar/configure', contains the character '"' (double quote). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo"bar/configure', contains the character '"' (double quote). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo#bar/configure', contains the character '#' (hash). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo#bar/configure', contains the character '#' (hash). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo$bar/configure', contains the character '$' (dollar sign). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo$bar/configure', contains the character '$' (dollar sign). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo&bar/configure', contains the character '&' (ampersand). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo&bar/configure', contains the character '&' (ampersand). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo'bar/configure', contains the character ''' (single quote). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo'bar/configure', contains the character ''' (single quote). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo(bar/configure', contains the character '(' (left bracket). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo(bar/configure', contains the character '(' (left bracket). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo)bar/configure', contains the character ')' (right bracket). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo)bar/configure', contains the character ')' (right bracket). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo*bar/configure', contains the character '*' (star). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo*bar/configure', contains the character '*' (star). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo;bar/configure', contains the character ';' (semicolon). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo;bar/configure', contains the character ';' (semicolon). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo<bar/configure', contains the character '<' (less-than sign). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo<bar/configure', contains the character '<' (less-than sign). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo=bar/configure', contains the character '=' (equals sign). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo=bar/configure', contains the character '=' (equals sign). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo>bar/configure', contains the character '>' (greater-than sign). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo>bar/configure', contains the character '>' (greater-than sign). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo?bar/configure', contains the character '?' (question mark). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo?bar/configure', contains the character '?' (question mark). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo[bar/configure', contains the character '[' (left square bracket). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo[bar/configure', contains the character '[' (left square bracket). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo/bar/configure', contains the character '/' (backslash). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo/bar/configure', contains the character '/' (backslash). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo`bar/configure', contains the character '`' (backtick). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo`bar/configure', contains the character '`' (backtick). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
# cabal v1-configure | ||
Resolving dependencies... | ||
Configuring test-0... | ||
Warning: The path to the './configure' script, '/<ROOT>/cabal.dist/foo|bar/configure', contains the character '|' (pipe). This may cause the script to fail with an obscure error, or for building the package to fail later. | ||
Warning: The path to the './configure' script, '/<ROOT>/foo|bar/configure', contains the character '|' (pipe). This may cause the script to fail with an obscure error, or for building the package to fail later. |
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
1 change: 1 addition & 0 deletions
1
cabal-testsuite/PackageTests/Check/ConfiguredPackage/Paths/RecursiveGlobInRoot/a.hs
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 @@ | ||
module Main where |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Test.Cabal.Prelude | ||
main = cabalTest $ do | ||
withRepo "repo" . withSourceCopy $ do | ||
withRepo "repo" $ do | ||
cabal "v1-freeze" ["--disable-benchmarks"] | ||
cwd <- fmap testCurrentDir getTestEnv | ||
assertFileDoesNotContain (cwd </> "cabal.config") "criterion" |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Test.Cabal.Prelude | ||
main = cabalTest $ do | ||
withRepo "repo" . withSourceCopy $ do | ||
withRepo "repo" $ do | ||
cabal "v1-freeze" ["--disable-tests"] | ||
cwd <- fmap testCurrentDir getTestEnv | ||
assertFileDoesNotContain (cwd </> "cabal.config") "test-framework" |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Test.Cabal.Prelude | ||
main = cabalTest $ do | ||
withRepo "repo" . withSourceCopy $ do | ||
withRepo "repo" $ do | ||
recordMode DoNotRecord $ cabal "v1-freeze" ["--dry-run"] | ||
cwd <- fmap testCurrentDir getTestEnv | ||
shouldNotExist (cwd </> "cabal.config") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Test.Cabal.Prelude | ||
main = cabalTest $ do | ||
withRepo "repo" . withSourceCopy $ do | ||
withRepo "repo" $ do | ||
cabal "v1-freeze" ["--enable-tests"] | ||
cwd <- fmap testCurrentDir getTestEnv | ||
assertFileDoesContain (cwd </> "cabal.config") "test-framework" |
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
2 changes: 1 addition & 1 deletion
2
cabal-testsuite/PackageTests/HaddockProject/haddock-project.test.hs
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
6 changes: 4 additions & 2 deletions
6
cabal-testsuite/PackageTests/Init/init-interactive-empty-folder.test.hs
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
14 changes: 6 additions & 8 deletions
14
cabal-testsuite/PackageTests/Init/init-interactive-ghc2021.test.hs
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 |
---|---|---|
@@ -1,11 +1,9 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ | ||
withSourceCopyDir "app" $ do | ||
cwd <- fmap testSourceCopyDir getTestEnv | ||
main = cabalTest $ do | ||
env <- getTestEnv | ||
buildOut <- | ||
cabalWithStdin "init" ["-i", "-p", "app"] | ||
"2\n\n5\n\n\n2\n\n\n\n\n\n\n3\n\n" | ||
|
||
buildOut <- withDirectory cwd $ do | ||
cabalWithStdin "init" ["-i"] | ||
"2\n\n5\n\n\n2\n\n\n\n\n\n\n\n3\n\n" | ||
|
||
assertFileDoesContain (cwd </> "app.cabal") "GHC2021" | ||
assertFileDoesContain (testCurrentDir env </> "app.cabal") "GHC2021" |
12 changes: 5 additions & 7 deletions
12
cabal-testsuite/PackageTests/Init/init-interactive-legacy.test.hs
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
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
Oops, something went wrong.