Skip to content
Snippets Groups Projects
Commit 221a85b6 authored by RIETTE Sébastien's avatar RIETTE Sébastien
Browse files

S. Riette 20 Mar 2023: allow compilation of old commits for testprogs

parent 6d9603ca
Branches
Tags
No related merge requests found
......@@ -64,7 +64,7 @@ build.prop{fc.libs} = $LIBS
#############################
# 4.1 Programs and dummy programm to force linking
build.source[dummyprog] = src/dummyprog.F90
build.source[testprogs] = src/ice_adjust/ src/rain_ice/ src/rain_ice_old/ src/turb_mnh/ src/support/ src/shallow/
build.source[testprogs] = $TESTPROGS_DIR
#############################
# 4.2 Main directory
......
......@@ -186,6 +186,16 @@ archfile :
}
function build_compilation_script() {
srcdir=$1
#fcm doesn't like if a source directory doesn't exist.
#To be able to compile an old commit, we must filter the source directories
TESTPROGS_DIR=""
#support is not a testprog but is needed
for testprog in ice_adjust rain_ice turb_mnh shallow rain_ice_old support; do
[ -d $srcdir/$testprog ] && TESTPROGS_DIR+="src/$testprog "
done
cat <<EOF > compilation.sh
#!/bin/bash
......@@ -214,6 +224,7 @@ echo "\\\$COMPIL_CFLAGS = \$COMPIL_CFLAGS" >> config.fcm
echo "\\\$LD_FLAGS = \$LD_FLAGS" >> config.fcm
echo "\\\$ENTRYPOINTS = \$ENTRYPOINTS" >> config.fcm
echo "\\\$LIBS = \$LIBS" >> config.fcm
echo "\\\$TESTPROGS_DIR=$TESTPROGS_DIR" >> config.fcm
export PATH=$PWD/../fcm/bin/:\$PATH
......@@ -276,7 +287,7 @@ PROGRAM DUMMYPROG
END PROGRAM DUMMYPROG
EOF
cd ..
build_compilation_script
build_compilation_script src
# Run the compilation
./compilation.sh
......
......@@ -10,7 +10,7 @@ set -e
#ice_adjust: the ice adjust test case
#ref is commit 855b8f8 for ice_adjust, rain_ice
#ref is commit 4171c53 for turb
#ref is commit ??????? for turb
#ref is commit 7e44ab1 for shallow
#ref is commit e070d16 for rain_ice_old
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment