Skip to content
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
6 changes: 1 addition & 5 deletions cmake/ccpp_capgen.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# CMake wrapper for ccpp_capgen.py
# Currently meant to be a CMake API needed for generating caps for regression tests.
#
# CAPGEN_DEBUG - ON/OFF (Default: OFF) - Enables debug capability through ccpp_capgen.py
# CAPGEN_EXPECT_THROW_ERROR - ON/OFF (Default: OFF) - Scans ccpp_capgen.py log for error string and errors if not found.
# HOST_NAME - String name of host
# OUTPUT_ROOT - String path to put generated caps
Expand All @@ -10,7 +9,7 @@
# SCHEMEFILES - CMake list of scheme metadata files
# SUITES - CMake list of suite xml files
function(ccpp_capgen)
set(optionalArgs CAPGEN_DEBUG CAPGEN_EXPECT_THROW_ERROR)
set(optionalArgs CAPGEN_EXPECT_THROW_ERROR)
set(oneValueArgs HOST_NAME OUTPUT_ROOT VERBOSITY KIND_SPECS)
set(multi_value_keywords HOSTFILES SCHEMEFILES SUITES)

Expand All @@ -23,9 +22,6 @@ function(ccpp_capgen)
endif()

# Interpret parsed arguments
if(DEFINED arg_CAPGEN_DEBUG)
list(APPEND CCPP_CAPGEN_CMD_LIST "--debug")
endif()
if(DEFINED arg_HOSTFILES)
list(JOIN arg_HOSTFILES "," HOSTFILES_SEPARATED)
list(APPEND CCPP_CAPGEN_CMD_LIST "--host-files" "${HOSTFILES_SEPARATED}")
Expand Down
21 changes: 2 additions & 19 deletions scripts/framework_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def __init__(self, logger, ndict=None, verbose=0, clean=False,
host_files=None, scheme_files=None, suites=None,
preproc_directives=[], generate_docfiles=False, host_name='',
kind_types=[], use_error_obj=False, force_overwrite=False,
output_root=os.getcwd(), ccpp_datafile="datatable.xml",
debug=False):
output_root=os.getcwd(), ccpp_datafile="datatable.xml"):
"""Initialize a new CCPPFrameworkEnv object from the input arguments.
<ndict> is a dict with the parsed command-line arguments (or a
dictionary created with the necessary arguments).
Expand Down Expand Up @@ -230,13 +229,6 @@ def __init__(self, logger, ndict=None, verbose=0, clean=False,
self.__datatable_file = os.path.join(self.output_dir,
self.datatable_file)
# end if
# Enable or disable variable allocation checks
if ndict and ('debug' in ndict):
self.__debug = ndict['debug']
del ndict['debug']
else:
self.__debug = debug
# end if
self.__logger = logger
## Check to see if anything is left in dictionary
if ndict:
Expand Down Expand Up @@ -369,7 +361,7 @@ def kind_types(self):

@property
def verbose(self):
"""Return true if debug enabled for the CCPPFrameworkEnv's
"""Return true if verbose enabled for the CCPPFrameworkEnv's
logger object."""
return (self.logger and verbose(self.logger))

Expand Down Expand Up @@ -402,12 +394,6 @@ def datatable_file(self):
CCPPFrameworkEnv object."""
return self.__datatable_file

@property
def debug(self):
"""Return the <debug> property for this
CCPPFrameworkEnv object."""
return self.__debug

@property
def logger(self):
"""Return the <logger> property for this CCPPFrameworkEnv object."""
Expand Down Expand Up @@ -483,9 +469,6 @@ def parse_command_line(args, description, logger=None):
help="""Overwrite all CCPP-generated files, even
if unmodified""")

parser.add_argument("--debug", action='store_true', default=False,
help="Add variable allocation checks to assist debugging")

parser.add_argument("--verbose", action='count', default=0,
help="Log more activity, repeat for increased output")

Expand Down
342 changes: 9 additions & 333 deletions scripts/suite_objects.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ There are several `<options>...` to enable tests:
5) `-DCCPP_RUN_VAR_COMPATIBILITY_TEST=ON` Turns on only the variable compatibility test
5) `-DCCPP_RUN_NESTED_SUITE_TEST=ON` Turns on only the nested suite test

By default, the tests will build in release mode. To enable debug mode, you will need to set the build type: `-DCMAKE_BUILD_TYPE=Release` (or if you want release with debug symbols: `-DCMAKE_BUILD_TYPE=RelWithDebInfo`).
By default, the tests will build in debug mode. To enable release mode, you will need to set the build type: `-DCMAKE_BUILD_TYPE=Release` (or if you want release with debug symbols: `-DCMAKE_BUILD_TYPE=RelWithDebInfo`).

To enable more verbose output for `ccpp_capgen.py`, add `-DCCPP_VERBOSITY=<n>` to the `cmake` command line arguments where `n={1,2,3}` (`n=0` or no verbosity by default).

Expand Down
4 changes: 1 addition & 3 deletions test/advection_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ list(APPEND ADVECTION_HOST_METADATA_FILES "${HOST}.meta")

# Run ccpp_capgen that we expect to fail
ccpp_capgen(CAPGEN_EXPECT_THROW_ERROR ON
CAPGEN_DEBUG ON
VERBOSITY ${CCPP_VERBOSITY}
HOSTFILES ${ADVECTION_HOST_METADATA_FILES}
SCHEMEFILES ${SCHEME_ERROR_META_FILES}
Expand All @@ -31,8 +30,7 @@ ccpp_capgen(CAPGEN_EXPECT_THROW_ERROR ON
OUTPUT_ROOT "${CCPP_CAP_FILES}")

# Run ccpp_capgen
ccpp_capgen(CAPGEN_DEBUG ON
VERBOSITY ${CCPP_VERBOSITY}
ccpp_capgen(VERBOSITY ${CCPP_VERBOSITY}
HOSTFILES ${ADVECTION_HOST_METADATA_FILES}
SCHEMEFILES ${SCHEME_META_FILES}
SUITES ${SUITE_FILES}
Expand Down
3 changes: 1 addition & 2 deletions test/capgen_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ list(TRANSFORM HOST_FILES APPEND ".meta" OUTPUT_VARIABLE CAPGEN_HOST_MET

list(APPEND CAPGEN_HOST_METADATA_FILES "${HOST}.meta")

ccpp_capgen(CAPGEN_DEBUG ON
VERBOSITY ${CCPP_VERBOSITY}
ccpp_capgen(VERBOSITY ${CCPP_VERBOSITY}
HOSTFILES ${CAPGEN_HOST_METADATA_FILES}
SCHEMEFILES ${SCHEME_META_FILES} ${SUITE_SCHEME_META_FILES}
SUITES ${SUITE_FILES}
Expand Down
3 changes: 1 addition & 2 deletions test/ddthost_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ list(TRANSFORM HOST_FILES APPEND ".meta" OUTPUT_VARIABLE DDT_HOST_METADA
list(APPEND DDT_HOST_METADATA_FILES "${HOST}.meta")

# Run ccpp_capgen
ccpp_capgen(CAPGEN_DEBUG ON
VERBOSITY ${CCPP_VERBOSITY}
ccpp_capgen(VERBOSITY ${CCPP_VERBOSITY}
HOSTFILES ${DDT_HOST_METADATA_FILES}
SCHEMEFILES ${SCHEME_META_FILES} ${SUITE_SCHEME_META_FILES}
SUITES ${SUITE_FILES}
Expand Down
3 changes: 1 addition & 2 deletions test/nested_suite_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ list(TRANSFORM HOST_FILES APPEND ".meta" OUTPUT_VARIABLE NESTED_SUITE_HOST_MET
list(APPEND NESTED_SUITE_HOST_METADATA_FILES "${HOST}.meta")

# Run ccpp_capgen
ccpp_capgen(CAPGEN_DEBUG ON
VERBOSITY ${CCPP_VERBOSITY}
ccpp_capgen(VERBOSITY ${CCPP_VERBOSITY}
HOSTFILES ${NESTED_SUITE_HOST_METADATA_FILES}
SCHEMEFILES ${SCHEME_META_FILES}
SUITES ${SUITE_FILES}
Expand Down
3 changes: 1 addition & 2 deletions test/var_compatibility_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ list(TRANSFORM HOST_FILES APPEND ".meta" OUTPUT_VARIABLE VAR_COMPATIBILITY_HOS
list(APPEND VAR_COMPATIBILITY_HOST_METADATA_FILES "${HOST}.meta")

# Run ccpp_capgen
ccpp_capgen(CAPGEN_DEBUG ON
VERBOSITY ${CCPP_VERBOSITY}
ccpp_capgen(VERBOSITY ${CCPP_VERBOSITY}
HOSTFILES ${VAR_COMPATIBILITY_HOST_METADATA_FILES}
SCHEMEFILES ${SCHEME_META_FILES}
SUITES ${SUITE_FILES}
Expand Down