#if ENABLE_SUBUNIT
printf (" | CK_SUBUNIT");
#endif
- printf (") (STDOUT | STDOUT_DUMP | LOG | TAP | XML) (NORMAL | EXIT_TEST)\n");
+ printf (")\n");
+ printf(" (STDOUT | STDOUT_DUMP | LOG | LOG_STDOUT | TAP | TAP_STDOUT | XML | XML_STDOUT)\n");
+ printf(" (NORMAL | EXIT_TEST)\n");
printf(" If CK_ENV is used, the environment variable CK_VERBOSITY can be set to\n");
printf(" one of these: silent, minimal, or verbose. If it is not set to these, or\n");
printf(" if CK_VERBOSITY is not set, then CK_NORMAL will be used\n");
+ printf(" If testing the CK_[LOG|TAP_LOG|XML_LOG]_FILE_NAME env var and setting it to '-',\n");
+ printf(" then use the following mode: CK_SILENT STDOUT [NORMAL|EXIT_TEST].\n");
}
static void run_tests (int printmode, char * log_type, int include_exit_test)
{
srunner_set_log(sr, "test.log");
}
+ else if(strcmp(log_type, "LOG_STDOUT") == 0)
+ {
+ srunner_set_log(sr, "-");
+ }
else if(strcmp(log_type, "TAP") == 0)
{
srunner_set_tap(sr, "test.tap");
}
+ else if(strcmp(log_type, "TAP_STDOUT") == 0)
+ {
+ srunner_set_tap(sr, "-");
+ }
else if(strcmp(log_type, "XML") == 0)
{
srunner_set_xml(sr, "test.xml");
}
+ else if(strcmp(log_type, "XML_STDOUT") == 0)
+ {
+ srunner_set_xml(sr, "-");
+ }
else
{
print_usage();
act_subunit_dump_env=`CK_VERBOSITY=subunit ./ex_output${EXEEXT} CK_SUBUNIT STDOUT_DUMP NORMAL | tr -d "\r"`
fi
+log_stdout=` ./ex_output${EXEEXT} CK_SILENT LOG_STDOUT NORMAL`
+log_env_stdout=`CK_LOG_FILE_NAME="-" ./ex_output${EXEEXT} CK_SILENT STDOUT NORMAL`
+tap_stdout=` ./ex_output${EXEEXT} CK_SILENT TAP_STDOUT NORMAL`
+tap_env_stdout=`CK_TAP_LOG_FILE_NAME="-" ./ex_output${EXEEXT} CK_SILENT STDOUT NORMAL`
+xml_stdout=` ./ex_output${EXEEXT} CK_SILENT XML_STDOUT NORMAL | tr -d "\r" | grep -v \<duration\> | grep -v \<datetime\> | grep -v \<path\>`
+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\>`
+
test_output ( ) {
if [ "x${1}" != "x${2}" ]; then
echo "Problem with ex_output${EXEEXT} ${3}";
test_output "$exp_normal_dump" "$act_normal_dump_env" "CK_ENV STDOUT_DUMP NORMAL (for normal)"
test_output "$exp_verbose_dump" "$act_verbose_dump_env" "CK_ENV STDOUT_DUMP NORMAL (for verbose)"
+test_output "${expected_log_log}" "${log_stdout}" "CK_SILENT LOG_STDOUT NORMAL"
+test_output "${expected_log_log}" "${log_env_stdout}" "CK_SILENT STDOUT NORMAL (with log env = '-')"
+test_output "${expected_xml}" "${xml_stdout}" "CK_SILENT XML_STDOUT NORMAL"
+test_output "${expected_xml}" "${xml_env_stdout}" "CK_SILENT STDOUT NORMAL (with xml env = '-')"
+test_output "${expected_normal_tap}" "${tap_stdout}" "CK_SILENT TAP_STDOUT NORMAL"
+test_output "${expected_normal_tap}" "${tap_env_stdout}" "CK_SILENT STDOUT NORMAL (with tap env = '-')"
+
if test 1 -eq $ENABLE_SUBUNIT; then
test_output "$exp_subunit" "$act_subunit" "CK_SUBUNIT STDOUT NORMAL";
test_output "$exp_subunit_dump" "$act_subunit_dump_env" "CK_ENV STDOUT_DUMP NORMAL (for subunit)"