#!/bin/bash # Copyright 2010-2013 Frank Liepold / 1&1 Internet AG # # Email: frank.liepold@1und1.de # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ##################################################################### ## the base directory of all .sh and .conf files main_base_directory=/home/fl/mars/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 ## if main_host_list is changed in a *.conf file we need to recompute the values ## of all dependent globals. 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)) # see default-cluster.conf # we construct the expression cluster_mars_dir_lv_name_list=([host-1]=$cluster_mars_dir_lv [host-2]=$cluster_mars_dir_lv ...) 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[@]/%/]=$cluster_mars_dir_lv}); echo ${y[@]})) fi } main_set_globals_depending_on_main_host_list ## errorcode to prevent lib_exit from removing lock files ## (main_lock_file_list) main_prevent_remove_lock_files_code=42 ## host indexed list of bootloaders. In case of lilo we check after installing ## a kernel, that the label given in main_host_bootloader_label_list exists ## in /etc/lilo.conf and call lilo -R