Skip to content

Commit

Permalink
lit support softcounter feature for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ahueck committed Dec 29, 2020
1 parent 11c5b82 commit 4fe7358
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ function(configure_typeart_lit_site_cfg input output)
set(TYPEARTPASS_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib/passes)
set(TYPEARTPASS_RT_DIR ${CMAKE_BINARY_DIR}/lib/runtime)
set(TYPEARTPASS_PROFILE_FILE ${TYPEART_PROFILE_DIR}/lit-code-%p.profraw)
if(SOFTCOUNTERS)
set(TYPEARTPASS_SOFTCOUNTER True)
else()
set(TYPEARTPASS_SOFTCOUNTER False)
endif()

set(LIT_SITE_CFG_IN_HEADER "## Autogenerated from ${input}\n## Do not edit!")

configure_file(${input} ${output} @ONLY)
Expand Down
3 changes: 3 additions & 0 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ config.test_format = lit.formats.ShTest(execute_external=True)
config.suffixes = ['.c','.cpp', '.llin']
config.excludes = ['Inputs', 'mpi_interceptor', 'lulesh']

if config.softcounter_used:
config.available_features.add('softcounter')

profile_files = getattr(config, 'profile_file', None)
typeart_lib_root = getattr(config, 'typeartpass_lib_dir', None)
typeart_rt_root = getattr(config, 'typeartpass_rt_dir', None)
Expand Down
2 changes: 2 additions & 0 deletions test/lit.site.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ config.typeartpass_lib_dir = "@TYPEARTPASS_LIBRARY_DIR@"
config.typeartpass_rt_dir = "@TYPEARTPASS_RT_DIR@"
config.typeartpass_script_dir = "@TYPEARTPASS_SCRIPT_DIR@"
config.profile_file = "@TYPEARTPASS_PROFILE_FILE@"
config.softcounter_used = @TYPEARTPASS_SOFTCOUNTER@


# Let the main config do the real work.
config.loaded_site_config = True
Expand Down

0 comments on commit 4fe7358

Please sign in to comment.