mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
commit
711cfe5141
2 changed files with 23 additions and 10 deletions
|
@ -313,7 +313,9 @@ TEST_LAUNCHER () {
|
||||||
# Execute the test
|
# Execute the test
|
||||||
$test_type $test_arg
|
$test_type $test_arg
|
||||||
|
|
||||||
[ $? -eq 0 ] && SET_RESULT "success" main_result || SET_RESULT "failure" main_result
|
local test_result=$?
|
||||||
|
|
||||||
|
[ $test_result -eq 0 ] && SET_RESULT "success" main_result || SET_RESULT "failure" main_result
|
||||||
|
|
||||||
# Check that we don't have this message characteristic of a file that got manually modified,
|
# Check that we don't have this message characteristic of a file that got manually modified,
|
||||||
# which should not happen during tests because no human modified the file ...
|
# which should not happen during tests because no human modified the file ...
|
||||||
|
@ -383,7 +385,7 @@ at_least_one_install_succeeded () {
|
||||||
|
|
||||||
break_before_continue () {
|
break_before_continue () {
|
||||||
|
|
||||||
if [ $interactive -eq 1 ]
|
if [ $interactive -eq 1 ] || [ $interactive_on_errors -eq 1 ] && [ ! $test_result -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "To enter a shell on the lxc:"
|
echo "To enter a shell on the lxc:"
|
||||||
echo " lxc exec $LXC_NAME bash"
|
echo " lxc exec $LXC_NAME bash"
|
||||||
|
|
|
@ -10,11 +10,16 @@ print_help() {
|
||||||
Usage: package_check.sh [OPTION]... PACKAGE_TO_CHECK
|
Usage: package_check.sh [OPTION]... PACKAGE_TO_CHECK
|
||||||
|
|
||||||
-b, --branch=BRANCH Specify a branch to check.
|
-b, --branch=BRANCH Specify a branch to check.
|
||||||
-i, --interactive Wait for the user to continue before each remove.
|
-a, --arch=ARCH
|
||||||
|
-d, --dist=DIST
|
||||||
|
-y, --ynh-branch=BRANCH
|
||||||
|
-i, --interactive Wait for the user to continue before each remove
|
||||||
|
-e, --interactive-on-errors Wait for the user to continue on errors
|
||||||
-s, --force-stop Force the stop of running package_check
|
-s, --force-stop Force the stop of running package_check
|
||||||
-r, --rebuild (Re)Build the base container
|
-r, --rebuild (Re)Build the base container
|
||||||
(N.B.: you're not supposed to use this option, images
|
(N.B.: you're not supposed to use this option,
|
||||||
are supposed to be fetch from devbaseimgs.yunohost.org automatically)
|
images are supposed to be fetch from
|
||||||
|
devbaseimgs.yunohost.org automatically)
|
||||||
-h, --help Display this help
|
-h, --help Display this help
|
||||||
EOF
|
EOF
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -31,6 +36,7 @@ exit 0
|
||||||
|
|
||||||
gitbranch=""
|
gitbranch=""
|
||||||
interactive=0
|
interactive=0
|
||||||
|
interactive_on_errors=0
|
||||||
rebuild=0
|
rebuild=0
|
||||||
force_stop=0
|
force_stop=0
|
||||||
|
|
||||||
|
@ -65,7 +71,7 @@ function parse_args() {
|
||||||
# Initialize the index of getopts
|
# Initialize the index of getopts
|
||||||
OPTIND=1
|
OPTIND=1
|
||||||
# Parse with getopts only if the argument begin by -
|
# Parse with getopts only if the argument begin by -
|
||||||
getopts ":b:irsh" parameter || true
|
getopts ":b:iresh" parameter || true
|
||||||
case $parameter in
|
case $parameter in
|
||||||
b)
|
b)
|
||||||
# --branch=branch-name
|
# --branch=branch-name
|
||||||
|
@ -77,6 +83,11 @@ function parse_args() {
|
||||||
interactive=1
|
interactive=1
|
||||||
shift_value=1
|
shift_value=1
|
||||||
;;
|
;;
|
||||||
|
e)
|
||||||
|
# --interactive-on-errors
|
||||||
|
interactive_on_errors=1
|
||||||
|
shift_value=1
|
||||||
|
;;
|
||||||
r)
|
r)
|
||||||
# --rebuild
|
# --rebuild
|
||||||
rebuild=1
|
rebuild=1
|
||||||
|
|
Loading…
Add table
Reference in a new issue