aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2019-05-19 11:29:49 +0200
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2019-05-19 11:29:49 +0200
commite2786117b45472fdb653877014fbd4f4cc936050 (patch)
treeed34267974814d497fab74165a1e3ff9191c80f9
parentd9a8d5e06c9a18cf4aa489a3429ebe94e0cac8da (diff)
downloadembedlog-e2786117b45472fdb653877014fbd4f4cc936050.tar.gz
embedlog-e2786117b45472fdb653877014fbd4f4cc936050.tar.bz2
embedlog-e2786117b45472fdb653877014fbd4f4cc936050.zip
tst/test-el-print.c: run each step in mix test as separate test
print_mix_of_everything() takes a long time, and it looks like it hung. This patch changes all mt_fok() checks to mt_run() so, message for each check is printed. Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
-rw-r--r--tst/test-el-print.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/tst/test-el-print.c b/tst/test-el-print.c
index fb53d39..0ae939f 100644
--- a/tst/test-el-print.c
+++ b/tst/test-el-print.c
@@ -865,17 +865,23 @@ static void print_different_clocks(void)
========================================================================== */
+static void print_mix_of_everything_check(void)
+{
+ mt_fok(print_check());
+}
+
static void print_mix_of_everything(void)
{
- int level;
- int timestamp;
- int printlevel;
- int finfo;
- int funcinfo;
- int colors;
- int prefix;
- int fract;
- int nl;
+ int level;
+ int timestamp;
+ int printlevel;
+ int finfo;
+ int funcinfo;
+ int colors;
+ int prefix;
+ int fract;
+ int nl;
+ char tname[512];
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
@@ -908,7 +914,12 @@ static void print_mix_of_everything(void)
add_log(ELI, "info message");
add_log(ELD, "debug message");
- mt_fok(print_check());
+ sprintf(tname, "print_mix_of_everything: fract: %d, level: %d"
+ ", timestamp: %d, printlevel: %d, funcinfo: %d"
+ ", finfo: %d, colors: %d, prefix: %d, nl: %d", fract,
+ level, timestamp, printlevel, funcinfo ,finfo, colors, prefix,
+ nl);
+ mt_run_named(print_mix_of_everything_check, tname);
test_cleanup();
}
@@ -1171,7 +1182,7 @@ static void print_prefix_overflow(void)
void el_print_test_group(void)
{
mt_run(print_different_clocks);
- mt_run(print_mix_of_everything);
+ print_mix_of_everything();
mt_prepare_test = &test_prepare;
mt_cleanup_test = &test_cleanup;