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/cabal | |
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/cabal')
-rw-r--r-- | testsuite/tests/cabal/T12485/all.T | 5 | ||||
-rw-r--r-- | testsuite/tests/cabal/all.T | 103 | ||||
-rw-r--r-- | testsuite/tests/cabal/pkg02/all.T | 6 |
3 files changed, 24 insertions, 90 deletions
diff --git a/testsuite/tests/cabal/T12485/all.T b/testsuite/tests/cabal/T12485/all.T index be817eb274..f6998973ea 100644 --- a/testsuite/tests/cabal/T12485/all.T +++ b/testsuite/tests/cabal/T12485/all.T @@ -1,4 +1 @@ -test('T12485', - [extra_clean(['a.db', 'b.db', 'Main.o', 'Main', 'Main.hi'])], - run_command, - ['$MAKE -s --no-print-directory T12485']) +test('T12485', [], run_command, ['$MAKE -s --no-print-directory T12485']) diff --git a/testsuite/tests/cabal/all.T b/testsuite/tests/cabal/all.T index 64f26396c4..fc7269c4f3 100644 --- a/testsuite/tests/cabal/all.T +++ b/testsuite/tests/cabal/all.T @@ -1,25 +1,14 @@ def normaliseDynlibNames(str): return re.sub('-ghc[0-9.]+\.', '-ghc<VERSION>.', str) -test('ghcpkg01', - extra_clean(['local01.package.conf', - 'local01.package.conf.old']), - run_command, - ['$MAKE -s --no-print-directory ghcpkg01']) +test('ghcpkg01', [], run_command, ['$MAKE -s --no-print-directory ghcpkg01']) # Use ignore_stderr to prevent (when HADDOCK_DOCS=NO): # warning: haddock-interfaces .. doesn't exist or isn't a file -test('ghcpkg02', - [ignore_stderr, - extra_clean(['package.conf.ghcpkg02', 'package.conf.ghcpkg02.old'])], - run_command, +test('ghcpkg02', [ignore_stderr], run_command, ['$MAKE -s --no-print-directory ghcpkg02']) -test('ghcpkg03', - [extra_clean(['local03.package.conf', - 'local03.package.conf.old']), - normalise_errmsg_fun(normaliseDynlibNames)], - run_command, +test('ghcpkg03', [normalise_errmsg_fun(normaliseDynlibNames)], run_command, ['$MAKE -s --no-print-directory ghcpkg03']) def normalise_package_order(s): @@ -28,12 +17,7 @@ def normalise_package_order(s): 'newtestpkg-2.0 testpkg-1.2.3.4', s) -test('ghcpkg04', - [ - normalise_errmsg_fun(normalise_package_order), - extra_clean(['local04.package.conf', - 'local04.package.conf.old'])], - run_command, +test('ghcpkg04', [normalise_errmsg_fun(normalise_package_order)], run_command, ['$MAKE -s --no-print-directory ghcpkg04']) # Sometimes we get spurious warnings from ghc-pkg about missing @@ -42,69 +26,26 @@ def normalise_haddock_junk( str ): return re.sub(r'Warning: haddock.*\n', '', str) test('ghcpkg05', - [ extra_clean(['local05a.package.conf', - 'local05a.package.conf.old', - 'local05b.package.conf', - 'local05b.package.conf.old']), - normalise_errmsg_fun(normalise_haddock_junk, normaliseDynlibNames) - ], - run_command, - ['$MAKE -s --no-print-directory ghcpkg05']) -test('ghcpkg06', - [extra_clean(['local06.package.conf', - 'local06.package.conf.old'])], - run_command, - ['$MAKE -s --no-print-directory ghcpkg06']) - -test('ghcpkg07', - extra_clean(['local07.package.conf', - 'local07.package.conf.old']), - run_command, - ['$MAKE -s --no-print-directory ghcpkg07']) + [normalise_errmsg_fun(normalise_haddock_junk, normaliseDynlibNames)], + run_command, ['$MAKE -s --no-print-directory ghcpkg05']) +test('ghcpkg06', [], run_command, ['$MAKE -s --no-print-directory ghcpkg06']) + +test('ghcpkg07', [], run_command, ['$MAKE -s --no-print-directory ghcpkg07']) # Test that we *can* compile a module that also belongs to a package # (this was disallowed in GHC 6.4 and earlier) test('pkg01', normal, compile, ['']) -test('T1750', - extra_clean(['T1750.hs', 'T1750.out', - 'localT1750.package.conf', - 'localT1750.package.conf.old']), - run_command, ['$MAKE -s --no-print-directory T1750']) - -test('T5442a', - [extra_clean(['package.conf.T5442a.global', 'package.conf.T5442a.user'])], - run_command, - ['$MAKE -s --no-print-directory T5442a']) - -test('T5442b', - [extra_clean(['package.conf.T5442b.global', 'package.conf.T5442b.user'])], - run_command, - ['$MAKE -s --no-print-directory T5442b']) - -test('T5442c', - [extra_clean(['package.conf.T5442c.global', 'package.conf.T5442c.user', - 'package.conf.T5442c.extra'])], - run_command, - ['$MAKE -s --no-print-directory T5442c']) - -test('T5442d', - [extra_clean(['package.conf.T5442d.global', 'package.conf.T5442d.user', - 'package.conf.T5442d.extra'])], - run_command, - ['$MAKE -s --no-print-directory T5442d']) - -test('shadow', - extra_clean(['shadow.out', 'shadow.hs', 'shadow.hi', - 'local1shadow1.package.conf', - 'local1shadow1.package.conf.old', - 'local1shadow2.package.conf', - 'local1shadow2.package.conf.old']), - run_command, ['$MAKE -s --no-print-directory shadow']) - -test('T12485a', - extra_clean(['T12485a.hi', 'T1750.out', - 'T12485a.package.conf', - 'T12485b.package.conf', - 'T12485c.package.conf']), - run_command, ['$MAKE -s --no-print-directory T12485a']) +test('T1750', [], run_command, ['$MAKE -s --no-print-directory T1750']) + +test('T5442a', [], run_command, ['$MAKE -s --no-print-directory T5442a']) + +test('T5442b', [], run_command, ['$MAKE -s --no-print-directory T5442b']) + +test('T5442c', [], run_command, ['$MAKE -s --no-print-directory T5442c']) + +test('T5442d', [], run_command, ['$MAKE -s --no-print-directory T5442d']) + +test('shadow', [], run_command, ['$MAKE -s --no-print-directory shadow']) + +test('T12485a', [], run_command, ['$MAKE -s --no-print-directory T12485a']) diff --git a/testsuite/tests/cabal/pkg02/all.T b/testsuite/tests/cabal/pkg02/all.T index b3dfecc0b5..651e9f903b 100644 --- a/testsuite/tests/cabal/pkg02/all.T +++ b/testsuite/tests/cabal/pkg02/all.T @@ -3,8 +3,4 @@ # separate packages are allowed). Now it is a straightforward test # for shadowing: the local Foreign module shadows the base package # one. -test('pkg02', - [extra_clean(['A.o', 'A.hi', 'Foreign.o', 'Foreign.hi'])], - multimod_compile, - ['A','-v0']) - +test('pkg02', [], multimod_compile, ['A', '-v0']) |