mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Semantic
This commit is contained in:
parent
14908abbd5
commit
ad437c4030
2 changed files with 19 additions and 18 deletions
|
@ -864,7 +864,7 @@ initialize_values() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Number of tests to proceed
|
# Number of tests to proceed
|
||||||
all_test=0
|
total_number_of_test=0
|
||||||
|
|
||||||
# Default path
|
# Default path
|
||||||
test_path=/
|
test_path=/
|
||||||
|
@ -969,7 +969,7 @@ then
|
||||||
initialize_values
|
initialize_values
|
||||||
|
|
||||||
# Break after the first tests serie
|
# Break after the first tests serie
|
||||||
if [ $all_test -ne 0 ] && [ $bash_mode -ne 1 ]; then
|
if [ $total_number_of_test -ne 0 ] && [ $bash_mode -ne 1 ]; then
|
||||||
read -p "Press a key to start the next tests serie..." < /dev/tty
|
read -p "Press a key to start the next tests serie..." < /dev/tty
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1102,7 +1102,7 @@ then
|
||||||
|
|
||||||
count_test () {
|
count_test () {
|
||||||
# Increase the number of test, if this test is set at 1.
|
# Increase the number of test, if this test is set at 1.
|
||||||
test "$1" -eq 1 && all_test=$((all_test+1))
|
test "$1" -eq 1 && total_number_of_test=$((total_number_of_test+1))
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get standard options
|
# Get standard options
|
||||||
|
@ -1208,7 +1208,7 @@ else
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
port_already_use=0
|
port_already_use=0
|
||||||
change_url=0
|
change_url=0
|
||||||
all_test=$((all_test+9))
|
total_number_of_test=$((total_number_of_test+9))
|
||||||
|
|
||||||
|
|
||||||
# Read each arguments and store them
|
# Read each arguments and store them
|
||||||
|
@ -1251,7 +1251,7 @@ else
|
||||||
count_test () {
|
count_test () {
|
||||||
# Decrease the number of test, if this test is not already removed.
|
# Decrease the number of test, if this test is not already removed.
|
||||||
if [ $1 -eq 1 ]; then
|
if [ $1 -eq 1 ]; then
|
||||||
all_test=$((all_test-1))
|
total_number_of_test=$((total_number_of_test-1))
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -1276,7 +1276,7 @@ else
|
||||||
error "The manifest key for public was not found."
|
error "The manifest key for public was not found."
|
||||||
setup_private=0
|
setup_private=0
|
||||||
setup_public=0
|
setup_public=0
|
||||||
all_test=$((all_test-2))
|
total_number_of_test=$((total_number_of_test-2))
|
||||||
fi
|
fi
|
||||||
# Remove the multi-instance test if this parameter is set at false in the manifest.
|
# Remove the multi-instance test if this parameter is set at false in the manifest.
|
||||||
if grep multi_instance "$package_path/manifest.json" | grep -q false
|
if grep multi_instance "$package_path/manifest.json" | grep -q false
|
||||||
|
|
|
@ -179,7 +179,7 @@ REMOVE_APP () {
|
||||||
VALIDATE_THAT_APP_CAN_BE_ACCESSED () {
|
VALIDATE_THAT_APP_CAN_BE_ACCESSED () {
|
||||||
|
|
||||||
# Not checking this if this ain't relevant for the current test / app
|
# Not checking this if this ain't relevant for the current test / app
|
||||||
if [ $use_curl -ne 1 ]
|
if [ $enable_validate_that_app_can_be_accessed == "true" ]
|
||||||
then
|
then
|
||||||
curl_error=0
|
curl_error=0
|
||||||
yuno_portal=0
|
yuno_portal=0
|
||||||
|
@ -430,10 +430,10 @@ VALIDATE_THAT_APP_CAN_BE_ACCESSED () {
|
||||||
|
|
||||||
start_test () {
|
start_test () {
|
||||||
|
|
||||||
title "$1 [Test $cur_test/$all_test]"
|
title "$1 [Test $current_test_number/$total_number_of_test]"
|
||||||
|
|
||||||
# Increment the value of the current test
|
# Increment the value of the current test
|
||||||
cur_test=$((cur_test+1))
|
current_test_number=$((current_test_number+1))
|
||||||
}
|
}
|
||||||
|
|
||||||
replace_manifest_key () {
|
replace_manifest_key () {
|
||||||
|
@ -534,8 +534,6 @@ CHECK_SETUP () {
|
||||||
start_test "Installation on the root"
|
start_test "Installation on the root"
|
||||||
else
|
else
|
||||||
start_test "Installation without url access"
|
start_test "Installation without url access"
|
||||||
# Disable the curl test
|
|
||||||
use_curl=0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy original arguments
|
# Copy original arguments
|
||||||
|
@ -1785,7 +1783,7 @@ TEST_LAUNCHER () {
|
||||||
if [ $false_positive_error_loop -lt $max_false_positive_error_loop ]
|
if [ $false_positive_error_loop -lt $max_false_positive_error_loop ]
|
||||||
then
|
then
|
||||||
warning "The test will restart."
|
warning "The test will restart."
|
||||||
cur_test=$((cur_test-1))
|
current_test_number=$((current_test_number-1))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1937,10 +1935,13 @@ TESTING_PROCESS () {
|
||||||
PRINT_YUNOHOST_VERSION
|
PRINT_YUNOHOST_VERSION
|
||||||
|
|
||||||
# Init the value for the current test
|
# Init the value for the current test
|
||||||
cur_test=1
|
current_test_number=1
|
||||||
|
|
||||||
# By default, all tests will try to access the app with curl
|
# We will chech that the app can be accessed
|
||||||
use_curl=1
|
# (except if it's a no-url app)
|
||||||
|
[ $setup_nourl -eq 0 ] \
|
||||||
|
&& enable_validate_that_app_can_be_accessed="true" \
|
||||||
|
||enable_validate_that_app_can_be_accessed="false"
|
||||||
|
|
||||||
# Check the package with package linter
|
# Check the package with package linter
|
||||||
[ $pkg_linter -eq 1 ] && PACKAGE_LINTER
|
[ $pkg_linter -eq 1 ] && PACKAGE_LINTER
|
||||||
|
|
Loading…
Add table
Reference in a new issue