From 157d3946b4fc05d953ee7e9dcfc90ff0f5eb1c79 Mon Sep 17 00:00:00 2001 From: Nicolas Bock Date: Thu, 15 Jul 2021 06:51:09 +0200 Subject: [PATCH] Enable override of variables for tests This change enables override of the environment variables used for CI tests. This change is meant for running the tests locally so that the tests can be modified. For example, in order to test with a new compiler one might run: $ CC=gcc-13 ./scripts/ci-gcc-11-C-single-real.sh to override the default C compiler in test. Signed-off-by: Nicolas Bock --- scripts/ci-defaults.sh | 26 +++++++++++++------------- scripts/ci-gcc-11-C-double-complex.sh | 18 +++++++++--------- scripts/ci-gcc-11-C-double-real.sh | 18 +++++++++--------- scripts/ci-gcc-11-C-single-complex.sh | 18 +++++++++--------- scripts/ci-gcc-11-C-single-real.sh | 18 +++++++++--------- 5 files changed, 49 insertions(+), 49 deletions(-) diff --git a/scripts/ci-defaults.sh b/scripts/ci-defaults.sh index 616481251..65bd15873 100644 --- a/scripts/ci-defaults.sh +++ b/scripts/ci-defaults.sh @@ -1,13 +1,13 @@ -export CC=gcc -export CXX=g++ -export FC=gfortran -export BML_INTERNAL_BLAS=no -export BML_MPI=no -export BML_MPIEXEC_NUMPROCS_FLAG=-n -export BML_MPIEXEC_NUMPROCS=4 -export BML_OPENMP=no -export BML_VALGRIND=no -export BML_SCALAPACK=no -export BUILD_SHARED_LIBS=no -export VERBOSE_MAKEFILE=yes -export CMAKE_BUILD_TYPE=Debug +export CC=${CC:-gcc} +export CXX=${CXX:-g++} +export FC=${FC:-gfortran} +export BML_INTERNAL_BLAS=${BML_INTERNAL_BLAS:-no} +export BML_MPI=${BML_MPI:-no} +export BML_MPIEXEC_NUMPROCS_FLAG=${BML_MPIEXEC_NUMPROCS_FLAG:-'-n'} +export BML_MPIEXEC_NUMPROCS=${BML_MPIEXEC_NUMPROCS:-4} +export BML_OPENMP=${BML_OPENMP:-no} +export BML_VALGRIND=${BML_VALGRIND:-no} +export BML_SCALAPACK=${BML_SCALAPACK:-no} +export BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-no} +export VERBOSE_MAKEFILE=${VERBOSE_MAKEFILE:-yes} +export CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Debug} diff --git a/scripts/ci-gcc-11-C-double-complex.sh b/scripts/ci-gcc-11-C-double-complex.sh index 04b8dbe23..e5ed551f2 100755 --- a/scripts/ci-gcc-11-C-double-complex.sh +++ b/scripts/ci-gcc-11-C-double-complex.sh @@ -4,15 +4,15 @@ set -e -u -x basedir=$(readlink --canonicalize $(dirname $0)/..) -[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh +export CC=${CC:-gcc-11} +export CXX=${CXX:-g++-11} +export FC=${FC:-gfortran-11} +export BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-no} +export BML_OPENMP=${BML_OPENMP:-no} +export BML_INTERNAL_BLAS=${BML_INTERNAL_BLAS:-no} +export TESTING_EXTRA_ARGS=${TESTING_EXTRA_ARGS:-"-R C-.*-double_complex"} +export BML_VALGRIND=${BML_VALGRIND:-yes} -export CC=gcc-11 -export CXX=g++-11 -export FC=gfortran-11 -export BUILD_SHARED_LIBS=no -export BML_OPENMP=no -export BML_INTERNAL_BLAS=no -export TESTING_EXTRA_ARGS="-R C-.*-double_complex" -export BML_VALGRIND=yes +[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh ${basedir}/build.sh --debug testing diff --git a/scripts/ci-gcc-11-C-double-real.sh b/scripts/ci-gcc-11-C-double-real.sh index 2bb84cb27..f916a29ac 100755 --- a/scripts/ci-gcc-11-C-double-real.sh +++ b/scripts/ci-gcc-11-C-double-real.sh @@ -4,15 +4,15 @@ set -e -u -x basedir=$(readlink --canonicalize $(dirname $0)/..) -[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh +export CC=${CC:-gcc-11} +export CXX=${CXX:-g++-11} +export FC=${FC:-gfortran-11} +export BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-no} +export BML_OPENMP=${BML_OPENMP:-no} +export BML_INTERNAL_BLAS=${BML_INTERNAL_BLAS:-no} +export TESTING_EXTRA_ARGS=${TESTING_EXTRA_ARGS:-"-R C-.*-double_real"} +export BML_VALGRIND=${BML_VALGRIND:-yes} -export CC=gcc-11 -export CXX=g++-11 -export FC=gfortran-11 -export BUILD_SHARED_LIBS=no -export BML_OPENMP=no -export BML_INTERNAL_BLAS=no -export TESTING_EXTRA_ARGS="-R C-.*-double_real" -export BML_VALGRIND=yes +[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh ${basedir}/build.sh --debug testing diff --git a/scripts/ci-gcc-11-C-single-complex.sh b/scripts/ci-gcc-11-C-single-complex.sh index a7da7ad58..1568abd68 100755 --- a/scripts/ci-gcc-11-C-single-complex.sh +++ b/scripts/ci-gcc-11-C-single-complex.sh @@ -4,15 +4,15 @@ set -e -u -x basedir=$(readlink --canonicalize $(dirname $0)/..) -[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh +export CC=${CC:-gcc-11} +export CXX=${CXX:-g++-11} +export FC=${FC:-gfortran-11} +export BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-no} +export BML_OPENMP=${BML_OPENMP:-no} +export BML_INTERNAL_BLAS=${BML_INTERNAL_BLAS:-no} +export TESTING_EXTRA_ARGS=${TESTING_EXTRA_ARGS:-"-R C-.*-single_complex"} +export BML_VALGRIND=${BML_VALGRIND:-yes} -export CC=gcc-11 -export CXX=g++-11 -export FC=gfortran-11 -export BUILD_SHARED_LIBS=no -export BML_OPENMP=no -export BML_INTERNAL_BLAS=no -export TESTING_EXTRA_ARGS="-R C-.*-single_complex" -export BML_VALGRIND=yes +[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh ${basedir}/build.sh --debug testing diff --git a/scripts/ci-gcc-11-C-single-real.sh b/scripts/ci-gcc-11-C-single-real.sh index a85690161..8f7e36fd5 100755 --- a/scripts/ci-gcc-11-C-single-real.sh +++ b/scripts/ci-gcc-11-C-single-real.sh @@ -4,15 +4,15 @@ set -e -u -x basedir=$(readlink --canonicalize $(dirname $0)/..) -[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh +export CC=${CC:-gcc-11} +export CXX=${CXX:-g++-11} +export FC=${FC:-gfortran-11} +export BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-no} +export BML_OPENMP=${BML_OPENMP:-no} +export BML_INTERNAL_BLAS=${BML_INTERNAL_BLAS:-no} +export TESTING_EXTRA_ARGS=${TESTING_EXTRA_ARGS:-"-R C-.*-single_real"} +export BML_VALGRIND=${BML_VALGRIND:-yes} -export CC=gcc-11 -export CXX=g++-11 -export FC=gfortran-11 -export BUILD_SHARED_LIBS=no -export BML_OPENMP=no -export BML_INTERNAL_BLAS=no -export TESTING_EXTRA_ARGS="-R C-.*-single_real" -export BML_VALGRIND=yes +[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh ${basedir}/build.sh --debug testing