Skip to content
Snippets Groups Projects
Commit 80321773 authored by RODIER Quentin's avatar RODIER Quentin
Browse files

Merge branch 'master' of https://github.com/UMR-CNRM/PHYEX

parents 3c9df9f0 44e6ed51
No related branches found
No related tags found
No related merge requests found
...@@ -72,7 +72,7 @@ mainPackVersion=${mainPackVersion:-${defaultMainPackVersion}} ...@@ -72,7 +72,7 @@ mainPackVersion=${mainPackVersion:-${defaultMainPackVersion}}
extraCompilationCheck=1 extraCompilationCheck=1
function usage { function usage {
echo "Usage: $0 [-h] [-c] [-r] [-C] [-s] [-f] [--noexpand] [-t test] commit reference" echo "Usage: $0 [-h] [-p] [-c] [-r] [-C] [-s] [-f] [--noexpand] [-t test] [--cycle CYCLE] [--repo-user] [--repo-protocol] commit [reference]"
echo "commit commit hash (or a directory, or among $specialPack) to test" echo "commit commit hash (or a directory, or among $specialPack) to test"
echo "reference commit hash (or a directory, or among $specialPack) REF to use as a reference" echo "reference commit hash (or a directory, or among $specialPack) REF to use as a reference"
echo "-s suppress compilation pack" echo "-s suppress compilation pack"
...@@ -90,15 +90,13 @@ function usage { ...@@ -90,15 +90,13 @@ function usage {
echo "--repo-protocol protocol (https or ssh) to reach the PHYEX repository on github," echo "--repo-protocol protocol (https or ssh) to reach the PHYEX repository on github,"
echo " defaults to the env variable PHYEXREOprotocol (=$PHYEXREOprotocol)" echo " defaults to the env variable PHYEXREOprotocol (=$PHYEXREOprotocol)"
echo "" echo ""
echo "If nothing is asked (compilation, running, check) everything is done" echo "If nothing is asked (pack creation, compilation, running, check) everything is done"
echo
echo "With the special reference REF commit, a suitable reference is guessed"
echo
echo "If no test is aked for, the default one ($defaultTest) is executed" echo "If no test is aked for, the default one ($defaultTest) is executed"
echo echo
echo "With the special reference REF commit, a suitable reference is guessed"
echo "The directory (for commit only, not ref) can take the form server:directory" echo "The directory (for commit only, not ref) can take the form server:directory"
echo
echo "If using a directory (for commit or reference) it must contain at least one '/'" echo "If using a directory (for commit or reference) it must contain at least one '/'"
echo "The commit can be a tag, written with syntagx tags/<TAG>"
echo echo
echo "The cycle will be guessed from the source code" echo "The cycle will be guessed from the source code"
echo echo
...@@ -202,7 +200,7 @@ function ial_version_content2cycle { ...@@ -202,7 +200,7 @@ function ial_version_content2cycle {
#Name is choosen such as it can be produced with a main pack: PHYEX/${cycle}_XXXXXXXXX.01.${gmkpack_l}.${gmkpack_o} #Name is choosen such as it can be produced with a main pack: PHYEX/${cycle}_XXXXXXXXX.01.${gmkpack_l}.${gmkpack_o}
fromdir='' fromdir=''
if echo $commit | grep '/' > /dev/null; then if echo $commit | grep '/' | grep -v '^tags/' > /dev/null; then
fromdir=$commit fromdir=$commit
if [ "$cycle" == "" ]; then if [ "$cycle" == "" ]; then
content_ial_version=$(scp $commit/src/arome/ial_version.json /dev/stdout 2>/dev/null || echo "") content_ial_version=$(scp $commit/src/arome/ial_version.json /dev/stdout 2>/dev/null || echo "")
...@@ -224,7 +222,7 @@ elif echo $specialPack | grep -w $commit > /dev/null; then ...@@ -224,7 +222,7 @@ elif echo $specialPack | grep -w $commit > /dev/null; then
cycle=48t1 cycle=48t1
fi fi
else else
packBranch="COMMIT$commit" packBranch="COMMIT$(echo $commit | sed 's/\//'${separator}'/g' | sed 's/:/'${separator}'/g' | sed 's/\./'${separator}'/g')"
if [ "$cycle" == "" ]; then if [ "$cycle" == "" ]; then
if [[ $commit == arome${separator}* ]]; then if [[ $commit == arome${separator}* ]]; then
apl_arome_file="ext/apl_arome.F90" apl_arome_file="ext/apl_arome.F90"
...@@ -233,9 +231,14 @@ else ...@@ -233,9 +231,14 @@ else
apl_arome_file="src/arome/ext/apl_arome.F90" apl_arome_file="src/arome/ext/apl_arome.F90"
ial_version_file="src/arome/ial_version.json" ial_version_file="src/arome/ial_version.json"
fi fi
content_ial_version=$(wget --no-check-certificate https://raw.githubusercontent.com/$PHYEXREPOuser/PHYEX/${commit}/$ial_version_file -O - 2>/dev/null || echo "") if echo $commit | grep '^tags/' > /dev/null; then
urlcommit=$(echo $commit | cut -d / -f 2-)
else
urlcommit=$commit
fi
content_ial_version=$(wget --no-check-certificate https://raw.githubusercontent.com/$PHYEXREPOuser/PHYEX/${urlcommit}/$ial_version_file -O - 2>/dev/null || echo "")
if [ "$content_ial_version" == "" ]; then if [ "$content_ial_version" == "" ]; then
content_apl_arome=$(wget --no-check-certificate https://raw.githubusercontent.com/$PHYEXREPOuser/PHYEX/${commit}/$apl_arome_file -O - 2>/dev/null) content_apl_arome=$(wget --no-check-certificate https://raw.githubusercontent.com/$PHYEXREPOuser/PHYEX/${urlcommit}/$apl_arome_file -O - 2>/dev/null)
cycle=$(apl_arome_content2cycle) cycle=$(apl_arome_content2cycle)
else else
cycle=$(ial_version_content2cycle) cycle=$(ial_version_content2cycle)
......
...@@ -112,13 +112,12 @@ fi ...@@ -112,13 +112,12 @@ fi
run_in_ref=$(ls -d $REFDIR/MNH-V5-5-0/MY_RUN/KTEST/007_16janvier/008_run2_turb3D_* 2> /dev/null | tail -1 |wc -l) run_in_ref=$(ls -d $REFDIR/MNH-V5-5-0/MY_RUN/KTEST/007_16janvier/008_run2_turb3D_* 2> /dev/null | tail -1 |wc -l)
#Name and directory for compiling and executing user pack #Name and directory for compiling and executing user pack
fromdir='' if echo $commit | grep '/' | grep -v '^tags/' > /dev/null; then
if echo $commit | grep '/' > /dev/null; then
fromdir=$commit fromdir=$commit
tag=$(echo $commit | sed 's/\//'${separator}'/g' | sed 's/:/'${separator}'/g' | sed 's/\./'${separator}'/g')
else else
tag=$commit fromdir=''
fi fi
tag=$(echo $commit | sed 's/\//'${separator}'/g' | sed 's/:/'${separator}'/g' | sed 's/\./'${separator}'/g')
name=MNH-V5-5-0-$tag name=MNH-V5-5-0-$tag
[ $suppress -eq 1 -a -d $MNHPACK/$name ] && rm -rf $MNHPACK/$name [ $suppress -eq 1 -a -d $MNHPACK/$name ] && rm -rf $MNHPACK/$name
if [ $run_in_ref -eq 1 ]; then if [ $run_in_ref -eq 1 ]; then
......
...@@ -29,7 +29,7 @@ fi ...@@ -29,7 +29,7 @@ fi
defaultRef=ref defaultRef=ref
function usage { function usage {
echo "Usage: $0 [-h] [-c] [-r] [-C] [-s] [-f] [--noexpand] [-t test] commit reference" echo "Usage: $0 [-h] [-c] [-r] [-C] [-s] [-f] [--noexpand] [-t test] [--repo-user user] [--repo-protocol protocol] [-a arch] [-A arch] commit [reference]"
echo "commit commit hash (or a directory, or among $specialName) to test" echo "commit commit hash (or a directory, or among $specialName) to test"
echo "reference commit hash (or a directory, or among $specialName) REF to use as a reference" echo "reference commit hash (or a directory, or among $specialName) REF to use as a reference"
echo "-s suppress compilation directory" echo "-s suppress compilation directory"
...@@ -136,14 +136,14 @@ if [ $check -eq 1 -a -z "${reference-}" ]; then ...@@ -136,14 +136,14 @@ if [ $check -eq 1 -a -z "${reference-}" ]; then
fi fi
fromdir='' fromdir=''
if echo $commit | grep '/' > /dev/null; then if echo $commit | grep '/' | grep -v '^tags/' > /dev/null; then
fromdir=$commit fromdir=$commit
name=$(echo $commit | sed 's/\//'${separator}'/g' | sed 's/:/'${separator}'/g' | sed 's/\./'${separator}'/g') name=$(echo $commit | sed 's/\//'${separator}'/g' | sed 's/:/'${separator}'/g' | sed 's/\./'${separator}'/g')
[ $suppress -eq 1 -a -d $TESTDIR/$name ] && rm -rf $TESTDIR/$name [ $suppress -eq 1 -a -d $TESTDIR/$name ] && rm -rf $TESTDIR/$name
elif echo $specialName | grep -w $commit > /dev/null; then elif echo $specialName | grep -w $commit > /dev/null; then
name="$commit" name="$commit"
else else
name="COMMIT$commit" name="COMMIT$(echo $commit | sed 's/\//'${separator}'/g' | sed 's/:/'${separator}'/g' | sed 's/\./'${separator}'/g')"
[ $suppress -eq 1 -a -d $TESTDIR/$name ] && rm -rf $TESTDIR/$name [ $suppress -eq 1 -a -d $TESTDIR/$name ] && rm -rf $TESTDIR/$name
fi fi
if [ ! -z "${reference-}" ]; then if [ ! -z "${reference-}" ]; then
......
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