|
Packit |
0b5880 |
#!/usr/bin/env sh
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
. ./test_vars
|
|
Packit |
0b5880 |
. $(dirname $0)/test_output_strings
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
# When the ex_output program is run with the STDOUT_DUMP mode, it will
|
|
Packit |
0b5880 |
# run with the normal output mode, then dump each output mode using
|
|
Packit |
0b5880 |
# srunner_print() in this order:
|
|
Packit |
0b5880 |
# CK_SILENT CK_MINIMAL CK_NORMAL CK_VERBOSE CK_ENV CK_SUBUNIT
|
|
Packit |
0b5880 |
# note though that CK_SUBUNIT does not output anything, as it is
|
|
Packit |
0b5880 |
# not fully considered an 'output mode'.
|
|
Packit |
0b5880 |
exp_silent_dump="$exp_minimal_result
|
|
Packit |
0b5880 |
$exp_normal_result
|
|
Packit |
0b5880 |
$exp_verbose_result"
|
|
Packit |
0b5880 |
exp_minimal_dump="$exp_minimal
|
|
Packit |
0b5880 |
$exp_minimal_result
|
|
Packit |
0b5880 |
$exp_normal_result
|
|
Packit |
0b5880 |
$exp_verbose_result
|
|
Packit |
0b5880 |
$exp_minimal_result"
|
|
Packit |
0b5880 |
exp_normal_dump="$exp_normal
|
|
Packit |
0b5880 |
$exp_minimal_result
|
|
Packit |
0b5880 |
$exp_normal_result
|
|
Packit |
0b5880 |
$exp_verbose_result
|
|
Packit |
0b5880 |
$exp_normal_result"
|
|
Packit |
0b5880 |
exp_verbose_dump="$exp_verbose
|
|
Packit |
0b5880 |
$exp_minimal_result
|
|
Packit |
0b5880 |
$exp_normal_result
|
|
Packit |
0b5880 |
$exp_verbose_result
|
|
Packit |
0b5880 |
$exp_verbose_result"
|
|
Packit |
0b5880 |
exp_subunit_dump="$exp_subunit
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
$exp_minimal_result
|
|
Packit |
0b5880 |
$exp_normal_result
|
|
Packit |
0b5880 |
$exp_verbose_result
|
|
Packit |
0b5880 |
$exp_normal_result"
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
act_silent=`./ex_output${EXEEXT} CK_SILENT STDOUT NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
act_silent_env=`CK_VERBOSITY=silent ./ex_output${EXEEXT} CK_ENV STDOUT NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
act_silent_dump_env=`CK_VERBOSITY=silent ./ex_output${EXEEXT} CK_ENV STDOUT_DUMP NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
act_minimal=`./ex_output${EXEEXT} CK_MINIMAL STDOUT NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
act_minimal_env=`CK_VERBOSITY=minimal ./ex_output${EXEEXT} CK_ENV STDOUT NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
act_minimal_dump_env=`CK_VERBOSITY=minimal ./ex_output${EXEEXT} CK_ENV STDOUT_DUMP NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
act_normal=`./ex_output${EXEEXT} CK_NORMAL STDOUT NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
act_normal_env=`CK_VERBOSITY=normal CK_VERBOSITY='' ./ex_output${EXEEXT} CK_ENV STDOUT NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
act_normal_dump_env=`CK_VERBOSITY=normal CK_VERBOSITY='' ./ex_output${EXEEXT} CK_ENV STDOUT_DUMP NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
act_normal_env_blank=`./ex_output${EXEEXT} CK_ENV STDOUT NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
act_normal_env_invalid=`CK_VERBOSITY='BLARGS' ./ex_output${EXEEXT} CK_ENV STDOUT NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
act_verbose=`./ex_output${EXEEXT} CK_VERBOSE STDOUT NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
act_verbose_env=`CK_VERBOSITY=verbose ./ex_output${EXEEXT} CK_ENV STDOUT NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
act_verbose_dump_env=`CK_VERBOSITY=verbose ./ex_output${EXEEXT} CK_ENV STDOUT_DUMP NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
if test 1 -eq $ENABLE_SUBUNIT; then
|
|
Packit |
0b5880 |
act_subunit=`./ex_output${EXEEXT} CK_SUBUNIT STDOUT NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
act_subunit_dump_env=`CK_VERBOSITY=subunit ./ex_output${EXEEXT} CK_SUBUNIT STDOUT_DUMP NORMAL | tr -d "\r"`
|
|
Packit |
0b5880 |
fi
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
log_stdout=` ./ex_output${EXEEXT} CK_SILENT LOG_STDOUT NORMAL`
|
|
Packit |
0b5880 |
log_env_stdout=`CK_LOG_FILE_NAME="-" ./ex_output${EXEEXT} CK_SILENT STDOUT NORMAL`
|
|
Packit |
0b5880 |
tap_stdout=` ./ex_output${EXEEXT} CK_SILENT TAP_STDOUT NORMAL`
|
|
Packit |
0b5880 |
tap_env_stdout=`CK_TAP_LOG_FILE_NAME="-" ./ex_output${EXEEXT} CK_SILENT STDOUT NORMAL`
|
|
Packit |
0b5880 |
xml_stdout=` ./ex_output${EXEEXT} CK_SILENT XML_STDOUT NORMAL | tr -d "\r" | grep -v \<duration\> | grep -v \<datetime\> | grep -v \<path\>`
|
|
Packit |
0b5880 |
xml_env_stdout=`CK_XML_LOG_FILE_NAME="-" ./ex_output${EXEEXT} CK_SILENT STDOUT NORMAL | tr -d "\r" | grep -v \<duration\> | grep -v \<datetime\> | grep -v \<path\>`
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
test_output ( ) {
|
|
Packit |
0b5880 |
if [ "x${1}" != "x${2}" ]; then
|
|
Packit |
0b5880 |
echo "Problem with ex_output${EXEEXT} ${3}";
|
|
Packit |
0b5880 |
echo "Expected:";
|
|
Packit |
0b5880 |
echo "${1}";
|
|
Packit |
0b5880 |
echo "Got:";
|
|
Packit |
0b5880 |
echo "${2}";
|
|
Packit |
0b5880 |
exit 1;
|
|
Packit |
0b5880 |
fi
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
}
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
test_output "$exp_silent" "$act_silent" "CK_SILENT STDOUT NORMAL";
|
|
Packit |
0b5880 |
test_output "$exp_silent" "$act_silent_env" "CK_ENV STDOUT NORMAL";
|
|
Packit |
0b5880 |
test_output "$exp_minimal" "$act_minimal" "CK_MINIMAL STDOUT NORMAL";
|
|
Packit |
0b5880 |
test_output "$exp_minimal" "$act_minimal_env" "CK_ENV STDOUT NORMAL";
|
|
Packit |
0b5880 |
test_output "$exp_normal" "$act_normal" "CK_NORMAL STDOUT NORMAL";
|
|
Packit |
0b5880 |
test_output "$exp_normal" "$act_normal_env" "CK_ENV STDOUT NORMAL";
|
|
Packit |
0b5880 |
test_output "$exp_normal" "$act_normal_env_blank" "CK_ENV STDOUT NORMAL";
|
|
Packit |
0b5880 |
test_output "$exp_normal" "$act_normal_env_invalid" "CK_ENV STDOUT NORMAL";
|
|
Packit |
0b5880 |
test_output "$exp_verbose" "$act_verbose" "CK_VERBOSE STDOUT NORMAL";
|
|
Packit |
0b5880 |
test_output "$exp_verbose" "$act_verbose_env" "CK_ENV STDOUT NORMAL";
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
test_output "$exp_silent_dump" "$act_silent_dump_env" "CK_ENV STDOUT_DUMP NORMAL (for silent)"
|
|
Packit |
0b5880 |
test_output "$exp_minimal_dump" "$act_minimal_dump_env" "CK_ENV STDOUT_DUMP NORMAL (for minimal)"
|
|
Packit |
0b5880 |
test_output "$exp_normal_dump" "$act_normal_dump_env" "CK_ENV STDOUT_DUMP NORMAL (for normal)"
|
|
Packit |
0b5880 |
test_output "$exp_verbose_dump" "$act_verbose_dump_env" "CK_ENV STDOUT_DUMP NORMAL (for verbose)"
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
test_output "${expected_log_log}" "${log_stdout}" "CK_SILENT LOG_STDOUT NORMAL"
|
|
Packit |
0b5880 |
test_output "${expected_log_log}" "${log_env_stdout}" "CK_SILENT STDOUT NORMAL (with log env = '-')"
|
|
Packit |
0b5880 |
test_output "${expected_xml}" "${xml_stdout}" "CK_SILENT XML_STDOUT NORMAL"
|
|
Packit |
0b5880 |
test_output "${expected_xml}" "${xml_env_stdout}" "CK_SILENT STDOUT NORMAL (with xml env = '-')"
|
|
Packit |
0b5880 |
test_output "${expected_normal_tap}" "${tap_stdout}" "CK_SILENT TAP_STDOUT NORMAL"
|
|
Packit |
0b5880 |
test_output "${expected_normal_tap}" "${tap_env_stdout}" "CK_SILENT STDOUT NORMAL (with tap env = '-')"
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
if test 1 -eq $ENABLE_SUBUNIT; then
|
|
Packit |
0b5880 |
test_output "$exp_subunit" "$act_subunit" "CK_SUBUNIT STDOUT NORMAL";
|
|
Packit |
0b5880 |
test_output "$exp_subunit_dump" "$act_subunit_dump_env" "CK_ENV STDOUT_DUMP NORMAL (for subunit)"
|
|
Packit |
0b5880 |
fi
|
|
Packit |
0b5880 |
|
|
Packit |
0b5880 |
exit 0
|