1import os 2import lit.formats 3 4class CustomFormat(lit.formats.ShTest): 5 def getTestsForPath(self, testSuite, path_in_suite, litConfig, localConfig): 6 for sub in ['one.test', 'two.test']: 7 basePath = os.path.dirname(testSuite.getExecPath(path_in_suite)) 8 os.makedirs(basePath, exist_ok=True) 9 generatedFile = os.path.join(basePath, sub) 10 with open(generatedFile, 'w') as f: 11 f.write('RUN: true') 12 yield lit.Test.Test(testSuite, (generatedFile, ), localConfig) 13