Remove clean_cmd and extra_clean usage from .T files
ClosedPublic

Authored by thomie on Jan 22 2017, 8:56 AM.

Details

Summary

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 Trac #12223.

Test Plan

Harbormaster

thomie updated this revision to Diff 10610.Jan 22 2017, 8:56 AM
thomie retitled this revision from to Remove clean_cmd and extra_clean usage from .T files.
thomie updated this object.
thomie edited the test plan for this revision. (Show Details)
thomie updated the Trac tickets for this revision.

Does this commit remove extra_clean somewhere?

Does this commit remove extra_clean somewhere?

Yes. Take a look at for example libraries/base/tests/all.T or testsuite/tests/cabal/all.T and many others.

If you look at the definition of extra_clean, it is a noop:

def extra_clean( files ):
    # TODO. Remove all calls to extra_clean.
    return lambda _name, _opts: None
In D3000#87731, @thomie wrote:

Does this commit remove extra_clean somewhere?

Yes. Take a look at for example libraries/base/tests/all.T or testsuite/tests/cabal/all.T and many others.

If you look at the definition of extra_clean, it is a noop:

def extra_clean( files ):
    # TODO. Remove all calls to extra_clean.
    return lambda _name, _opts: None

I mean, does it remove the definition so that it is definitely removed everywhere?

I mean, does it remove the definition so that it is definitely removed everywhere?

Ah. I didn't remove the definitions yet, because some submodules still call extra_clean/clean_cmd. My script doesn't update tests that are sprinkled with (carefully formatted) comments either. All this can be done by hand at a later point.

mpickering accepted this revision.Jan 22 2017, 11:51 AM
mpickering added a reviewer: mpickering.

OK, great. Please land this before you have to rebase.

This revision is now accepted and ready to land.Jan 22 2017, 11:51 AM
bgamari edited edge metadata.Jan 22 2017, 12:24 PM

Thanks for this @thomie. I'll land this right now.

This revision was automatically updated to reflect the committed changes.