mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Fixes after tests on the battlefield
This commit is contained in:
parent
a65f16dd08
commit
25dadd002c
3 changed files with 12 additions and 8 deletions
|
@ -247,11 +247,11 @@ function fetch_package_to_test() {
|
|||
# Force the branch master if no branch is specified.
|
||||
if [ -z "$gitbranch" ]
|
||||
then
|
||||
if git ls-remote --quiet --exit-code $path_to_package_to_test master
|
||||
if git ls-remote --quiet --exit-code $path_to_package_to_test master >/dev/null
|
||||
then
|
||||
gitbranch="-b master"
|
||||
else
|
||||
if git ls-remote --quiet --exit-code $path_to_package_to_test stable
|
||||
if git ls-remote --quiet --exit-code $path_to_package_to_test stable >/dev/null
|
||||
then
|
||||
gitbranch="-b stable"
|
||||
else
|
||||
|
|
|
@ -81,7 +81,8 @@ LOAD_LXC_SNAPSHOT () {
|
|||
|
||||
LXC_STOP $LXC_NAME
|
||||
|
||||
lxc restore $LXC_NAME $snapname
|
||||
lxc restore $LXC_NAME $snapname || log_error "Failed to restore snapshot ? The next step may miserably crash because of this ... if this happens to often, maybe restarting the LXD daemon can help ..."
|
||||
|
||||
lxc start $LXC_NAME
|
||||
_LXC_START_AND_WAIT $LXC_NAME
|
||||
}
|
||||
|
@ -132,7 +133,7 @@ LXC_RESET () {
|
|||
LXC_STOP $LXC_NAME
|
||||
|
||||
if lxc info $LXC_NAME >/dev/null 2>/dev/null; then
|
||||
local current_storage=$(lxc list $LXC_NAME --format json --columns b | jq '.[].expanded_devices.root.pool')
|
||||
local current_storage=$(lxc list $LXC_NAME --format json --columns b | jq -r '.[].expanded_devices.root.pool')
|
||||
swapoff "$(lxc storage get $current_storage source)/containers/$LXC_NAME/rootfs/swap" 2>/dev/null
|
||||
fi
|
||||
|
||||
|
@ -142,7 +143,7 @@ LXC_RESET () {
|
|||
|
||||
_LXC_START_AND_WAIT() {
|
||||
|
||||
restart_container()
|
||||
restart_container()
|
||||
{
|
||||
LXC_STOP $1
|
||||
lxc start "$1"
|
||||
|
|
|
@ -11,8 +11,8 @@ readonly summary_png="./summary_${WORKER_ID}.png"
|
|||
|
||||
# Purge some log files
|
||||
rm -f "$full_log" && touch "$full_log"
|
||||
rm $result_json
|
||||
rm $summary_png
|
||||
rm -f $result_json
|
||||
rm -f $summary_png
|
||||
|
||||
# Redirect fd 3 (=debug steam) to full log
|
||||
exec 3>>$full_log
|
||||
|
@ -96,7 +96,10 @@ run_all_tests() {
|
|||
# End the timer for the test
|
||||
stop_timer all_tests
|
||||
|
||||
echo "You can find the complete log of these tests in $(realpath $complete_log)"
|
||||
if [[ "$IN_YUNORUNNER" != "1" ]]
|
||||
then
|
||||
echo "You can find the complete log of these tests in $(realpath $full_log)"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue