static void print_usage(void)
{
- printf ("Usage: ex_output (CK_SILENT | CK_MINIMAL | CK_NORMAL | CK_VERBOSE");
+ printf ("Usage: ex_output (CK_SILENT | CK_MINIMAL | CK_NORMAL | CK_VERBOSE | CK_ENV");
#if ENABLE_SUBUNIT
printf (" | CK_SUBUNIT");
#endif
printf (") (STDOUT | LOG | TAP | XML) (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");
}
static void run_tests (int printmode, char * log_type, int include_exit_test)
{
printmode = CK_VERBOSE;
}
+ else if (strcmp (argv[OUTPUT_TYPE_ARG], "CK_ENV") == 0)
+ {
+ printmode = CK_ENV;
+ }
#if ENABLE_SUBUNIT
else if (strcmp (argv[OUTPUT_TYPE_ARG], "CK_SUBUNIT") == 0)
{
fi
act_silent=`./ex_output${EXEEXT} CK_SILENT STDOUT NORMAL | tr -d "\r"`
+act_silent_env=`CK_VERBOSITY=silent ./ex_output${EXEEXT} CK_ENV STDOUT NORMAL | tr -d "\r"`
act_minimal=`./ex_output${EXEEXT} CK_MINIMAL STDOUT NORMAL | tr -d "\r"`
+act_minimal_env=`CK_VERBOSITY=minimal ./ex_output${EXEEXT} CK_ENV STDOUT NORMAL | tr -d "\r"`
act_normal=`./ex_output${EXEEXT} CK_NORMAL STDOUT NORMAL | tr -d "\r"`
+act_normal_env=`CK_VERBOSITY=normal CK_VERBOSITY='' ./ex_output${EXEEXT} CK_ENV STDOUT NORMAL | tr -d "\r"`
+act_normal_env_blank=`CK_VERBOSITY='' ./ex_output${EXEEXT} CK_ENV STDOUT NORMAL | tr -d "\r"`
+act_normal_env_invalid=`CK_VERBOSITY='BLARGS' ./ex_output${EXEEXT} CK_ENV STDOUT NORMAL | tr -d "\r"`
act_verbose=`./ex_output${EXEEXT} CK_VERBOSE STDOUT NORMAL | tr -d "\r"`
+act_verbose_env=`CK_VERBOSITY=verbose ./ex_output${EXEEXT} CK_ENV STDOUT NORMAL | tr -d "\r"`
if test 1 -eq $ENABLE_SUBUNIT; then
act_subunit=`./ex_output${EXEEXT} CK_SUBUNIT STDOUT NORMAL | tr -d "\r"`
fi
}
test_output "$exp_silent" "$act_silent" "CK_SILENT STDOUT NORMAL";
+test_output "$exp_silent" "$act_silent_env" "CK_ENV STDOUT NORMAL";
test_output "$exp_minimal" "$act_minimal" "CK_MINIMAL STDOUT NORMAL";
+test_output "$exp_minimal" "$act_minimal_env" "CK_ENV STDOUT NORMAL";
test_output "$exp_normal" "$act_normal" "CK_NORMAL STDOUT NORMAL";
+test_output "$exp_normal" "$act_normal_env" "CK_ENV STDOUT NORMAL";
+test_output "$exp_normal" "$act_normal_env_blank" "CK_ENV STDOUT NORMAL";
+test_output "$exp_normal" "$act_normal_env_invalid" "CK_ENV STDOUT NORMAL";
test_output "$exp_verbose" "$act_verbose" "CK_VERBOSE STDOUT NORMAL";
+test_output "$exp_verbose" "$act_verbose_env" "CK_ENV STDOUT NORMAL";
if test 1 -eq $ENABLE_SUBUNIT; then
test_output "$exp_subunit" "$act_subunit" "CK_SUBUNIT STDOUT NORMAL";
fi