Fix up Safe Haskell tests for recent ghc changes.
authorDavid Terei <davidterei@gmail.com>
Tue, 9 Aug 2011 20:20:39 +0000 (13:20 -0700)
committerDavid Terei <davidterei@gmail.com>
Tue, 9 Aug 2011 20:20:39 +0000 (13:20 -0700)
testsuite/tests/safeHaskell/check/all.T
testsuite/tests/safeHaskell/check/pkg01/Makefile
testsuite/tests/safeHaskell/check/pkg01/all.T
testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout

index 2e769ba..0b8c7cb 100644 (file)
@@ -10,7 +10,7 @@ test('CheckB',
      multimod_compile, ['CheckB', '-trust base'])
 
 # fail as we don't trust base when compiling Check01
-test('Check01', normal, multi_compile_fail, ['Check01', [
+test('Check01', normal, multi_compile_fail, ['Check01 -distrust base', [
                                             ('Check01_A.hs', ''),
                                             ('Check01_B.hs', '-trust base')
                                             ], ''])
index 7cc8049..7c18381 100644 (file)
@@ -43,4 +43,7 @@ safePkg01:
        echo
        echo 'M_SafePkg4'
        '$(TEST_HC)' --show-iface dist/build/M_SafePkg4.hi | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:'
-
+       echo
+       echo 'Testing setting trust'
+       $(LGHC_PKG) distrust safePkg01-1.0
+       $(LGHC_PKG) field safePkg01-1.0 trusted
index bdbdc4c..def8d88 100644 (file)
@@ -14,7 +14,7 @@ test('safePkg01',
      run_command, 
      ['$MAKE -s --no-print-directory safePkg01 PROF=' + prof])
 
-test('ImpSafe01', normal, compile_fail, [''])
+test('ImpSafe01', normal, compile_fail, ['-distrust base'])
 
 test('ImpSafeOnly01', [normal, alone], compile, ['-package-conf local.db -trust base'])
 
index c1a5642..13a91d3 100644 (file)
@@ -1,7 +1,7 @@
 local.db:
     safePkg01-1.0
 
-trusted: False
+trusted: True
 
 M_SafePkg
 package dependencies: base* ghc-prim integer-gmp
@@ -22,3 +22,6 @@ M_SafePkg4
 package dependencies: base* ghc-prim integer-gmp
 trusted: safe
 require own pkg trusted: True
+
+Testing setting trust
+trusted: False