Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
4eb8e4f2
Commit
4eb8e4f2
authored
Aug 27, 2016
by
kristenk
Browse files
Test configuring a package with a custom-setup that doesn't include Cabal.
parent
9ec40287
Changes
7
Hide whitespace changes
Inline
Side-by-side
cabal-install/cabal-install.cabal
View file @
4eb8e4f2
...
...
@@ -27,8 +27,14 @@ Extra-Source-Files:
tests/IntegrationTests/custom-setup/Cabal-99998/CabalMessage.hs
tests/IntegrationTests/custom-setup/Cabal-99999/Cabal.cabal
tests/IntegrationTests/custom-setup/Cabal-99999/CabalMessage.hs
tests/IntegrationTests/custom-setup/custom-setup-without-cabal-defaultMain/Setup.hs
tests/IntegrationTests/custom-setup/custom-setup-without-cabal-defaultMain/custom-setup-without-cabal-defaultMain.cabal
tests/IntegrationTests/custom-setup/custom-setup-without-cabal/Setup.hs
tests/IntegrationTests/custom-setup/custom-setup-without-cabal/custom-setup-without-cabal.cabal
tests/IntegrationTests/custom-setup/custom-setup/Setup.hs
tests/IntegrationTests/custom-setup/custom-setup/custom-setup.cabal
tests/IntegrationTests/custom-setup/custom_setup_without_Cabal_doesnt_allow_Cabal_import.sh
tests/IntegrationTests/custom-setup/custom_setup_without_Cabal_doesnt_require_Cabal.sh
tests/IntegrationTests/custom-setup/installs_Cabal_as_setup_dep.sh
tests/IntegrationTests/custom/custom_dep.sh
tests/IntegrationTests/custom/custom_dep/client/B.hs
...
...
cabal-install/tests/IntegrationTests/custom-setup/custom-setup-without-cabal-defaultMain/Setup.hs
0 → 100644
View file @
4eb8e4f2
import
Distribution.Simple
main
=
defaultMain
cabal-install/tests/IntegrationTests/custom-setup/custom-setup-without-cabal-defaultMain/custom-setup-without-cabal-defaultMain.cabal
0 → 100644
View file @
4eb8e4f2
name: custom-setup-without-cabal-defaultMain
version: 1.0
build-type: Custom
cabal-version: >= 1.2
custom-setup
setup-depends: base
library
cabal-install/tests/IntegrationTests/custom-setup/custom-setup-without-cabal/Setup.hs
0 → 100644
View file @
4eb8e4f2
import
System.Exit
import
System.IO
main
=
hPutStrLn
stderr
"My custom Setup"
>>
exitFailure
cabal-install/tests/IntegrationTests/custom-setup/custom-setup-without-cabal/custom-setup-without-cabal.cabal
0 → 100644
View file @
4eb8e4f2
name: custom-setup-without-cabal
version: 1.0
build-type: Custom
cabal-version: >= 99999
custom-setup
setup-depends: base
library
cabal-install/tests/IntegrationTests/custom-setup/custom_setup_without_Cabal_doesnt_allow_Cabal_import.sh
0 → 100644
View file @
4eb8e4f2
.
./common.sh
cd
custom-setup-without-cabal-defaultMain
# This package has explicit setup dependencies that do not include Cabal.
# Compilation should fail because Setup.hs imports Distribution.Simple.
!
cabal new-build custom-setup-without-cabal-defaultMain
>
output 2>&1
cat
output
grep
-q
"
\(
Could not find module
\|
Failed to load interface for
\)
.*Distribution
\\
.Simple"
output
\
||
die
"Should not have been able to import Cabal"
grep
-q
"It is a member of the hidden package .*Cabal-"
output
\
||
die
"Cabal should be available"
cabal-install/tests/IntegrationTests/custom-setup/custom_setup_without_Cabal_doesnt_require_Cabal.sh
0 → 100644
View file @
4eb8e4f2
.
./common.sh
cd
custom-setup-without-cabal
# This package has explicit setup dependencies that do not include Cabal.
# new-build should try to build it, even though the cabal-version cannot be
# satisfied by an installed version of Cabal (cabal-version: >= 99999). However,
# configure should fail because Setup.hs just prints an error message and exits.
!
cabal new-build custom-setup-without-cabal
>
output 2>&1
cat
output
grep
-q
"My custom Setup"
output
\
||
die
"Expected output from custom Setup"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment