mirror of https://github.com/schoebel/mars
80 lines
2.3 KiB
Bash
80 lines
2.3 KiB
Bash
#!/bin/bash
|
|
|
|
## the base directory of all .sh and .conf files
|
|
main_base_directory=/home/fl/mars/mars-git-hub/test_suite
|
|
|
|
## hosts the tests are running on. The first host is initially always used as
|
|
## primary host
|
|
main_host_list=("istore-test-bs4" "istore-test-bap4")
|
|
|
|
## file to implement a primitive locking mechanism to avoid concurrent runs
|
|
## of the test suite on the same host
|
|
declare -g -A main_lock_file_list
|
|
|
|
function main_set_globals_depending_on_main_host_list
|
|
{
|
|
eval main_lock_file_list=($(for h in "${main_host_list[@]}";do printf "[$h]=/tmp/test-suite_on.$h ";done))
|
|
|
|
if declare -p cluster_mars_dir_lv_name_list 2>/dev/null |\
|
|
grep 'declare -A' >/dev/null
|
|
then
|
|
eval cluster_mars_dir_lv_name_list=($(x=(${main_host_list[@]/#/[}); y=(${x[@]/%/]=lv-6-100}); echo ${y[@]}))
|
|
fi
|
|
}
|
|
|
|
main_set_globals_depending_on_main_host_list
|
|
|
|
## errorcode to prevent lib_exit from removing lock files
|
|
main_prevent_remove_lock_files_code=42
|
|
|
|
declare -g -A main_host_bootloader_list
|
|
main_host_bootloader_list=(\
|
|
[istore-test-bs7]=grub \
|
|
[istore-test-bap7]=lilo \
|
|
[istore-test-bs4]=lilo \
|
|
[istore-test-bap4]=lilo \
|
|
[istore-test-bs2]=lilo \
|
|
[ovzd-test-bs1]=grub \
|
|
[ovzd-test-bap1]=grub \
|
|
)
|
|
|
|
declare -g -A main_host_bootloader_label_list
|
|
main_host_bootloader_label_list=(\
|
|
[istore-test-bs7]=no_label \
|
|
[istore-test-bap7]=mars \
|
|
[istore-test-bs4]=mars \
|
|
[istore-test-bap4]=mars \
|
|
[istore-test-bs2]=mars \
|
|
[ovzd-test-bs1]=no_label \
|
|
[ovzd-test-bap1]=no_label \
|
|
)
|
|
|
|
## associative array containing functions (as indexes) to be called in case of
|
|
## unexpected errors or signals. See also lib_exit
|
|
## The values of the array are the parameter lists for the function calls
|
|
|
|
declare -g -A main_error_recovery_functions
|
|
|
|
## to access others hosts without password
|
|
## see also lib_remote_idfile
|
|
|
|
main_ssh_idfile_opt="-i $HOME/.ssh/id_dsa_no_pw"
|
|
|
|
|
|
main_mars_directory="/mars"
|
|
|
|
main_mars_fs_type="ext4"
|
|
|
|
main_mars_errmsg_prefix='(XIO|MARS)_error'
|
|
main_mars_wrnmsg_prefix='(XIO|MARS)_warn'
|
|
|
|
## to be able to kill all scripts started on a remote host these scripts
|
|
## must have a fixed pattern in their name
|
|
main_prefix_scripts='MARS-TEST-SCRIPT'
|
|
|
|
# results of checks of links
|
|
declare -g -A main_link_status
|
|
main_link_status=(["link_ok"]=0 ["link_does_not_exist"]=1 \
|
|
["link_has_wrong_value"]=2)
|
|
|