Skip to content
  • Johnny Chen's avatar
    Provided a mechanism for the test class to cleanup after itself once it's done. · 1a9f4dd5
    Johnny Chen authored
    This will remove the confusion experienced when previous test runs left some
    files (both intermediate or by-product as a result of the test).
    
    lldbtest.TestBase defines a classmethod tearDownClass(cls) which invokes the
    platform-specific cleanup() function as defined by the plugin; after that, it
    invokes a subclass-specific function classCleanup(cls) if defined; and, finally,
    it restores the old working directory.
    
    An example of classCleanup(cls) is in settings/TestSettings.py:
    
        @classmethod
        def classCleanup(cls):
            system(["/bin/sh", "-c", "rm output.txt"])
    
    where it deletes the by-product "output.txt" as a result of running a.out.
    
    llvm-svn: 114058
    1a9f4dd5
Loading