Example #1
0
 def findAllCodeModulePaths( self, searchPaths ):
     from ctx_cmod import isContexoCodeModule, CTXRawCodeModule
 
     searchPaths = assureList ( searchPaths )
 
     pathList = list ()
     for path in searchPaths:
         codeModulePaths = []
 
         if len(codeModulePaths) == 0:
             try:
                 pathCandidates = os.listdir( path )
             except OSError, (errno,  errmsg):
                 userErrorExit("Could not list directory '%s': %s"%(path,  errmsg))
             for cand in pathCandidates:
                 candPath = os.path.join( path, cand )
                 if isContexoCodeModule( candPath ) == True:
                     emptyPathList = list()
                     unitTestDummyValue = False
                     mod = CTXRawCodeModule(candPath, emptyPathList, unitTestDummyValue, self.archPath, self.legacyCompilingMod, self.globalOutputDir,bc = self.bc)
                     codeModulePaths.append( mod.getPubHeaderDir() )
                     codeModulePaths.append( mod.getPrivHeaderDir() )
                     codeModulePaths.append( mod.getSourceDir () )
                     codeModulePaths.append( mod.getTestDir () )
         pathList.extend( codeModulePaths )
Example #2
0
def findAllCodeModulPaths( searchPaths ):
    from ctx_cmod import isContexoCodeModule, CTXRawCodeModule

    searchPaths = assureList ( searchPaths )

    pathList = list ()
    for path in searchPaths:
        codeModulePaths = []

        if len(codeModulePaths) == 0:
            try:
                pathCandidates = os.listdir( path )
            except OSError, (errno,  errmsg):
                userErrorExit("Could not list directory '%s': %s"%(path,  errmsg))
            for cand in pathCandidates:
                candPath = os.path.join( path, cand )
                if isContexoCodeModule( candPath ) == True:
                    mod = CTXRawCodeModule(candPath)
                    codeModulePaths.append( mod.getPubHeaderDir() )
                    codeModulePaths.append( mod.getPrivHeaderDir() )
                    codeModulePaths.append( mod.getSourceDir () )
                    codeModulePaths.append( mod.getTestDir () )
        pathList.extend( codeModulePaths )