Author: richter Date: Tue Aug 9 18:17:37 2011 New Revision: 2714 Log: testbed interface: add command line options to main script and finetune logging Modified: trunk/tools/testbed/scripts/pisa-testbed Modified: trunk/tools/testbed/scripts/pisa-testbed ============================================================================== --- trunk/tools/testbed/scripts/pisa-testbed Tue Aug 9 16:35:02 2011 (r2713) +++ trunk/tools/testbed/scripts/pisa-testbed Tue Aug 9 18:17:37 2011 (r2714) @@ -17,6 +17,17 @@ LOG_PATH="$TESTBED_PATH/log" mkdir -p "$TMP_PATH" "$BIN_PATH" "$LOG_PATH" +while [ "$1" != "${1#-}" ]; do + case "$1" in + -e|--exclude) EXCLUDE="$2"; shift 2 ;; + -h|--help) usage; exit ;; + -q|--quiet) VERBOSITY="1"; shift 1 ;; + -qq) VERBOSITY="0"; shift 1 ;; + -v|--verbose) VERBOSITY="2"; shift 1 ;; + -vv) VERBOSITY="3"; shift 1 ;; + esac +done + if ! [ -e "$TESTBED_PATH/config" ]; then if [ -e "$TESTBED_PATH/config.default" ]; then echo "copied config.default to config" @@ -323,9 +334,9 @@ if echo ${function} | egrep -q "init_node|finish_node"; then eval "${function#*___} ${function%%___*}" elif grep -q ":${function}$" "$TMP_PATH"/functions_known; then - eval "$PRE_CMD $function ${*:+'$*'} | ${LOG_CMD:-cat > "$LOG_PATH/$function".log}" 3>&1 + eval "$PRE_CMD $function ${*:+'$*'} | ${LOG_CMD:-tee "$LOG_PATH/$function".log}" 3>&1 else - eval "$PRE_CMD ${function#*___} ${*:+'$*'} | ${LOG_CMD:-cat > "$LOG_PATH/$function".log}" 3>&1 + eval "$PRE_CMD ${function#*___} ${*:+'$*'} | ${LOG_CMD:-tee "$LOG_PATH/$function".log}" 3>&1 fi fi done -- This is the pisa developer mailing list. Please also subscribe to the main pisa list at: //www.freelists.org/list/pisa