--- a/tests/compare.py Fri Oct 19 22:46:20 2007 -0400 +++ b/tests/compare.py Fri Oct 19 23:03:17 2007 -0400 @@ -55,7 +55,7 @@ setattr(self, 'options', kwargs.get('options', '-n').split()) setattr(self, 'filenames', kwargs.get('filenames', '').split()) for key in ('directory', 'prerun', 'posttest', 'baseline', 'error', - 'grep', 'antigrep', 'input', 'output'): + 'grep', 'antigrep', 'input', 'output', 'cleanup'): setattr(self, key, kwargs.get(key, None)) def get_results(self, commands, stdin=None): @@ -102,6 +102,9 @@ return subprocess.call(['sh', TESTSCRIPT_NAME]) def clean(self): + if self.cleanup is not None: + self.write_script(self.cleanup) + subprocess.call(['sh', TESTSCRIPT_NAME]) if self.directory: target = os.path.join(ROOT_DIR, self.directory) extra_options = ['!', '-name', TESTSCRIPT_NAME]