Skip to content
Snippets Groups Projects
Commit f03fdfb0 authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Update CI scripts for NAG on Mistral: check out-of-source build.

As well as parallel 'make dist' and 'make distclean'.
parent bce3e02f
No related branches found
No related tags found
1 merge request!14Draft: K202125/cdi 1.8.x pio merge followup
......@@ -11,13 +11,29 @@ init_nag626223
test -f "${top_srcdir}/configure" || ( cd "${top_srcdir}" && ./autogen.sh )
# Create a distribution file with minimalistic configuration:
switch_for_module texlive
"${top_srcdir}/configure" --disable-cf-interface
make -j8 dist
# Create a subdirectory for further testing and switch to it:
mkdir check_dist && cd check_dist
# Move the distribution file to the test directory and unpack it:
mv ../cdi-*.tar.gz ./
tar xf cdi-*.tar.gz
# Create a subdirectory for building and switch to it:
mkdir build && cd build
# Use GCC from the path when compiling/linking Fortran code:
FCFLAGS="-Wc=$(which gcc)"
# MPI library is built with -kind=byte, therefore we have to specify it here:
FCFLAGS+=' -g -kind=byte'
"${top_srcdir}/configure" \
# Create an out-of-source configuration:
../cdi-*/configure \
--disable-maintainer-mode \
--enable-cf-interface \
--enable-iso-c-interface \
......@@ -37,3 +53,7 @@ make -j8
make -j8 check || { cat tests/test-suite.log; exit 1; }
check_all_tests_passed tests/test-suite.log
make -j8 distclean
check_no_files_in_cwd
......@@ -220,3 +220,19 @@ check_all_tests_passed ()
}
}' $1 >&2
}
#
# Checks whether the current working directory or any of its subdirectories
# contain a file and fails with an error message if that is the case.
#
check_no_files_in_cwd ()
{
cnfic_files=`find . -type f 2>/dev/null`
if test -n "$cnfic_files"; then
{
echo "ERROR: the current working directory contains undeleted files:"
echo "$cnfic_files"
} >&2
exit 1
fi
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment