Skip to content

Commit

Permalink
CPlot - validCassiopee: detect PModules tests versioned using svn or git
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentcasseau committed Dec 12, 2024
1 parent 1f8b9b0 commit 8aa2bf0
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions Cassiopee/CPlot/apps/validCassiopee.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,23 +381,27 @@ def _setModuleDirs(cassiopeeIncDir, fastIncDir, pmodulesIncDir, loc='LOCAL'):

try: mods = os.listdir(path)
except: mods = []
for i in mods:
if i not in notTested and i not in MODULESDIR[loc]:
if loc == 'GLOBAL' and i not in MODULESDIR['LOCAL']:
for mod in mods:
if mod not in notTested and mod not in MODULESDIR[loc]:
if loc == 'GLOBAL' and mod not in MODULESDIR['LOCAL']:
# Skip modules which aren't found locally - would hang
continue
a = os.access(os.path.join(path, i, 'test'), os.F_OK)
if a: MODULESDIR[loc][i] = path
pathMod = os.path.join(path, mod)
a = os.access(os.path.join(pathMod, 'test'), os.F_OK) # PModules svn
if a: MODULESDIR[loc][mod] = path
else:
a = os.access(os.path.join(pathMod, mod, 'test'), os.F_OK) # PModules git
if a: MODULESDIR[loc][mod] = pathMod

print('Info: getting {} module names in: {}.'.format(
loc.lower(), cassiopeeIncDir))
try: mods = os.listdir(cassiopeeIncDir)
except: mods = []
for i in mods:
if i not in MODULESDIR[loc]:
a = os.access(os.path.join(cassiopeeIncDir, i, 'test'), os.F_OK)
for mod in mods:
if mod not in MODULESDIR[loc]:
a = os.access(os.path.join(cassiopeeIncDir, mod, 'test'), os.F_OK)
if a:
MODULESDIR[loc][i] = cassiopeeIncDir
MODULESDIR[loc][mod] = cassiopeeIncDir

# Validation CFD
MODULESDIR[loc]['CFDBase'] = os.path.dirname(os.path.dirname(cassiopeeIncDir))
Expand Down

0 comments on commit 8aa2bf0

Please sign in to comment.