mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
We shou;dn't need guess_test_configuration anymore because tests.toml is mandatory
This commit is contained in:
parent
cef5c96090
commit
f9d42bf379
2 changed files with 1 additions and 50 deletions
|
@ -1,42 +0,0 @@
|
|||
guess_test_configuration() {
|
||||
|
||||
log_error "No tests.toml file found."
|
||||
log_warning "Package check will attempt to automatically guess what tests to run."
|
||||
|
||||
local test_id=100
|
||||
|
||||
add_test() {
|
||||
local test_type="$1"
|
||||
local test_arg="$2"
|
||||
test_id="$((test_id+1))"
|
||||
local extra="{}"
|
||||
local preupgrade_template=""
|
||||
|
||||
jq -n \
|
||||
--arg test_serie "default" \
|
||||
--arg test_type "$test_type" \
|
||||
--arg test_arg "$test_arg" \
|
||||
--arg preinstall_template "" \
|
||||
--arg preupgrade_template "$preupgrade_template" \
|
||||
--arg install_args "$install_args" \
|
||||
--argjson extra "$extra" \
|
||||
'{ $test_serie, $test_type, $test_arg, $preinstall_template, $preupgrade_template, $install_args, $extra }' \
|
||||
> "$TEST_CONTEXT/tests/$test_id.json"
|
||||
}
|
||||
|
||||
local install_args=$(python3 "./lib/default_install_args.py" "$package_path"/manifest.*)
|
||||
|
||||
add_test "TEST_PACKAGE_LINTER"
|
||||
add_test "TEST_INSTALL" "root"
|
||||
add_test "TEST_INSTALL" "subdir"
|
||||
if echo $install_args | grep -q "is_public=\|init_main_permission="
|
||||
then
|
||||
add_test "TEST_INSTALL" "private"
|
||||
fi
|
||||
if grep multi_instance "$package_path"/manifest.* | grep -q true
|
||||
then
|
||||
add_test "TEST_INSTALL" "multi"
|
||||
fi
|
||||
add_test "TEST_BACKUP_RESTORE"
|
||||
add_test "TEST_UPGRADE"
|
||||
}
|
|
@ -3,7 +3,6 @@
|
|||
source lib/lxc.sh
|
||||
source lib/tests.sh
|
||||
source lib/witness.sh
|
||||
source lib/legacy.sh
|
||||
|
||||
readonly full_log="./full_log_${WORKER_ID}.log"
|
||||
readonly result_json="./results_${WORKER_ID}.json"
|
||||
|
@ -29,13 +28,7 @@ run_all_tests() {
|
|||
|
||||
readonly app_id="$(grep '^id = ' $package_path/manifest.toml | tr -d '" ' | awk -F= '{print $2}')"
|
||||
|
||||
tests_toml="$package_path/tests.toml"
|
||||
if [ -e "$tests_toml" ]
|
||||
then
|
||||
DIST=$DIST "./lib/parse_tests_toml.py" "$package_path" --dump-to "$TEST_CONTEXT/tests"
|
||||
else
|
||||
guess_test_configuration
|
||||
fi
|
||||
DIST=$DIST "./lib/parse_tests_toml.py" "$package_path" --dump-to "$TEST_CONTEXT/tests"
|
||||
|
||||
# Start the timer for this test
|
||||
start_timer
|
||||
|
|
Loading…
Add table
Reference in a new issue