Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct paths used by ecFlow Python tests #93

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions libs/pyext/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import glob
# To test install manually, we can:
# python3 setup.py --help-commands # help
#
# cd $WK/Pyext
# cd $WK/libs/pyext
# rm -rf build/ # for a clean build
# python setup.py build_ext # build C/C++ extensions (compile/link to build directory)
# python setup.py install --home=~
Expand All @@ -40,30 +40,30 @@ import glob
# to get this to work, you will need to include the path
# to your boost installation and ecflow includes
boost_root=os.getenv("BOOST_ROOT")
include_dirs = [ "@CMAKE_CURRENT_SOURCE_DIR@/../cereal/include",
"@CMAKE_CURRENT_SOURCE_DIR@/../ACore/src",
"@CMAKE_CURRENT_SOURCE_DIR@/../ANattr/src",
"@CMAKE_CURRENT_SOURCE_DIR@/../ANode/parser/src",
"@CMAKE_CURRENT_SOURCE_DIR@/../ANode/src",
"@CMAKE_CURRENT_SOURCE_DIR@/../Base/src",
"@CMAKE_CURRENT_SOURCE_DIR@/../Base/src/cts",
"@CMAKE_CURRENT_SOURCE_DIR@/../Base/src/stc",
"@CMAKE_CURRENT_SOURCE_DIR@/../CSim/src",
"@CMAKE_CURRENT_SOURCE_DIR@/../Client/src",
include_dirs = [ "@CMAKE_CURRENT_SOURCE_DIR@/../3rdparty/cereal/include",
"@CMAKE_CURRENT_SOURCE_DIR@/../libs/core/src",
"@CMAKE_CURRENT_SOURCE_DIR@/../libs/attribute/src",
"@CMAKE_CURRENT_SOURCE_DIR@/../libs/node/parser/src",
"@CMAKE_CURRENT_SOURCE_DIR@/../libs/node/src",
"@CMAKE_CURRENT_SOURCE_DIR@/../libs/base/src",
"@CMAKE_CURRENT_SOURCE_DIR@/../libs/base/src/cts",
"@CMAKE_CURRENT_SOURCE_DIR@/../libs/base/src/stc",
"@CMAKE_CURRENT_SOURCE_DIR@/../libs/simulator/src",
"@CMAKE_CURRENT_SOURCE_DIR@/../libs/client/src",
"@CMAKE_CURRENT_SOURCE_DIR@/src",
boost_root,
]

# define the library directories to include any extra libraries that may be needed.
# Give preference to release libs
boost_lib_dir = boost_root + "/stage/lib/"
library_dirs = ['@CMAKE_BINARY_DIR@/ACore',
'@CMAKE_BINARY_DIR@/ANattr/',
'@CMAKE_BINARY_DIR@/ANode/',
'@CMAKE_BINARY_DIR@/Base/',
'@CMAKE_BINARY_DIR@/CSim/',
'@CMAKE_BINARY_DIR@/Client/',
boost_lib_dir
library_dirs = ['@CMAKE_BINARY_DIR@/libs/core',
'@CMAKE_BINARY_DIR@/libs/attribute/',
'@CMAKE_BINARY_DIR@/libs/node/',
'@CMAKE_BINARY_DIR@/libs/base/',
'@CMAKE_BINARY_DIR@/libs/simulator/',
'@CMAKE_BINARY_DIR@/libs/client/',
boost_lib_dir,
]

# define the libraries to link with this includes the boost lib
Expand Down
2 changes: 1 addition & 1 deletion libs/pyext/test/py_s_TestPythonChildApi.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import ecflow_test_util as Test


def ecf_includes() : return File.source_dir() + "/Pyext" + "/test/data/python_includes"
def ecf_includes(): return File.source_dir() + "/libs/pyext/test/data/python_includes"

def create_defs(name,the_port):
defs = Defs()
Expand Down
6 changes: 3 additions & 3 deletions libs/pyext/test/py_u_TestTraversal.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ def all_files(root, patterns='*', single_level=False, yield_folders=False):

# Traverse all the good defs in the Parser directory
newpath = ""
if os.path.basename(cwd) == "Pyext":
newpath = os.path.join( os.path.dirname(cwd),"ANode/parser/test/data/good_defs" )
if os.path.basename(cwd) == "libs/pyext":
newpath = os.path.join( os.path.dirname(cwd),"libs/node/parser/test/data/good_defs" )

#print newpath
for path_to_defs_file in all_files(newpath, '*.def;*.txt'):
check_traversal(path_to_defs_file)

# try the mega_def. Commented out since it takes to long
#mega_def = os.path.join( os.path.dirname(cwd), "ANode/parser/test/data/single_defs/mega.def")
#mega_def = os.path.join( os.path.dirname(cwd), "libs/node/parser/test/data/single_defs/mega.def")
#check_traversal(mega_def)
print("All Tests pass")
Loading