Skip to content
Snippets Groups Projects
Commit 61b9335f authored by bdr7fv's avatar bdr7fv
Browse files

added a --step-option option, currently only supports --step-option p1transform:canaries=on/off

Former-commit-id: 1b121023d73b17ca847c4b46255476c1553951e1
parent 3350eaf1
No related branches found
No related tags found
Loading
...@@ -94,6 +94,39 @@ check_step_option() ...@@ -94,6 +94,39 @@ check_step_option()
} }
set_p1transform_option()
{
option=`echo $1 | sed 's/\(.*\)=.*/\1/'`
val=`echo $1 | sed 's/.*=\(.*\)/\1/'`
case "$option" in
canaries)
DO_CANARIES=$val
;;
*) echo "Unrecognized p1transform option: $option\n"
exit -2 #What's the correct exit status?
;;
esac
}
set_step_option()
{
step=`echo $1 | sed 's/\(.*\):.*/\1/'`
option=`echo $1 | sed 's/.*:\(.*\)/\1/'`
case "$step" in
p1transform)
set_p1transform_option $option
;;
*) echo "Unrecognized --step-option: $step"
exit -2 #What's the correct exit status?
;;
esac
}
# #
# check that the remaining options are validly parsable, and record what they are. # check that the remaining options are validly parsable, and record what they are.
...@@ -108,7 +141,7 @@ check_options() ...@@ -108,7 +141,7 @@ check_options()
# Note that we use `"$@"' to let each command-line parameter expand to a # Note that we use `"$@"' to let each command-line parameter expand to a
# separate word. The quotes around `$@' are essential! # separate word. The quotes around `$@' are essential!
# We need TEMP as the `eval set --' would nuke the return value of getopt. # We need TEMP as the `eval set --' would nuke the return value of getopt.
TEMP=`getopt -o s:t:w: --long integer_warnings_only --long step: --long timeout: --long manual_test_script: --long manual_test_coverage_file: --long watchdog: -n 'ps_analyze.sh' -- "$@"` TEMP=`getopt -o s:t:w: --long step-option: --long integer_warnings_only --long step: --long timeout: --long manual_test_script: --long manual_test_coverage_file: --long watchdog: -n 'ps_analyze.sh' -- "$@"`
# error check # # error check #
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit -1 ; fi if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit -1 ; fi
...@@ -118,6 +151,10 @@ check_options() ...@@ -118,6 +151,10 @@ check_options()
while true ; do while true ; do
case "$1" in case "$1" in
--step-option)
set_step_option $2
shift 2
;;
-w|--watchdog) -w|--watchdog)
# This is the watchdog value # This is the watchdog value
watchdog_val=$2 watchdog_val=$2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment