[commit: ghc] master: A failing testcase for T12485 (a07a3ff)

git at git.haskell.org git at git.haskell.org
Wed Aug 31 18:29:29 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a07a3ffa3efda6f7ebe68841e15ef89ac0d313b1/ghc

>---------------------------------------------------------------

commit a07a3ffa3efda6f7ebe68841e15ef89ac0d313b1
Author: Bartosz Nitka <niteria at gmail.com>
Date:   Wed Aug 31 13:52:35 2016 -0400

    A failing testcase for T12485
    
    Test Plan: it's just a testcase
    
    Reviewers: ezyang, simonmar, bgamari, austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2450
    
    GHC Trac Issues: #12485


>---------------------------------------------------------------

a07a3ffa3efda6f7ebe68841e15ef89ac0d313b1
 testsuite/driver/extra_files.py                            |  1 +
 testsuite/tests/{module/T7765.hs => cabal/T12485/Main.hs}  |  1 +
 testsuite/tests/cabal/T12485/Makefile                      | 14 ++++++++++++++
 .../cabal/{cabal08/cabal08.stdout => T12485/T12485.stdout} |  4 ++--
 testsuite/tests/cabal/T12485/a.pkg                         |  6 ++++++
 testsuite/tests/cabal/T12485/all.T                         |  5 +++++
 testsuite/tests/cabal/T12485/b.pkg                         |  5 +++++
 7 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/testsuite/driver/extra_files.py b/testsuite/driver/extra_files.py
index acf4802..f1dbcb5 100644
--- a/testsuite/driver/extra_files.py
+++ b/testsuite/driver/extra_files.py
@@ -84,6 +84,7 @@ extra_src_files = {
   'T11827': ['A.hs', 'A.hs-boot', 'B.hs'],
   'T12062': ['A.hs', 'A.hs-boot', 'C.hs'],
   'T12035j': ['T12035.hs', 'T12035a.hs', 'T12035.hs-boot'],
+  'T12485': ['a.pkg', 'b.pkg', 'Main.hs'],
   'T1372': ['p1/', 'p2/'],
   'T1407': ['A.c'],
   'T1959': ['B.hs', 'C.hs', 'D.hs', 'E1.hs', 'E2.hs'],
diff --git a/testsuite/tests/module/T7765.hs b/testsuite/tests/cabal/T12485/Main.hs
similarity index 60%
copy from testsuite/tests/module/T7765.hs
copy to testsuite/tests/cabal/T12485/Main.hs
index 6ca9a1f..3894aba 100644
--- a/testsuite/tests/module/T7765.hs
+++ b/testsuite/tests/cabal/T12485/Main.hs
@@ -1 +1,2 @@
 module Main where
+main = main
diff --git a/testsuite/tests/cabal/T12485/Makefile b/testsuite/tests/cabal/T12485/Makefile
new file mode 100644
index 0000000..fc8e992
--- /dev/null
+++ b/testsuite/tests/cabal/T12485/Makefile
@@ -0,0 +1,14 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+T12485 :
+	@rm -rf a.db b.db
+	'$(GHC_PKG)' init a.db
+	'$(GHC_PKG)' -f a.db register a.pkg
+	'$(GHC_PKG)' init b.db
+	'$(GHC_PKG)' -f a.db/ -f b.db/ register b.pkg # register b.pkg in b.db
+	# -package-db in dependency order
+	'$(TEST_HC)' -XNoImplicitPrelude -fforce-recomp -hide-all-packages -no-user-package-db -package-db a.db -package-db b.db -package-id a-1-XXX -package-id b-1-XXX Main.hs
+	# -package-db in reverse dependency order
+	'$(TEST_HC)' -XNoImplicitPrelude -fforce-recomp -hide-all-packages -no-user-package-db -package-db b.db -package-db a.db -package-id a-1-XXX -package-id b-1-XXX Main.hs
diff --git a/testsuite/tests/cabal/cabal08/cabal08.stdout b/testsuite/tests/cabal/T12485/T12485.stdout
similarity index 62%
copy from testsuite/tests/cabal/cabal08/cabal08.stdout
copy to testsuite/tests/cabal/T12485/T12485.stdout
index 8f97cd4..aefbf38 100644
--- a/testsuite/tests/cabal/cabal08/cabal08.stdout
+++ b/testsuite/tests/cabal/T12485/T12485.stdout
@@ -1,6 +1,6 @@
+Reading package info from "a.pkg" ... done.
+Reading package info from "b.pkg" ... done.
 [1 of 1] Compiling Main             ( Main.hs, Main.o )
 Linking Main ...
-p2
 [1 of 1] Compiling Main             ( Main.hs, Main.o )
 Linking Main ...
-p2
diff --git a/testsuite/tests/cabal/T12485/a.pkg b/testsuite/tests/cabal/T12485/a.pkg
new file mode 100644
index 0000000..fdf9bf6
--- /dev/null
+++ b/testsuite/tests/cabal/T12485/a.pkg
@@ -0,0 +1,6 @@
+name: a
+version: 1
+id: a-1-XXX
+key: a-1-XXX
+abi: aaa
+depends:
diff --git a/testsuite/tests/cabal/T12485/all.T b/testsuite/tests/cabal/T12485/all.T
new file mode 100644
index 0000000..63f6d6a
--- /dev/null
+++ b/testsuite/tests/cabal/T12485/all.T
@@ -0,0 +1,5 @@
+test('T12485',
+     [extra_clean(['a.db', 'b.db', 'Main.o', 'Main', 'Main.hi']),
+      expect_broken(12485)],
+     run_command,
+     ['$MAKE -s --no-print-directory T12485'])
diff --git a/testsuite/tests/cabal/T12485/b.pkg b/testsuite/tests/cabal/T12485/b.pkg
new file mode 100644
index 0000000..f9ad852
--- /dev/null
+++ b/testsuite/tests/cabal/T12485/b.pkg
@@ -0,0 +1,5 @@
+name: b
+version: 1
+id: b-1-XXX
+key: b-1-XXX
+depends: a-1-XXX



More information about the ghc-commits mailing list