diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2017-01-22 13:24:13 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-01-22 14:43:51 -0500 |
commit | 5d38fb69fd1e7a434ccc3147ae6a17fe0b5b0be3 (patch) | |
tree | 6513044b8f87723c7db716824b33bbf804c02434 /testsuite/tests/safeHaskell | |
parent | 3f1a21d9725da96dc3cc5d51d97ee4fcc465db47 (diff) | |
download | haskell-5d38fb69fd1e7a434ccc3147ae6a17fe0b5b0be3.tar.gz |
Remove clean_cmd and extra_clean usage from .T files
The `clean_cmd` and `extra_clean` setup functions don't do anything.
Remove them from .T files.
Created using https://github.com/thomie/refactor-ghc-testsuite. This
diff is a test for the .T-file parser/processor/pretty-printer in that
repository.
find . -name '*.T' -exec ~/refactor-ghc-testsuite/Main "{}" \;
Tests containing inline comments or multiline strings are not modified.
Preparation for #12223.
Test Plan: Harbormaster
Reviewers: austin, hvr, simonmar, mpickering, bgamari
Reviewed By: mpickering
Subscribers: mpickering
Differential Revision: https://phabricator.haskell.org/D3000
GHC Trac Issues: #12223
Diffstat (limited to 'testsuite/tests/safeHaskell')
-rw-r--r-- | testsuite/tests/safeHaskell/check/all.T | 16 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/check/pkg01/all.T | 37 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/overlapping/all.T | 73 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/safeInfered/all.T | 57 | ||||
-rw-r--r-- | testsuite/tests/safeHaskell/safeLanguage/all.T | 30 |
5 files changed, 54 insertions, 159 deletions
diff --git a/testsuite/tests/safeHaskell/check/all.T b/testsuite/tests/safeHaskell/check/all.T index fb2841b73c..a4ac4b46cd 100644 --- a/testsuite/tests/safeHaskell/check/all.T +++ b/testsuite/tests/safeHaskell/check/all.T @@ -8,9 +8,7 @@ def f( name, opts ): setTestOpts(f) test('CheckA', normal, compile, ['']) -test('CheckB', - extra_clean(['CheckB_Aux.hi', 'CheckB_Aux.o']), - multimod_compile, ['CheckB', '-trust base']) +test('CheckB', [], multimod_compile, ['CheckB', '-trust base']) # fail as we don't trust base when compiling Check01 test('Check01', normal, multi_compile_fail, ['Check01 -distrust base', [ @@ -43,19 +41,13 @@ test('Check04', normal, multi_compile, ['Check04', [ test('Check05', normal, compile, ['']) # Check safe-infered modules have correct pkg trust requirements -test('Check06', - extra_clean(['Check06_A.hi', 'Check06_A.o']), - multimod_compile_fail, ['Check06', '']) +test('Check06', [], multimod_compile_fail, ['Check06', '']) # Check selective safe imports bring in correct pkg trust requirements -test('Check07', - extra_clean(['Check07_A.hi', 'Check07_A.o', 'Check07_B.hi', 'Check07_B.o']), - multimod_compile, ['Check07', '']) +test('Check07', [], multimod_compile, ['Check07', '']) # Check selective safe imports bring in correct pkg trust requirements -test('Check08', - extra_clean(['Check08_A.hi', 'Check08_A.o', 'Check08_B.hi', 'Check08_B.o']), - multimod_compile_fail, ['Check08', '']) +test('Check08', [], multimod_compile_fail, ['Check08', '']) # check -distrust-all-packages flag works test('Check09', diff --git a/testsuite/tests/safeHaskell/check/pkg01/all.T b/testsuite/tests/safeHaskell/check/pkg01/all.T index 49e4ec20f1..cd89b88ce2 100644 --- a/testsuite/tests/safeHaskell/check/pkg01/all.T +++ b/testsuite/tests/safeHaskell/check/pkg01/all.T @@ -27,13 +27,10 @@ make_args = 'VANILLA=' + vanilla + ' PROF=' + prof + ' DYN=' + dyn # Test building a package, that trust values are set correctly # and can be changed correctly test('safePkg01', - [clean_cmd('$MAKE -s --no-print-directory cleanPackageDatabase.safePkg01'), - normalise_errmsg_fun(ignoreLdOutput), + [normalise_errmsg_fun(ignoreLdOutput), normalise_version("array", "integer-gmp", "integer-simple", "bytestring", - "base", "deepseq", "ghc-prim"), - ], - run_command, - ['$MAKE -s --no-print-directory safePkg01 ' + make_args]) + "base", "deepseq", "ghc-prim")], + run_command, ['$MAKE -s --no-print-directory safePkg01 ' + make_args]) # Fail since we enable package trust test('ImpSafe01', normal, compile_fail, ['-fpackage-trust -distrust base']) @@ -53,67 +50,55 @@ test('ImpSafe03', test('ImpSafe04', normal, compile_fail, ['-fpackage-trust -distrust base']) test('ImpSafeOnly01', - [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly01 ' + make_args), - clean_cmd('$MAKE -s --no-print-directory cleanPackageDatabase.ImpSafeOnly01')], + [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly01 ' + make_args)], compile, ['-fpackage-trust -package-db pdb.ImpSafeOnly01/local.db -trust base']) test('ImpSafeOnly02', - [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly02 ' + make_args), - clean_cmd('$MAKE -s --no-print-directory cleanPackageDatabase.ImpSafeOnly02')], + [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly02 ' + make_args)], compile, ['-fpackage-trust -package-db pdb.ImpSafeOnly02/local.db -trust base -trust safePkg01']) # Fail since we enable package trust (and still need safePkg01 trusted) test('ImpSafeOnly03', - [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly03 ' + make_args), - clean_cmd('$MAKE -s --no-print-directory cleanPackageDatabase.ImpSafeOnly03')], + [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly03 ' + make_args)], compile_fail, ['-fpackage-trust -package-db pdb.ImpSafeOnly03/local.db -trust base']) # Succeed since we don't enable package trust test('ImpSafeOnly04', - [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly04 ' + make_args), - clean_cmd('$MAKE -s --no-print-directory cleanPackageDatabase.ImpSafeOnly04')], - compile, - ['-package-db pdb.ImpSafeOnly04/local.db -trust base']) + [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly04 ' + make_args)], + compile, ['-package-db pdb.ImpSafeOnly04/local.db -trust base']) # fail due to missing trust of safePkg01, next test succeeds. test('ImpSafeOnly05', - [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly05 ' + make_args), - clean_cmd('$MAKE -s --no-print-directory cleanPackageDatabase.ImpSafeOnly05')], + [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly05 ' + make_args)], compile_fail, ['-fpackage-trust -package-db pdb.ImpSafeOnly05/local.db -trust base']) test('ImpSafeOnly06', - [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly06 ' + make_args), - clean_cmd('$MAKE -s --no-print-directory cleanPackageDatabase.ImpSafeOnly06')], + [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly06 ' + make_args)], compile, ['-fpackage-trust -package-db pdb.ImpSafeOnly06/local.db -trust base -trust safePkg01']) # fail due to missing trust test('ImpSafeOnly07', [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly07 ' + make_args), - clean_cmd('$MAKE -s --no-print-directory cleanPackageDatabase.ImpSafeOnly07'), normalise_version("bytestring", "base")], compile_fail, ['-fpackage-trust -package-db pdb.ImpSafeOnly07/local.db -trust safePkg01 -distrust bytestring']) test('ImpSafeOnly08', [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly08 ' + make_args), - clean_cmd('$MAKE -s --no-print-directory cleanPackageDatabase.ImpSafeOnly08'), normalise_version("bytestring", "base")], compile_fail, ['-fpackage-trust -package-db pdb.ImpSafeOnly08/local.db -trust safePkg01']) test('ImpSafeOnly09', [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly09 ' + make_args), - clean_cmd('$MAKE -s --no-print-directory cleanPackageDatabase.ImpSafeOnly09'), normalise_version("bytestring")], compile_fail, ['-fpackage-trust -package-db pdb.ImpSafeOnly09/local.db -trust safePkg01']) # finally succeed test('ImpSafeOnly10', - [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly10 ' + make_args), - clean_cmd('$MAKE -s --no-print-directory cleanPackageDatabase.ImpSafeOnly10')], + [pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly10 ' + make_args)], compile, ['-fpackage-trust -package-db pdb.ImpSafeOnly10/local.db -trust safePkg01 -trust base -trust bytestring']) - diff --git a/testsuite/tests/safeHaskell/overlapping/all.T b/testsuite/tests/safeHaskell/overlapping/all.T index c253850ac1..593a154c85 100644 --- a/testsuite/tests/safeHaskell/overlapping/all.T +++ b/testsuite/tests/safeHaskell/overlapping/all.T @@ -6,57 +6,24 @@ def f( name, opts ): setTestOpts(f) -test('SH_Overlap1', - [ extra_clean(['SH_Overlap1_A.hi', 'SH_Overlap1_A.o', - 'SH_Overlap1_B.hi', 'SH_Overlap1_B.o']) ], - multimod_compile_fail, ['SH_Overlap1', '']) - -test('SH_Overlap2', - [ extra_clean(['SH_Overlap2_A.hi', 'SH_Overlap2_A.o', - 'SH_Overlap2_B.hi', 'SH_Overlap2_B.o']) ], - multimod_compile_fail, ['SH_Overlap2', '']) - -test('SH_Overlap3', - [ extra_clean(['SH_Overlap3_A.hi', 'SH_Overlap3_A.o', - 'SH_Overlap3_B.hi', 'SH_Overlap3_B.o']) ], - multimod_compile, ['SH_Overlap3', '']) - -test('SH_Overlap4', - [ extra_clean(['SH_Overlap4_A.hi', 'SH_Overlap4_A.o', - 'SH_Overlap4_B.hi', 'SH_Overlap4_B.o']) ], - multimod_compile, ['SH_Overlap4', '']) - -test('SH_Overlap5', - [ extra_clean(['SH_Overlap5_A.hi', 'SH_Overlap5_A.o', - 'SH_Overlap5_B.hi', 'SH_Overlap5_B.o']) ], - multimod_compile_fail, ['SH_Overlap5', '']) - -test('SH_Overlap6', - [ extra_clean(['SH_Overlap6_A.hi', 'SH_Overlap6_A.o', - 'SH_Overlap6_B.hi', 'SH_Overlap6_B.o']) ], - multimod_compile_fail, ['SH_Overlap6', '']) - -test('SH_Overlap7', - [ extra_clean(['SH_Overlap7_A.hi', 'SH_Overlap7_A.o', - 'SH_Overlap7_B.hi', 'SH_Overlap7_B.o']) ], - multimod_compile_fail, ['SH_Overlap7', '-Werror']) - -test('SH_Overlap8', - [ extra_clean(['SH_Overlap8_A.hi', 'SH_Overlap8_A.o']) ], - multimod_compile, ['SH_Overlap8', '']) - -test('SH_Overlap9', - [ extra_clean(['SH_Overlap9_A.hi', 'SH_Overlap9_A.o', - 'SH_Overlap9_B.hi', 'SH_Overlap9_B.o']) ], - multimod_compile, ['SH_Overlap9', '-Werror']) - -test('SH_Overlap10', - [ extra_clean(['SH_Overlap10_A.hi', 'SH_Overlap10_A.o', - 'SH_Overlap10_B.hi', 'SH_Overlap10_B.o']) ], - multimod_compile, ['SH_Overlap10', '-Werror']) - -test('SH_Overlap11', - [ extra_clean(['SH_Overlap11_A.hi', 'SH_Overlap11_A.o', - 'SH_Overlap11_B.hi', 'SH_Overlap11_B.o']) ], - multimod_compile, ['SH_Overlap11', '']) +test('SH_Overlap1', [], multimod_compile_fail, ['SH_Overlap1', '']) +test('SH_Overlap2', [], multimod_compile_fail, ['SH_Overlap2', '']) + +test('SH_Overlap3', [], multimod_compile, ['SH_Overlap3', '']) + +test('SH_Overlap4', [], multimod_compile, ['SH_Overlap4', '']) + +test('SH_Overlap5', [], multimod_compile_fail, ['SH_Overlap5', '']) + +test('SH_Overlap6', [], multimod_compile_fail, ['SH_Overlap6', '']) + +test('SH_Overlap7', [], multimod_compile_fail, ['SH_Overlap7', '-Werror']) + +test('SH_Overlap8', [], multimod_compile, ['SH_Overlap8', '']) + +test('SH_Overlap9', [], multimod_compile, ['SH_Overlap9', '-Werror']) + +test('SH_Overlap10', [], multimod_compile, ['SH_Overlap10', '-Werror']) + +test('SH_Overlap11', [], multimod_compile, ['SH_Overlap11', '']) diff --git a/testsuite/tests/safeHaskell/safeInfered/all.T b/testsuite/tests/safeHaskell/safeInfered/all.T index def025049e..c51a0abcce 100644 --- a/testsuite/tests/safeHaskell/safeInfered/all.T +++ b/testsuite/tests/safeHaskell/safeInfered/all.T @@ -8,53 +8,24 @@ def f( name, opts ): setTestOpts(f) # Tests that should compile fine as they should be infered safe -test('SafeInfered01', - [ extra_clean(['SafeInfered01_A.hi', 'SafeInfered01_A.o']) ], - multimod_compile, ['SafeInfered01', '']) -test('SafeInfered02', - [ extra_clean(['SafeInfered02_A.hi', 'SafeInfered02_A.o']) ], - multimod_compile, ['SafeInfered02', '']) -test('SafeInfered03', - [ extra_clean(['SafeInfered03_A.hi', 'SafeInfered03_A.o']) ], - multimod_compile, ['SafeInfered03', '']) -test('SafeInfered04', - [ extra_clean(['SafeInfered04_A.hi', 'SafeInfered04_A.o']) ], - multimod_compile, ['SafeInfered04', '']) -test('SafeInfered05', - [ extra_clean(['SafeInfered05_A.hi', 'SafeInfered05_A.o']) ], - multimod_compile, ['SafeInfered05', '']) +test('SafeInfered01', [], multimod_compile, ['SafeInfered01', '']) +test('SafeInfered02', [], multimod_compile, ['SafeInfered02', '']) +test('SafeInfered03', [], multimod_compile, ['SafeInfered03', '']) +test('SafeInfered04', [], multimod_compile, ['SafeInfered04', '']) +test('SafeInfered05', [], multimod_compile, ['SafeInfered05', '']) # Tests that should fail to compile as they should be infered unsafe -test('UnsafeInfered01', - [ extra_clean(['UnsafeInfered01_A.hi', 'UnsafeInfered01_A.o']) ], - multimod_compile_fail, ['UnsafeInfered01', '']) -test('UnsafeInfered02', - [ extra_clean(['UnsafeInfered02_A.hi', 'UnsafeInfered02_A.o']) ], - multimod_compile_fail, ['UnsafeInfered02', '']) -test('UnsafeInfered03', - [ extra_clean(['UnsafeInfered03_A.hi', 'UnsafeInfered03_A.o']) ], - multimod_compile_fail, ['UnsafeInfered03', '']) -test('UnsafeInfered05', - [ extra_clean(['UnsafeInfered05_A.hi', 'UnsafeInfered05_A.o']) ], - multimod_compile_fail, ['UnsafeInfered05', '']) -test('UnsafeInfered06', - [ extra_clean(['UnsafeInfered06_A.hi', 'UnsafeInfered06_A.o']) ], - multimod_compile_fail, ['UnsafeInfered06', '']) -test('UnsafeInfered08', - [ extra_clean(['UnsafeInfered08_A.hi', 'UnsafeInfered08_A.o']) ], - multimod_compile, ['UnsafeInfered08', '']) -test('UnsafeInfered09', - [ extra_clean(['UnsafeInfered09_A.hi', 'UnsafeInfered09_A.o', - 'UnsafeInfered09_B.hi', 'UnsafeInfered09_B.o']) ], - multimod_compile_fail, ['UnsafeInfered09', '']) +test('UnsafeInfered01', [], multimod_compile_fail, ['UnsafeInfered01', '']) +test('UnsafeInfered02', [], multimod_compile_fail, ['UnsafeInfered02', '']) +test('UnsafeInfered03', [], multimod_compile_fail, ['UnsafeInfered03', '']) +test('UnsafeInfered05', [], multimod_compile_fail, ['UnsafeInfered05', '']) +test('UnsafeInfered06', [], multimod_compile_fail, ['UnsafeInfered06', '']) +test('UnsafeInfered08', [], multimod_compile, ['UnsafeInfered08', '']) +test('UnsafeInfered09', [], multimod_compile_fail, ['UnsafeInfered09', '']) # Test that should fail as we disable safe inference -test('UnsafeInfered10', - [ extra_clean(['UnsafeInfered10_A.hi', 'UnsafeInfered10_A.o']) ], - multimod_compile_fail, ['UnsafeInfered10', '']) -test('UnsafeInfered11', - [ extra_clean(['UnsafeInfered11_A.hi', 'UnsafeInfered11_A.o']) ], - multimod_compile_fail, ['UnsafeInfered11', '']) +test('UnsafeInfered10', [], multimod_compile_fail, ['UnsafeInfered10', '']) +test('UnsafeInfered11', [], multimod_compile_fail, ['UnsafeInfered11', '']) # Test TH is unsafe test('UnsafeInfered12', normal, compile_fail, ['']) diff --git a/testsuite/tests/safeHaskell/safeLanguage/all.T b/testsuite/tests/safeHaskell/safeLanguage/all.T index 8dad0efee6..a8a1bc0d7b 100644 --- a/testsuite/tests/safeHaskell/safeLanguage/all.T +++ b/testsuite/tests/safeHaskell/safeLanguage/all.T @@ -21,35 +21,15 @@ test('SafeLang05', normal, compile_and_run, ['']) test('SafeLang07', normal, compile_fail, ['']) test('SafeLang08', normal, compile_fail, ['']) -test('SafeLang09', - [exit_code(1), - extra_clean(['SafeLang09_A.o', 'SafeLang09_A.hi', - 'SafeLang09_B.o', 'SafeLang09_B.hi'])], - compile_and_run, - ['']) -test('SafeLang10', - extra_clean(['SafeLang10_A.o', 'SafeLang10_A.hi', - 'SafeLang10_B.o', 'SafeLang10_B.hi']), - multimod_compile_fail, - ['SafeLang10', '']) -test('SafeLang11', - [req_interp, - extra_clean(['SafeLang11_A.o', 'SafeLang11_A.hi', - 'SafeLang11_B.o', 'SafeLang11_B.hi'])], - multimod_compile_and_run, +test('SafeLang09', [exit_code(1)], compile_and_run, ['']) +test('SafeLang10', [], multimod_compile_fail, ['SafeLang10', '']) +test('SafeLang11', [req_interp], multimod_compile_and_run, ['SafeLang11', config.ghc_th_way_flags]) test('SafeLang12', normal, multimod_compile_fail, ['SafeLang12', '']) -test('SafeLang15', - [exit_code(1), - extra_clean(['SafeLang15_A.o', 'SafeLang15_A.hi'])], - multimod_compile_and_run, +test('SafeLang15', [exit_code(1)], multimod_compile_and_run, ['SafeLang15', '-XSafe']) test('SafeLang16', normal, compile, ['']) -test('SafeLang17', - extra_clean(['SafeLang17_A.o', 'SafeLang17_A.hi', - 'SafeLang17_B.o', 'SafeLang17_B.hi']), - multimod_compile_fail, - ['SafeLang17', '']) +test('SafeLang17', [], multimod_compile_fail, ['SafeLang17', '']) test('SafeLang18', normal, compile, ['']) |