diff --git a/sub_scripts/testing_process.sh b/sub_scripts/testing_process.sh index 65a416f..079baf0 100644 --- a/sub_scripts/testing_process.sh +++ b/sub_scripts/testing_process.sh @@ -21,6 +21,19 @@ break_before_continue () { fi } +#================================================= + +PRINT_YUNOHOST_VERSION () { + ECHO_FORMAT ">> YunoHost versions:\n" "white" "bold" clog + # Be sure that the container is running + LXC_START "true" + # Print the version of YunoHost from the LXC container + ssh $arg_ssh $lxc_name "sudo yunohost --version" + + # Get the version of YunoHost from the LXC container + ynh_version=$(ssh -q $lxc_name "sudo yunohost --version --output-as plain | grep -A4 moulinette | tail -n1 | sed 's@\.@@g'") +} + #================================================= # Install and remove an app #================================================= @@ -53,8 +66,17 @@ SETUP_APP () { ECHO_FORMAT "$(cat "$temp_log")\n" clog fi + # Force installation of 3rd party apps without asking for confirmation. + # Only with the version 3.4.1 or later. + if [ $ynh_version -ge 341 ] + then + local force_3rd="--force" + else + local force_3rd="" + fi + # Install the application in a LXC container - LXC_START "sudo PACKAGE_CHECK_EXEC=1 yunohost --debug app install \"$package_dir\" -a \"$manifest_args_mod\"" + LXC_START "sudo PACKAGE_CHECK_EXEC=1 yunohost --debug app install $force_3rd \"$package_dir\" -a \"$manifest_args_mod\"" # yunohost_result gets the return code of the installation yunohost_result=$? @@ -1547,7 +1569,9 @@ check_witness_files () { TESTING_PROCESS () { # Launch all tests successively - ECHO_FORMAT "\nTests serie: ${tests_serie#;; }\n" "white" "underlined" clog + ECHO_FORMAT "\nTests serie: ${tests_serie#;; }\n\n" "white" "underlined" clog + + PRINT_YUNOHOST_VERSION # Init the value for the current test cur_test=1