Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
6c3032f0
Commit
6c3032f0
authored
Feb 20, 2007
by
Simon Marlow
Browse files
rename GHC_PKG -> LOCAL_GHC_PKG to avoid clash with mk/test.mk
parent
5806d7e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/cabal/Makefile
View file @
6c3032f0
...
...
@@ -3,68 +3,68 @@ include $(TOP)/mk/boilerplate.mk
include
$(TOP)/mk/test.mk
PKGCONF
=
local.package.conf
GHC_PKG
=
$(GHC_PKG_INPLACE)
-f
$(PKGCONF)
LOCAL_
GHC_PKG
=
$(GHC_PKG_INPLACE)
-f
$(PKGCONF)
# a bunch of tests for ghc-pkg
ghcpkg01
:
@
rm
-f
$(PKGCONF)
echo
"[]"
>
$(PKGCONF)
$(GHC_PKG)
list
$(GHC_PKG)
register
--force
test.pkg
$(GHC_PKG)
describe testpkg
$(GHC_PKG)
describe testpkg-1.2.3.4
$(GHC_PKG)
field testpkg-1.2.3.4 import-dirs
$(
LOCAL_
GHC_PKG)
list
$(
LOCAL_
GHC_PKG)
register
--force
test.pkg
$(
LOCAL_
GHC_PKG)
describe testpkg
$(
LOCAL_
GHC_PKG)
describe testpkg-1.2.3.4
$(
LOCAL_
GHC_PKG)
field testpkg-1.2.3.4 import-dirs
@
:
#
test2.pkg is a later version of testpkg-1.2.3.4
$(GHC_PKG)
register
--force
test2.pkg
$(GHC_PKG)
list
$(GHC_PKG)
describe testpkg-2.0
$(GHC_PKG)
describe testpkg-
*
$(GHC_PKG)
field testpkg-
*
version
$(
LOCAL_
GHC_PKG)
register
--force
test2.pkg
$(
LOCAL_
GHC_PKG)
list
$(
LOCAL_
GHC_PKG)
describe testpkg-2.0
$(
LOCAL_
GHC_PKG)
describe testpkg-
*
$(
LOCAL_
GHC_PKG)
field testpkg-
*
version
@
:
#
test hiding/exposing
$(GHC_PKG)
hide testpkg-1.2.3.4
$(GHC_PKG)
field testpkg-1.2.3.4 exposed |
grep
False
$(GHC_PKG)
expose testpkg-2.0
$(GHC_PKG)
field testpkg-2.0 exposed |
grep
True
$(GHC_PKG)
hide testpkg-
*
$(GHC_PKG)
field testpkg-
*
exposed
$(
LOCAL_
GHC_PKG)
hide testpkg-1.2.3.4
$(
LOCAL_
GHC_PKG)
field testpkg-1.2.3.4 exposed |
grep
False
$(
LOCAL_
GHC_PKG)
expose testpkg-2.0
$(
LOCAL_
GHC_PKG)
field testpkg-2.0 exposed |
grep
True
$(
LOCAL_
GHC_PKG)
hide testpkg-
*
$(
LOCAL_
GHC_PKG)
field testpkg-
*
exposed
@
:
#
test3.pkg depends on testpkg-2.0
$(GHC_PKG)
register test3.pkg
$(GHC_PKG)
unregister testpkg-3.0
$(
LOCAL_
GHC_PKG)
register test3.pkg
$(
LOCAL_
GHC_PKG)
unregister testpkg-3.0
$(GHC_PKG)
unregister
testpkg-2.0
$(GHC_PKG)
describe
testpkg
$(GHC_PKG)
unregister
testpkg-*
$(GHC_PKG)
list
$(
LOCAL_
GHC_PKG)
unregister
testpkg-2.0
$(
LOCAL_
GHC_PKG)
describe
testpkg
$(
LOCAL_
GHC_PKG)
unregister
testpkg-*
$(
LOCAL_
GHC_PKG)
list
@
:
#
registering test3.pkg should fail now
,
its dependency has gone
if
$(GHC_PKG)
register test3.pkg
;
then
false
;
else
true
;
fi
if
$(
LOCAL_
GHC_PKG)
register test3.pkg
;
then
false
;
else
true
;
fi
ghcpkg03
:
@
rm
-f
$(PKGCONF)
echo
"[]"
>
$(PKGCONF)
@
:
# update should hide conflicting packages
$(GHC_PKG)
register
--force
test.pkg
$(GHC_PKG)
register
--force
test2.pkg
$(
LOCAL_
GHC_PKG)
register
--force
test.pkg
$(
LOCAL_
GHC_PKG)
register
--force
test2.pkg
@
:
#
test4.pkg depends on testpkg-2.0
,
which conflicts with testpkg-1.2.3.4
,
@
:
# ghc-pkg will happily register it now
(
it didn
't in GHC 6.4)
$(GHC_PKG)
register test4.pkg
$(GHC_PKG)
update test4.pkg
$(
LOCAL_
GHC_PKG)
register test4.pkg
$(
LOCAL_
GHC_PKG)
update test4.pkg
@
:
#
and another update of test.pkg will now hide dep-2.0
$(GHC_PKG)
update
--force
test.pkg
$(
LOCAL_
GHC_PKG)
update
--force
test.pkg
# Test that importing a module exposed by two packages reports a conflict
ghcpkg04
:
@
rm
-f
$(PKGCONF)
@
echo
"[]"
>
$(PKGCONF)
@
$(GHC_PKG)
register
--force
test.pkg
>
/dev/null 2>&1
@
$(GHC_PKG)
update
--force
test5.pkg
>
/dev/null 2>&1
@
$(GHC_PKG)
expose testpkg-1.2.3.4
>
/dev/null 2>&1
@
$(
LOCAL_
GHC_PKG)
register
--force
test.pkg
>
/dev/null 2>&1
@
$(
LOCAL_
GHC_PKG)
update
--force
test5.pkg
>
/dev/null 2>&1
@
$(
LOCAL_
GHC_PKG)
expose testpkg-1.2.3.4
>
/dev/null 2>&1
@
:
# testpkg-1.2.3.4 and newtestpkg-2.0 are both exposed now
@
$(TEST_HC)
-package-conf
$(PKGCONF)
-c
ghcpkg04.hs
||
true
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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