Skip to content

Commit

Permalink
ccmlib/common: extract scylla modes into a list
Browse files Browse the repository at this point in the history
restructure isScylla() by extracting the scylla modes into a list,
to prepare for the changes for working with CMake generated scylla
executable, which is located under paths like build/Debug/scylla
instead of build/debug/scylla.

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov authored and fruch committed Jan 17, 2024
1 parent e7313b0 commit 3241e5f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions ccmlib/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,11 +591,15 @@ def isScylla(install_dir):

raise ArgumentError('Undefined installation directory')

return (os.path.exists(os.path.join(install_dir, 'scylla')) or
os.path.exists(os.path.join(install_dir, 'build', 'debug', 'scylla')) or
os.path.exists(os.path.join(install_dir, 'build', 'dev', 'scylla')) or
os.path.exists(os.path.join(install_dir, 'build', 'release', 'scylla')) or
os.path.exists(os.path.join(install_dir, 'bin', 'scylla')))
if os.path.exists(os.path.join(install_dir, 'scylla')):
return True

scylla_build_modes = ['debug', 'dev', 'release']
for mode in scylla_build_modes:
if os.path.exists(os.path.join(install_dir, 'build', mode, 'scylla')):
return True

return os.path.exists(os.path.join(install_dir, 'bin', 'scylla'))


def isOpscenter(install_dir):
Expand Down

0 comments on commit 3241e5f

Please sign in to comment.