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

allow --compiler and --mpilib #1804

Merged
merged 3 commits into from
Aug 11, 2017
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
16 changes: 15 additions & 1 deletion scripts/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#
# Environment variables CIME_COMPILER and CIME_MPILIB
# can be used to send --compiler and --mpilib settings to scripts_regression_tests.py
#

cmake_minimum_required(VERSION 2.8)

include(CTest)
Expand All @@ -8,9 +13,18 @@ execute_process(COMMAND "python" "list_tests" OUTPUT_VARIABLE STR_TESTS
ERROR_STRIP_TRAILING_WHITESPACE)
separate_arguments(TEST_LIST UNIX_COMMAND ${STR_TESTS})

set(args "")
if (DEFINED ENV{CIME_COMPILER})
set(args "--compiler $ENV{CIME_COMPILER}")
endif()
if (DEFINED ENV{CIME_MPILIB})
set(args "${args} --mpilib $ENV{CIME_MPILIB}")
endif()
separate_arguments(ARG_LIST UNIX_COMMAND ${args})

foreach(ATEST ${TEST_LIST})
# this assignment prevents quotes being added to testname in add_test
set(fulltest "${ATEST}")
add_test(NAME ${ATEST} COMMAND ./scripts_regression_tests.py -v ${fulltest}
add_test(NAME ${ATEST} COMMAND ./scripts_regression_tests.py -v ${fulltest} ${ARG_LIST}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endforeach(ATEST)
20 changes: 19 additions & 1 deletion scripts/tests/CTestConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#
# Environment variables CIME_COMPILER and CIME_MPILIB
# can be used to send --compiler and --mpilib settings to scripts_regression_tests.py
#

set(CTEST_PROJECT_NAME "CIME")
string(TIMESTAMP CURRTIME "%H:%M:%S" UTC)
set(CTEST_NIGHTLY_START_TIME "${CURRTIME} UTC")
Expand All @@ -10,4 +15,17 @@ set(CTEST_DROP_SITE_CDASH TRUE)
set(CTEST_TEST_TIMEOUT 82800 CACHE STRING "")
set(DART_TESTING_TIMEOUT 82800 CACHE STRING "")

set(BUILDNAME "cime_regression_$ENV{SHELL}")
set(shell $ENV{SHELL})

if (DEFINED ENV{CIME_COMPILER})
set(compiler $ENV{CIME_COMPILER})
else()
set(compiler "default")
endif()
if (DEFINED ENV{CIME_MPILIB})
set(mpilib $ENV{CIME_MPILIB})
else()
set(mpilib "default")
endif()

set(BUILDNAME "scripts_regression_${shell}_${compiler}_${mpilib}")