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

S. Riette 6 Jul 2023: remove 'set -x' and enhance report presentation

parent 74652441
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
set -x #set -x
set -e set -e
set -o pipefail #abort if left command on a pipe fails set -o pipefail #abort if left command on a pipe fails
...@@ -149,7 +149,7 @@ function add_status { ...@@ -149,7 +149,7 @@ function add_status {
fi fi
fi fi
url="https://${PHYEXREPOuser}.github.io/${PHYEXREPOrepo}/displayparam.html?" url="https://${PHYEXREPOuser}.github.io/${PHYEXREPOrepo}/displayparam.html?"
url=${url}$(content=$(echo -e "$comment") python3 -c "import urllib.parse, os; print(urllib.parse.quote('<pre>' + os.environ['content'] + '</pre>', safe=':/'))") url=${url}$(content=$(echo -e "$comment") python3 -c "import urllib.parse, os; print(urllib.parse.quote('<pre>' + os.environ['content'] + '</pre>', safe=':/='))")
curl -L \ curl -L \
-X POST \ -X POST \
-H "Accept: application/vnd.github+json" \ -H "Accept: application/vnd.github+json" \
...@@ -283,7 +283,8 @@ if [ ${force} -eq 1 -o $(get_statuses "${SHA}" | grep "${context}" | wc -l) -eq ...@@ -283,7 +283,8 @@ if [ ${force} -eq 1 -o $(get_statuses "${SHA}" | grep "${context}" | wc -l) -eq
done done
for model in $models; do for model in $models; do
log 1 "Starting tests for model ${model}" retmodel=0
log 0 "Tests for model ${model}"
#Model specific configuration #Model specific configuration
if [ "${model}" == 'ial' ]; then if [ "${model}" == 'ial' ]; then
compilation='-p -c' compilation='-p -c'
...@@ -315,10 +316,10 @@ if [ ${force} -eq 1 -o $(get_statuses "${SHA}" | grep "${context}" | wc -l) -eq ...@@ -315,10 +316,10 @@ if [ ${force} -eq 1 -o $(get_statuses "${SHA}" | grep "${context}" | wc -l) -eq
result=$? result=$?
set -e set -e
if [ ${result} -ne 0 ]; then if [ ${result} -ne 0 ]; then
ret=1 retmodel=1
log 0 "${model} compilation: error" log 0 " ${model} compilation: error"
else else
log 0 "${model} compilation: OK" log 0 " ${model} compilation: OK"
fi fi
fi fi
...@@ -351,7 +352,7 @@ if [ ${force} -eq 1 -o $(get_statuses "${SHA}" | grep "${context}" | wc -l) -eq ...@@ -351,7 +352,7 @@ if [ ${force} -eq 1 -o $(get_statuses "${SHA}" | grep "${context}" | wc -l) -eq
result=$? result=$?
set -e set -e
if [ ${result} -ne 0 ]; then if [ ${result} -ne 0 ]; then
ret=1 retmodel=1
log 0 " ${model} ${casedescr}: execution error" log 0 " ${model} ${casedescr}: execution error"
else else
log 0 " ${model} ${casedescr}: execution OK (but status not reliable)" log 0 " ${model} ${casedescr}: execution OK (but status not reliable)"
...@@ -365,7 +366,7 @@ if [ ${force} -eq 1 -o $(get_statuses "${SHA}" | grep "${context}" | wc -l) -eq ...@@ -365,7 +366,7 @@ if [ ${force} -eq 1 -o $(get_statuses "${SHA}" | grep "${context}" | wc -l) -eq
result=$? result=$?
set -e set -e
if [ ${result} -ne 0 ]; then if [ ${result} -ne 0 ]; then
ret=1 retmodel=1
log 0 " ${model} ${casedescr}: comparison error" log 0 " ${model} ${casedescr}: comparison error"
else else
log 0 " ${model} ${casedescr}: comparison OK" log 0 " ${model} ${casedescr}: comparison OK"
...@@ -382,13 +383,19 @@ if [ ${force} -eq 1 -o $(get_statuses "${SHA}" | grep "${context}" | wc -l) -eq ...@@ -382,13 +383,19 @@ if [ ${force} -eq 1 -o $(get_statuses "${SHA}" | grep "${context}" | wc -l) -eq
result=$? result=$?
set -e set -e
if [ ${result} -ne 0 ]; then if [ ${result} -ne 0 ]; then
ret=1 retmodel=1
log 0 " ${model}: cleaning error" log 0 " ${model}: cleaning error"
else else
log 0 " ${model}: cleaning OK" log 0 " ${model}: cleaning OK"
fi fi
fi fi
fi fi
if [ $retmodel -eq 0 ]; then
log 0 "..... global result for model $model: OK"
else
ret=1
log 0 "XXXXX global result for model $model: ERROR"
fi
done done
#Report result #Report result
......
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