Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
Cabal
Commits
e4d7536f
Commit
e4d7536f
authored
8 years ago
by
Mikhail Glushenkov
Browse files
Options
Downloads
Patches
Plain Diff
80-col violations.
parent
6a0d4518
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Cabal/tests/PackageTests/Tests.hs
+17
-9
17 additions, 9 deletions
Cabal/tests/PackageTests/Tests.hs
with
17 additions
and
9 deletions
Cabal/tests/PackageTests/Tests.hs
+
17
−
9
View file @
e4d7536f
...
...
@@ -7,10 +7,13 @@ import qualified PackageTests.TestStanza.Check
import
qualified
PackageTests.DeterministicAr.Check
import
qualified
PackageTests.TestSuiteTests.ExeV10.Check
import
Distribution.Simple.LocalBuildInfo
(
LocalBuildInfo
(
localPkgDescr
,
compiler
),
absoluteComponentInstallDirs
,
InstallDirs
(
libdir
),
maybeGetComponentLocalBuildInfo
,
ComponentLocalBuildInfo
(
componentUnitId
),
ComponentName
(
CLibName
))
import
Distribution.Simple.InstallDirs
(
CopyDest
(
NoCopyDest
))
import
Distribution.Simple.BuildPaths
(
mkLibName
,
mkSharedLibName
)
import
Distribution.Simple.Compiler
(
compilerId
)
import
Distribution.Simple.LocalBuildInfo
(
LocalBuildInfo
(
localPkgDescr
,
compiler
),
absoluteComponentInstallDirs
,
InstallDirs
(
libdir
),
maybeGetComponentLocalBuildInfo
,
ComponentLocalBuildInfo
(
componentUnitId
),
ComponentName
(
CLibName
)
)
import
Distribution.Simple.InstallDirs
(
CopyDest
(
NoCopyDest
)
)
import
Distribution.Simple.BuildPaths
(
mkLibName
,
mkSharedLibName
)
import
Distribution.Simple.Compiler
(
compilerId
)
import
Control.Monad
...
...
@@ -303,12 +306,14 @@ tests config = do
-- this does build shared libraries just to make sure they
-- don't get installed, so this test doesn't work on Windows.)
testWhen
(
hasSharedLibraries
config
)
$
tcs
"InternalLibraries/Executable"
"Static"
$
multiple_libraries_executable
False
tcs
"InternalLibraries/Executable"
"Static"
$
multiple_libraries_executable
False
-- Internal libraries used by a dynamically linked executable:
-- ONLY the dynamic library should be installed, no registration
testWhen
(
hasSharedLibraries
config
)
$
tcs
"InternalLibraries/Executable"
"Dynamic"
$
multiple_libraries_executable
True
tcs
"InternalLibraries/Executable"
"Dynamic"
$
multiple_libraries_executable
True
-- Internal library used by public library; it must be installed and
-- registered.
...
...
@@ -405,7 +410,8 @@ tests config = do
cname
=
(
CLibName
"foo-internal"
)
Just
clbi
=
maybeGetComponentLocalBuildInfo
lbi
cname
uid
=
componentUnitId
clbi
dir
=
libdir
(
absoluteComponentInstallDirs
pkg_descr
lbi
uid
NoCopyDest
)
dir
=
libdir
(
absoluteComponentInstallDirs
pkg_descr
lbi
uid
NoCopyDest
)
assertBool
"interface files should NOT be installed"
.
not
=<<
liftIO
(
doesFileExist
(
dir
</>
"Foo.hi"
))
assertBool
"static library should NOT be installed"
.
not
...
...
@@ -413,10 +419,12 @@ tests config = do
if
is_dynamic
then
assertBool
"dynamic library MUST be installed"
=<<
liftIO
(
doesFileExist
(
dir
</>
mkSharedLibName
compiler_id
uid
))
=<<
liftIO
(
doesFileExist
(
dir
</>
mkSharedLibName
compiler_id
uid
))
else
assertBool
"dynamic library should NOT be installed"
.
not
=<<
liftIO
(
doesFileExist
(
dir
</>
mkSharedLibName
compiler_id
uid
))
=<<
liftIO
(
doesFileExist
(
dir
</>
mkSharedLibName
compiler_id
uid
))
shouldFail
$
ghcPkg
"describe"
[
"foo"
]
-- clean away the dist directory so that we catch accidental
-- dependence on the inplace files
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment