mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Corrections
This commit is contained in:
parent
23bef139d3
commit
914516640e
2 changed files with 26 additions and 26 deletions
|
@ -44,7 +44,7 @@ clean_exit () {
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Init arguments value
|
# Init arguments value
|
||||||
gitbranch=0
|
gitbranch=""
|
||||||
force_install_ok=0
|
force_install_ok=0
|
||||||
interrupt=0
|
interrupt=0
|
||||||
notice=0
|
notice=0
|
||||||
|
@ -525,6 +525,18 @@ TEST_RESULTS () {
|
||||||
# auto -> This level has not a value yet.
|
# auto -> This level has not a value yet.
|
||||||
# na -> This level will not checked, but it'll be ignored in the final sum
|
# na -> This level will not checked, but it'll be ignored in the final sum
|
||||||
|
|
||||||
|
# Set default values for level, if they're empty.
|
||||||
|
test -n "${level[1]}" || level[1]=auto
|
||||||
|
test -n "${level[2]}" || level[2]=auto
|
||||||
|
test -n "${level[3]}" || level[3]=auto
|
||||||
|
test -n "${level[4]}" || level[4]=0
|
||||||
|
test -n "${level[5]}" || level[5]=auto
|
||||||
|
test -n "${level[6]}" || level[6]=auto
|
||||||
|
test -n "${level[7]}" || level[7]=auto
|
||||||
|
test -n "${level[8]}" || level[8]=0
|
||||||
|
test -n "${level[9]}" || level[9]=0
|
||||||
|
test -n "${level[10]}" || level[10]=0
|
||||||
|
|
||||||
# Check if the level can be changed
|
# Check if the level can be changed
|
||||||
level_can_change () {
|
level_can_change () {
|
||||||
# If the level is set at auto, it's waiting for a change
|
# If the level is set at auto, it's waiting for a change
|
||||||
|
@ -666,9 +678,9 @@ TEST_RESULTS () {
|
||||||
for i in `seq 1 10`
|
for i in `seq 1 10`
|
||||||
do
|
do
|
||||||
ECHO_FORMAT "\t Level $i: "
|
ECHO_FORMAT "\t Level $i: "
|
||||||
if [ "${level[i]}" == "na" ]; then
|
if [ "${level[$i]}" == "na" ]; then
|
||||||
ECHO_FORMAT "N/A\n"
|
ECHO_FORMAT "N/A\n"
|
||||||
elif [ "${level[i]}" -ge 1 ]; then
|
elif [ "${level[$i]}" -ge 1 ]; then
|
||||||
ECHO_FORMAT "1\n" "white" "bold"
|
ECHO_FORMAT "1\n" "white" "bold"
|
||||||
else
|
else
|
||||||
ECHO_FORMAT "0\n"
|
ECHO_FORMAT "0\n"
|
||||||
|
@ -696,18 +708,6 @@ fi
|
||||||
# Initialize tests
|
# Initialize tests
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Default values for level
|
|
||||||
level[1]=auto
|
|
||||||
level[2]=auto
|
|
||||||
level[3]=auto
|
|
||||||
level[4]=0
|
|
||||||
level[5]=auto
|
|
||||||
level[6]=auto
|
|
||||||
level[7]=auto
|
|
||||||
level[8]=0
|
|
||||||
level[9]=0
|
|
||||||
level[10]=0
|
|
||||||
|
|
||||||
# Purge some log files
|
# Purge some log files
|
||||||
> "$complete_log"
|
> "$complete_log"
|
||||||
> "$test_result"
|
> "$test_result"
|
||||||
|
@ -1066,6 +1066,7 @@ then
|
||||||
# And if package check it's in the official CI environment
|
# And if package check it's in the official CI environment
|
||||||
# Check the level variation
|
# Check the level variation
|
||||||
elif [ $type_exec_env -eq 2 ]
|
elif [ $type_exec_env -eq 2 ]
|
||||||
|
then
|
||||||
|
|
||||||
# Get the job name, stored in the work_list
|
# Get the job name, stored in the work_list
|
||||||
job=$(head -n1 "$script_dir/../work_list" | cut -d ';' -f 3)
|
job=$(head -n1 "$script_dir/../work_list" | cut -d ';' -f 3)
|
||||||
|
@ -1084,16 +1085,16 @@ elif [ $type_exec_env -eq 2 ]
|
||||||
message="Application $app_name"
|
message="Application $app_name"
|
||||||
# If non previous level was found
|
# If non previous level was found
|
||||||
if [ -z "$previous_level" ]; then
|
if [ -z "$previous_level" ]; then
|
||||||
message="$message just reach the level $level"
|
message="$message just reach the level $global_level"
|
||||||
# If the level stays the same
|
# If the level stays the same
|
||||||
elif [ $level -eq $previous_level ]; then
|
elif [ $global_level -eq $previous_level ]; then
|
||||||
message="$message stays at level $level"
|
message="$message stays at level $global_level"
|
||||||
# If the level go up
|
# If the level go up
|
||||||
elif [ $level -gt $previous_level ]; then
|
elif [ $global_level -gt $previous_level ]; then
|
||||||
message="$message rise from level $previous_level to level $level"
|
message="$message rise from level $previous_level to level $global_level"
|
||||||
# If the level go down
|
# If the level go down
|
||||||
elif [ $level -lt $previous_level ]; then
|
elif [ $global_level -lt $previous_level ]; then
|
||||||
message="$message go down from level $previous_level to level $level"
|
message="$message go down from level $previous_level to level $global_level"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1102,9 +1103,10 @@ fi
|
||||||
# Add the log address
|
# Add the log address
|
||||||
# And inform with xmpp
|
# And inform with xmpp
|
||||||
if [ $type_exec_env -eq 2 ]
|
if [ $type_exec_env -eq 2 ]
|
||||||
|
then
|
||||||
|
|
||||||
# Build the address of the server from auto.conf
|
# Build the address of the server from auto.conf
|
||||||
ci_path=$(grep "main_domain=" "$script_dir/../auto_build/auto.conf" | cut -d= -f2)/$(grep "CI_PATH=" "$script_dir/../auto_build/auto.conf" | cut -d= -f2)
|
ci_path=$(grep "DOMAIN=" "$script_dir/../auto_build/auto.conf" | cut -d= -f2)/$(grep "CI_PATH=" "$script_dir/../auto_build/auto.conf" | cut -d= -f2)
|
||||||
|
|
||||||
# Add the log adress to the message
|
# Add the log adress to the message
|
||||||
message="$message on https://$ci_path$job_log"
|
message="$message on https://$ci_path$job_log"
|
||||||
|
|
|
@ -275,8 +275,6 @@ replace_manifest_key () {
|
||||||
if [ -n "$manifest_key" ]
|
if [ -n "$manifest_key" ]
|
||||||
then
|
then
|
||||||
manifest_args_mod=$(echo $manifest_args_mod | sed "s@$manifest_key=[^&]*\&@${manifest_key}=${2}\&@")
|
manifest_args_mod=$(echo $manifest_args_mod | sed "s@$manifest_key=[^&]*\&@${manifest_key}=${2}\&@")
|
||||||
else
|
|
||||||
ECHO_FORMAT "The manifest key $manifest_key doesn't found in the check_process\n" "red" clog
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1044,7 +1042,7 @@ TEST_LAUNCHER () {
|
||||||
TESTING_PROCESS () {
|
TESTING_PROCESS () {
|
||||||
# Launch all tests successively
|
# Launch all tests successively
|
||||||
|
|
||||||
ECHO_FORMAT "\nTests serie: $tests_serie\n" "white" "underlined" clog
|
ECHO_FORMAT "\nTests serie: ${tests_serie#;; }\n" "white" "underlined" clog
|
||||||
|
|
||||||
# Init the value for the current test
|
# Init the value for the current test
|
||||||
cur_test=1
|
cur_test=1
|
||||||
|
|
Loading…
Add table
Reference in a new issue