Skip to content

Commit

Permalink
Merge branch 'master' into tril-13133-TriBITS-Update-License-and-Copy…
Browse files Browse the repository at this point in the history
…right-2
  • Loading branch information
bartlettroscoe authored Aug 1, 2024
2 parents 58368d1 + 6c9a725 commit ba8a8ae
Show file tree
Hide file tree
Showing 50 changed files with 180 additions and 74 deletions.
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ check-filenames =
check-hidden =
# Disable warnings about binary files
quiet-level = 2
skip = */.git,*/common_tools/cloc,*/TriBITSDoc,*/tribits/doc/guides/rst2latex.tex,*/*.js,*/*.svg,*/tribits/doc/sphinx/*/index.html
skip = */.git,*/common_tools/cloc,*/TriBITSDoc,*/tribits/doc/guides/rst2latex.tex,*/*.js,*/*.svg,*/tribits/doc/sphinx/*/index.html,*~
ignore-words-list = thur,inout,te,nd,lod,aci,nin,nnumber,wile,reall,bu,somewhere
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
if (NOT TRIBITS_PROCESSING_PACKAGE)
# This CMakeLists.txt file is being processed as the TriBITS projects's base
# CMakeLists.txt file! (See comments at bottom of this file.)
cmake_minimum_required(VERSION 3.17.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.23.0 FATAL_ERROR)
include("${CMAKE_CURRENT_SOURCE_DIR}/ProjectName.cmake")
project(${PROJECT_NAME} NONE)
set(${PROJECT_NAME}_TRIBITS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tribits" CACHE PATH "")
Expand Down
72 changes: 72 additions & 0 deletions dev_testing/cee-rhel8/do-configure.mpi-debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/bin/bash

if [ -d CMakeFiles ] ; then
rm -r CMakeFiles
fi
if [ -e CMakeCache.txt ] ; then
rm CMakeCache.txt
fi

if [ "$TRIBITS_BASE_DIR" == "" ] ; then
_ABS_FILE_PATH=`readlink -f $0`
_SCRIPT_DIR=`dirname $_ABS_FILE_PATH`
TRIBITS_BASE_DIR=$_SCRIPT_DIR/../..
fi

tribits_install_test_dir=/tmp/rabartl/tribits_install_tests
if [ -d "${tribits_install_test_dir}" ] ; then
echo "Makedir ${tribits_install_test_dir}"
mkdir ${tribits_install_test_dir}
fi

${TRIBITS_BASE_DIR}/dev_testing/generic/do-configure-mpi-debug \
-DDART_TESTING_TIMEOUT=100 \
-DCTEST_PARALLEL_LEVEL=16 \
-DTriBITS_CTEST_DRIVER_COVERAGE_TESTS=TRUE \
-DTriBITS_CTEST_DRIVER_MEMORY_TESTS=TRUE \
-DTriBITS_ENABLE_CONFIGURE_TIMING=ON \
-DTriBITS_ENABLE_PACKAGE_CONFIGURE_TIMING=ON \
-DTribitsExProj_INSTALL_BASE_DIR=${tribits_install_test_dir} \
-DTribitsExProj_INSTALL_OWNING_GROUP=wg-sems-users-son \
-DTriBITS_ENABLE_REAL_GIT_CLONE_TESTS=ON \
-DTriBITS_SHOW_TEST_START_END_DATE_TIME=ON \
"$@"

#-DTriBITS_CTEST_DRIVER_COVERAGE_TESTS=TRUE \
#-DTriBITS_CTEST_DRIVER_MEMORY_TESTS=TRUE \

#-DTriBITS_ENABLE_DOC_GENERATION_TESTS=ON

# To submit to testing.sandia.gov/cdash set:
#
# -DTriBITS_CTEST_DRIVER_SUBMIT_TO=TESTING_SANDIA_CDASH

# To submit to testing-dev.sandia.gov/cdash set:
#
# -DTriBITS_CTEST_DRIVER_SUBMIT_TO=TESTING_DEV_SANDIA_CDASH

# To submit to exp.cdash.org set:
#
# -DTriBITS_CTEST_DRIVER_SUBMIT_TO=EXP_CDASH

# To submit to arbitrary CDash site (e.g. testing-dev.sandia.gov/cdash) set:
#
# -DTriBITS_CTEST_DRIVER_SUBMIT_TO=CUSTOM
# -DTriBITS_CTEST_DRIVER_SUBMIT_DROP_SITE=testing-dev.sandia.gov
# -DTriBITS_CTEST_DRIVER_SUBMIT_DROP_LOCATION="/cdash/submit.php?project=TribitsExProj"

# NOTE: Add -DTriBITS_ENABLE_REAL_GIT_CLONE_TESTS=ON to test cloning TriBITS
# Example repos and testing the clone features of the various tools. To get
# this to work on SNL machines, one may need to switch from
# 'https://github.com/' to '[email protected]:' using:
#
# export [email protected]:tribits/
#
# before configuring.
#
# NOTE: The directory /tmp/tribits_install_tests above was created beforehand with:
#
# $ mkdir /tmp/tribits_install_tests
#
# One can allow another user to create the directory with a shared group for
# more testing.
7 changes: 7 additions & 0 deletions dev_testing/cee-rhel8/load-env.clang-16.0.6.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module purge
module load aue/cmake/3.27.7
module load aue/ninja/1.11.1
module load aue/clang/16.0.6
module load aue/openmpi/4.1.6-clang-16.0.6

export [email protected]:tribits/
7 changes: 7 additions & 0 deletions dev_testing/cee-rhel8/load-env.gnu-10.3.0.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module purge
module load aue/cmake/3.27.7
module load aue/ninja/1.11.1
module load aue/gcc/10.3.0
module load aue/openmpi/4.1.6-gcc-10.3.0

export [email protected]:tribits/
2 changes: 1 addition & 1 deletion dev_testing/crf450/mpi-debug/do-configure
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if [ "$TRIBITS_BASE_DIR" == "" ] ; then
fi

${TRIBITS_BASE_DIR}/dev_testing/generic/do-configure-mpi-debug \
-DDART_TESTING_TIMEOUT=85 \
-DDART_TESTING_TIMEOUT=100 \
-DCTEST_PARALLEL_LEVEL=16 \
-DTriBITS_CTEST_DRIVER_COVERAGE_TESTS=TRUE \
-DTriBITS_CTEST_DRIVER_MEMORY_TESTS=TRUE \
Expand Down
1 change: 1 addition & 0 deletions dev_testing/generic/do-configure-mpi-debug
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ fi

cmake \
-D CMAKE_BUILD_TYPE:STRING="DEBUG" \
-D PYTHON_EXECUTABLE=$(which python3) \
-D TPL_ENABLE_MPI:BOOL=ON \
-D TriBITS_ENABLE_Fortran:BOOL=ON \
-D TriBITS_ENABLE_TESTS:BOOL=ON \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

import sys
import argparse
Expand Down
2 changes: 1 addition & 1 deletion test/ci_support/example_test_failure_github_issue.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

import os
import sys
Expand Down
6 changes: 3 additions & 3 deletions test/core/ExamplesUnitTests/RPATH_Handling_Tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
set(RPATH_GREP_STR "@rpath/libsimplecxx[.].*[.]dylib;@rpath/libsimpletpl[.]dylib")
elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
set(RPATH_GREP_STR
"R.*PATH *${RPATH_CURRENT_TEST_DIR}/install/lib:${SimpleTpl_install_SHARED_DIR}/install/lib")
"R.*PATH *.*${RPATH_CURRENT_TEST_DIR}/install/lib:${SimpleTpl_install_SHARED_DIR}/install/lib")
# NOTE: Above matches both RPATH and RUNPATH which are used on different
# Linux systems.
endif()
Expand Down Expand Up @@ -149,7 +149,7 @@ if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
set(RPATH_GREP_STR "@rpath/libsimplecxx[.].*[.]dylib;@rpath/libsimpletpl[.]dylib")
elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
set(RPATH_GREP_STR
"R.*PATH *${SimpleTpl_install_SHARED_DIR}/install/lib")
"R.*PATH *.*${SimpleTpl_install_SHARED_DIR}/install/lib")
endif()

tribits_add_advanced_test( TribitsExampleProject_SimpleTpl_RPATH_no_SET_INSTALL_RPATH
Expand Down Expand Up @@ -221,7 +221,7 @@ if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
set(RPATH_GREP_STR "@rpath/libsimplecxx[.].*[.]dylib;@rpath/libsimpletpl[.]dylib")
elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
set(RPATH_GREP_STR
"R.*PATH *${RPATH_CURRENT_TEST_DIR}/install2/nonstd_lib_location:${SimpleTpl_install_SHARED_DIR}/install/lib")
"R.*PATH *.*${RPATH_CURRENT_TEST_DIR}/install2/nonstd_lib_location:${SimpleTpl_install_SHARED_DIR}/install/lib")
endif()

tribits_add_advanced_test( TribitsExampleProject_SimpleTpl_RPATH_CMAKE_INSTALL_RPATH
Expand Down
53 changes: 35 additions & 18 deletions test/core/ExamplesUnitTests/TribitsExampleProject_Tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,46 @@ else()
set(REGEX_FOR_GITIGNORE)
endif()


if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set(DEPRECATED_WARNING_1_STR
"‘int SimpleCxx::HelloWorld::someOldFunc.. const’ is deprecated .declared at .*/TribitsExampleProject/packages/simple_cxx/src/SimpleCxx_HelloWorld.hpp:"
)
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5)
# Only versions 4.5+ support this feature
set(DEPRECATED_MSG_STR ".* .Just don't call this function at all please!")
print_var(CMAKE_CXX_COMPILER_VERSION)


if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set(DEPRECATED_WARNING_1_STR
"‘int SimpleCxx::HelloWorld::someOldFunc.. const’ is deprecated .declared at .*/TribitsExampleProject/packages/simple_cxx/src/SimpleCxx_HelloWorld.hpp:"
)
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5)
# Only versions 4.5+ support this feature
set(DEPRECATED_MSG_STR ".* .Just don't call this function at all please!")
else()
set(DEPRECATED_MSG_STR "")
endif()
set(DEPRECATED_WARNING_2_STR
"‘int SimpleCxx::HelloWorld::someOldFunc2.. const’ is deprecated .declared at .*/TribitsExampleProject/packages/simple_cxx/src/SimpleCxx_HelloWorld.hpp:${DEPRECATED_MSG_STR}"
)
else()
set(DEPRECATED_MSG_STR)
set(DEPRECATED_WARNING_1_STR
".*/TribitsExampleProject/packages/simple_cxx/src/SimpleCxx_HelloWorld.cpp:.*: warning: .*someOldFunc.* is deprecated"
)
set(DEPRECATED_WARNING_2_STR
".*/TribitsExampleProject/packages/simple_cxx/src/SimpleCxx_HelloWorld.cpp:.*: warning: .*someOldFunc2.* is deprecated: .Just don.t call this function at all please."
)
endif()
set(DEPRECATED_WARNING_2_STR
"‘int SimpleCxx::HelloWorld::someOldFunc2.. const’ is deprecated .declared at .*/TribitsExampleProject/packages/simple_cxx/src/SimpleCxx_HelloWorld.hpp:${DEPRECATED_MSG_STR}"
)
else()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(DEPRECATED_WARNING_1_STR
".*/TribitsExampleProject/packages/simple_cxx/src/SimpleCxx_HelloWorld.cpp:.*: warning: .*int SimpleCxx::HelloWorld::someOldFunc.. const.* is deprecated"
)
set(DEPRECATED_WARNING_2_STR
".*/TribitsExampleProject/packages/simple_cxx/src/SimpleCxx_HelloWorld.cpp:.*: warning: .*int SimpleCxx::HelloWorld::someOldFunc2.. const.* is deprecated: .Just don.t call this function at all please."
"simple_cxx/src/SimpleCxx_HelloWorld.hpp:.*:.*: note: 'someOldFunc' has been explicitly marked deprecated here"
)
set(DEPRECATED_MSG_STR
"SIMPLECXX_DEPRECATED_MSG[(].Just don't call this function at all please..[)]")
else()
message(SEND_ERROR "Error, the CMAKE_CXX_COMPILER_ID='${CMAKE_CXX_COMPILER_ID}'"
" and CMAKE_CXX_COMPILER_VERSION='${CMAKE_CXX_COMPILER_VERSION}' is not covered"
" for setting DEPRECATED_WARNING_1_STR!")
endif()

print_var(DEPRECATED_WARNING_1_STR)
print_var(DEPRECATED_MSG_STR)
print_var(DEPRECATED_WARNING_2_STR)

set(LabelsForSubprojects_CMND_AND_ARGS
grep ARGS "^LabelsForSubprojects:" DartConfiguration.tcl)
Expand Down Expand Up @@ -416,7 +433,7 @@ function(TribitsExampleProject_ALL_ST_NoFortran sharedOrStatic serialOrMpi)
"TribitsExProj_CXX_FLAGS = ''"
"TribitsExProj_C_FLAGS = ''"
"TribitsExProj_Fortran_FLAGS = ''"
"TribitsExProj_EXTRA_LD_FLAGS = ''"
"TribitsExProj_EXTRA_LD_FLAGS = '" # This is non-empty on some platforms but we can't know what it is :-(
"TribitsExProj_SHARED_LIB_RPATH_COMMAND = '${TribitsExProj_SHARED_LIB_RPATH_COMMAND_REGEX}'"
"TribitsExProj_BUILD_SHARED_LIBS = '${BUILD_SHARED_LIBS_VAL}'"
"TribitsExProj_LINKER = '.*'"
Expand Down
2 changes: 1 addition & 1 deletion test/core/ExamplesUnitTests/TribitsHelloWorld_Tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ tribits_add_advanced_test( TribitsHelloWorld_install_config_dummy_proj
"TribitsHelloWorld_C_FLAGS = ''"
"TribitsHelloWorld_Fortran_FLAGS = ''"
"TribitsHelloWorld_FORTRAN_FLAGS = ''"
"TribitsHelloWorld_EXTRA_LD_FLAGS = ''"
"TribitsHelloWorld_EXTRA_LD_FLAGS = '" # This is not empty on some platforms but we can't check the value!
"TribitsHelloWorld_SHARED_LIB_RPATH_COMMAND = ''"
"TribitsHelloWorld_BUILD_SHARED_LIBS = 'FALSE'"
"TribitsHelloWorld_LINKER = '.*'"
Expand Down
19 changes: 10 additions & 9 deletions test/doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
if (PYTHON_VERSION_MAJOR GREATER_EQUAL 3)
set(HAS_PYTHON3 TRUE)
else()
set(HAS_PYTHON3 FALSE)
endif()


advanced_set( ${PROJECT_NAME}_ENABLE_DOC_GENERATION_TESTS OFF
CACHE BOOL
"Enable testing for the build of the documentation. Requires docutils and will blow away and rebuild the existing documentation in the source tree since the documentation builds in place." )
"Enable testing for the build of the documentation, including using Sphinx. Requires docutils, sphinx, and sphinx-rd-theme and will blow away and rebuild the existing documentation in the source tree since the documentation builds in place. Therefore, one must be careful to not blow away non-tracked files." )


tribits_add_advanced_test( sphinx_rst_generator_UnitTests
Expand All @@ -11,6 +18,7 @@ tribits_add_advanced_test( sphinx_rst_generator_UnitTests
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/sphinx_rst_generator_UnitTests.py -v
PASS_REGULAR_EXPRESSION "OK"
ALWAYS_FAIL_ON_NONZERO_RETURN
DISABLED "Test is broken for long time, see commit c477daa1"
)


Expand Down Expand Up @@ -45,7 +53,7 @@ tribits_add_advanced_test( build_sphinx_docs
GIT_EXECUTABLE
OVERALL_NUM_MPI_PROCS 1
TEST_0 MESSAGE "Clean out any prior build of the docs"
CMND ${GIT_EXECUTABLE} ARGS clean -xdf
CMND ${GIT_EXECUTABLE} ARGS clean -xdf -- .
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tribits/doc
SKIP_CLEAN_WORKING_DIRECTORY # Don't delete our source tree!
TEST_1 MESSAGE "Build the sphinx documentation"
Expand Down Expand Up @@ -82,10 +90,3 @@ if (build_docs_test_name AND build_sphinx_docs_test_name)
# RUN_SERIAL because they take a long time to run and we don't want to stop
# other TriBITS tests from running at the same time as these two.
endif()


if (PYTHON_VERSION_MAJOR GREATER_EQUAL 3)
set(HAS_PYTHON3 TRUE)
else()
set(HAS_PYTHON3 FALSE)
endif()
5 changes: 3 additions & 2 deletions test/doc/sphinx_rst_generator_UnitTests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @HEADER
# ************************************************************************
Expand Down Expand Up @@ -91,7 +91,8 @@ def test_1(self):
rst_dir = os.path.join(tribitsDir,'doc','sphinx','copied_files')
(abs_path_str, include_file_list) = SRG.change_paths_and_get_includes(
source_file=source_file, src_file_path=src_file_path,
start_path=start_path, rst_dir=rst_dir, copy_file=True)
start_path=start_path, rst_dir=rst_dir, tribits_base_dir=tribitsDir,
copy_file=True)
#print("abs_path_str = "+str(abs_path_str))
#print("include_file_list = "+str(include_file_list))
self.maxDiff = None
Expand Down
2 changes: 1 addition & 1 deletion test/python_utils/gitdist_UnitTests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @HEADER
# ************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion test/python_utils/lower_case_cmake_UnitTests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

################################################################################
Expand Down
2 changes: 1 addition & 1 deletion test/python_utils/utils/return_input.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# @HEADER
# ************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion tribits/ci_support/TribitsDependencies.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# @HEADER
# *****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion tribits/ci_support/cdash_analyze_and_report.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# @HEADER
# *****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion tribits/ci_support/cdash_build_testing_date.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# @HEADER
# *****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion tribits/ci_support/checkin-test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# @HEADER
# *****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion tribits/ci_support/clone_extra_repos.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# @HEADER
# *****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion tribits/ci_support/dump-package-dep-table.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# @HEADER
# *****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion tribits/ci_support/filter-packages-list.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# @HEADER
# *****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion tribits/ci_support/get-tribits-packages-from-files-list.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# @HEADER
# *****************************************************************************
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# @HEADER
# *****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion tribits/ci_support/get-tribits-packages.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# @HEADER
# *****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion tribits/ci_support/is_checkin_tested_commit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# @HEADER
# *****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion tribits/core/test_support/TribitsAddAdvancedTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/../utils/PrintVar.cmake")
# instead. **WARNING:** If you want to run such tests using valgrind, you
# have to use the raw executable as the ``<cmndExec>`` argument and *not*
# the script. For example, if you have a python script
# ``my_python_test.py`` with ``/usr/bin/env python`` at the top, you can't
# ``my_python_test.py`` with ``/usr/bin/env python3`` at the top, you can't
# just use::
#
# CMND <path>/my_python_test.py ARGS "<arg0>" "<arg1>" ...
Expand Down
Loading

0 comments on commit ba8a8ae

Please sign in to comment.