diff --git a/tools/check_commit_ial.sh b/tools/check_commit_ial.sh index 89cb787c6f72b5c0d526c3a3d4fd6ee99527edea..55e0785ea8688e86d42f49d7f9c8fee729ba675f 100755 --- a/tools/check_commit_ial.sh +++ b/tools/check_commit_ial.sh @@ -72,7 +72,7 @@ mainPackVersion=${mainPackVersion:-${defaultMainPackVersion}} extraCompilationCheck=1 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 "reference commit hash (or a directory, or among $specialPack) REF to use as a reference" echo "-s suppress compilation pack" @@ -90,15 +90,13 @@ function usage { echo "--repo-protocol protocol (https or ssh) to reach the PHYEX repository on github," echo " defaults to the env variable PHYEXREOprotocol (=$PHYEXREOprotocol)" echo "" - echo "If nothing is asked (compilation, running, check) everything is done" - echo - echo "With the special reference REF commit, a suitable reference is guessed" - echo + echo "If nothing is asked (pack creation, compilation, running, check) everything is done" echo "If no test is aked for, the default one ($defaultTest) is executed" 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 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 "The cycle will be guessed from the source code" echo @@ -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} fromdir='' -if echo $commit | grep '/' > /dev/null; then +if echo $commit | grep '/' | grep -v '^tags/' > /dev/null; then fromdir=$commit if [ "$cycle" == "" ]; then 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 cycle=48t1 fi else - packBranch="COMMIT$commit" + packBranch="COMMIT$(echo $commit | sed 's/\//'${separator}'/g' | sed 's/:/'${separator}'/g' | sed 's/\./'${separator}'/g')" if [ "$cycle" == "" ]; then if [[ $commit == arome${separator}* ]]; then apl_arome_file="ext/apl_arome.F90" @@ -233,9 +231,14 @@ else apl_arome_file="src/arome/ext/apl_arome.F90" ial_version_file="src/arome/ial_version.json" 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 - 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) else cycle=$(ial_version_content2cycle) diff --git a/tools/check_commit_mesonh.sh b/tools/check_commit_mesonh.sh index 0d0ea6d5df3e46087e64d92ed4a84d0d90f8f4bc..c1b69d21f6537347d55e6abc284f28bbdfe4ebbe 100755 --- a/tools/check_commit_mesonh.sh +++ b/tools/check_commit_mesonh.sh @@ -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) #Name and directory for compiling and executing user pack -fromdir='' -if echo $commit | grep '/' > /dev/null; then +if echo $commit | grep '/' | grep -v '^tags/' > /dev/null; then fromdir=$commit - tag=$(echo $commit | sed 's/\//'${separator}'/g' | sed 's/:/'${separator}'/g' | sed 's/\./'${separator}'/g') else - tag=$commit + fromdir='' fi +tag=$(echo $commit | sed 's/\//'${separator}'/g' | sed 's/:/'${separator}'/g' | sed 's/\./'${separator}'/g') name=MNH-V5-5-0-$tag [ $suppress -eq 1 -a -d $MNHPACK/$name ] && rm -rf $MNHPACK/$name if [ $run_in_ref -eq 1 ]; then diff --git a/tools/check_commit_testprogs.sh b/tools/check_commit_testprogs.sh index 02881780eeed1720e46f1494efeb0b4029ea3473..b94833cfb75968a38659d811c58ce48f62333a79 100755 --- a/tools/check_commit_testprogs.sh +++ b/tools/check_commit_testprogs.sh @@ -29,7 +29,7 @@ fi defaultRef=ref 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 "reference commit hash (or a directory, or among $specialName) REF to use as a reference" echo "-s suppress compilation directory" @@ -136,14 +136,14 @@ if [ $check -eq 1 -a -z "${reference-}" ]; then fi fromdir='' -if echo $commit | grep '/' > /dev/null; then +if echo $commit | grep '/' | grep -v '^tags/' > /dev/null; then fromdir=$commit 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 elif echo $specialName | grep -w $commit > /dev/null; then name="$commit" 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 fi if [ ! -z "${reference-}" ]; then