Implement VERBOSE the same way as DEBUG.

devs/tasn/jenkins
Tom Hacohen 10 years ago
parent 50cef78346
commit 6873cad582
  1. 31
      src/scripts/exactness.in

@ -12,6 +12,13 @@ function DEBUG()
[ "$_DEBUG" == "on" ] && $@
}
function VERBOSE()
{
if $_verbose ; then
$@
fi
}
do_help () {
echo "Use $0 to test application screen-layout."
echo "First, you need to compose a tests file as follows:"
@ -127,10 +134,7 @@ do_record () {
return 0
fi
if [ "$_verbose" -ne 0 ]
then
echo "do_record: $_test_name"
fi
VERBOSE echo "do_record: $_test_name"
TSUITE_RECORDING='rec' TSUITE_BASE_DIR=${_base_dir} TSUITE_DEST_DIR=${_dest_dir} TSUITE_FILE_NAME=${_base_dir}/${_test_name}.rec TSUITE_TEST_NAME=${_test_name} LD_PRELOAD=${OUR_LIBPATH}/libexactness.so eval ${_test_cmd}
}
@ -153,10 +157,7 @@ do_simulation () {
fi
if [ "$_verbose" -ne 0 ]
then
echo "do_simulation: $_test_name"
fi
VERBOSE echo "do_simulation: $_test_name"
TSUITE_BASE_DIR=${_base_dir} TSUITE_DEST_DIR=${_dest_dir} TSUITE_FILE_NAME=${file_name} TSUITE_TEST_NAME=${_test_name} LD_PRELOAD=${OUR_LIBPATH}/libexactness.so eval ${_test_cmd}
}
@ -192,18 +193,12 @@ do_play () {
mkdir -p "$_dest_dir" &> /dev/null
fi
if [ "$_verbose" -ne 0 ]
then
echo "do_play: $_test_name"
fi
VERBOSE echo "do_play: $_test_name"
ELM_ENGINE="buffer" TSUITE_BASE_DIR=${_base_dir} TSUITE_DEST_DIR=${_dest_dir} TSUITE_FILE_NAME=${file_name} TSUITE_TEST_NAME=${_test_name} LD_PRELOAD=${OUR_LIBPATH}/libexactness.so eval ${_test_cmd}
}
compare_files () {
if [ "$_verbose" -ne 0 ]
then
echo "compare_files: <$1> and <$2>"
fi
VERBOSE echo "compare_files: <$1> and <$2>"
if [ -e "$1" ]
# First file exists
@ -343,7 +338,7 @@ name_in_args () {
# Script Entry Point
OUR_LIBPATH="@libdir@/exactness"
_verbose=0
_verbose=false
_record=
_play=
_compare=
@ -394,7 +389,7 @@ do
h) do_help
exit 0
;;
v) _verbose=1
v) _verbose=true
;;
?) do_help
exit 0

Loading…
Cancel
Save