From f66ee51338f3e06dcf79d614cdeaf10cf61972a0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 29 Nov 2020 21:37:31 +0100 Subject: [PATCH] Moar misc cleanup --- package_check.sh | 19 +++++++++---------- sub_scripts/launcher.sh | 4 ++-- sub_scripts/testing_process.sh | 10 +++++----- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/package_check.sh b/package_check.sh index 7ab07af..7ec31eb 100755 --- a/package_check.sh +++ b/package_check.sh @@ -578,17 +578,16 @@ TEST_RESULTS () { # Print the result for each test echo -e "\n\n" print_result "Package linter" $RESULT_linter - print_result "Installation" $RESULT_global_setup - print_result "Deleting" $RESULT_global_remove - print_result "Installation in a sub path" $RESULT_check_sub_dir - print_result "Deleting from a sub path" $RESULT_check_remove_sub_dir - print_result "Installation on the root" $RESULT_check_root - print_result "Deleting from root" $RESULT_check_remove_root + print_result "Install" $RESULT_global_setup + print_result "Remove" $RESULT_global_remove + print_result "Install (subpath)" $RESULT_check_sub_dir + print_result "Remove (subpath)" $RESULT_check_remove_sub_dir + print_result "Install (root)" $RESULT_check_root + print_result "Remove (root)" $RESULT_check_remove_root print_result "Upgrade" $RESULT_check_upgrade - print_result "Installation in private mode" $RESULT_check_private - print_result "Installation in public mode" $RESULT_check_public - print_result "Multi-instance installations" $RESULT_check_multi_instance - print_result "Malformed path" $RESULT_check_path + print_result "Install (private mode)" $RESULT_check_private + print_result "Install (public mode)" $RESULT_check_public + print_result "Install (multi-instance)" $RESULT_check_multi_instance print_result "Port already used" $RESULT_check_port print_result "Backup" $RESULT_check_backup print_result "Restore" $RESULT_check_restore diff --git a/sub_scripts/launcher.sh b/sub_scripts/launcher.sh index 7b8b05a..38e0bc3 100755 --- a/sub_scripts/launcher.sh +++ b/sub_scripts/launcher.sh @@ -105,7 +105,7 @@ create_temp_backup () { # Set this snapshot as the current snapshot current_snapshot=snap$snap_number - stop_timer 1 >&2 + stop_timer 1 >> $complete_log # Restart the container, after the snapshot LXC_START "true" >&2 @@ -188,7 +188,7 @@ LXC_START () { local j=0 for j in `seq 1 5` do - echo -n . + echo -n . >> "$test_result" # Try to connect with ssh to check if the container is ready to work. if ssh $arg_ssh -o ConnectTimeout=10 $lxc_name "exit 0" > /dev/null 2>&1; then # Break the for loop if the container is ready. diff --git a/sub_scripts/testing_process.sh b/sub_scripts/testing_process.sh index cd3aed5..696ddbc 100644 --- a/sub_scripts/testing_process.sh +++ b/sub_scripts/testing_process.sh @@ -167,7 +167,7 @@ REMOVE_APP () { # Make a break if auto_remove is set break_before_continue - ECHO_FORMAT "\nDeleting...\n" "white" "bold" clog + ECHO_FORMAT "\nRemoving the app...\n" "white" "bold" clog # Remove the application from the LXC container LXC_START "sudo PACKAGE_CHECK_EXEC=1 yunohost --debug app remove \"$ynh_app_id\"" @@ -177,9 +177,9 @@ REMOVE_APP () { # Print the result of the remove command if [ "$yunohost_remove" -eq 0 ]; then - ECHO_FORMAT "Deleting successful. ($yunohost_remove)\n" "white" clog + ECHO_FORMAT "Remove successful. ($yunohost_remove)\n" "white" clog else - ECHO_FORMAT "Deleting failed. ($yunohost_remove)\n" "white" clog + ECHO_FORMAT "Remove failed. ($yunohost_remove)\n" "white" clog fi # Check all the witness files, to verify if them still here @@ -620,7 +620,7 @@ CHECK_SETUP () { # Check if a snapshot already exist for a root install if [ -z "$root_snapshot" ] then - ECHO_FORMAT "Create a snapshot for root installation.\n" "white" clog + ECHO_FORMAT "Create a snapshot for root installation.\n" "white" clog >> $complete_log create_temp_backup 2 root_snapshot=snap2 fi @@ -629,7 +629,7 @@ CHECK_SETUP () { if [ -z "$subpath_snapshot" ] then # Then create a snapshot - ECHO_FORMAT "Create a snapshot for sub path installation.\n" "white" clog + ECHO_FORMAT "Create a snapshot for sub path installation.\n" "white" clog >> $complete_log create_temp_backup 1 subpath_snapshot=snap1 fi