From f80c8ff7ff3b1eef22a3c90943f324d45d855b97 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 16 Nov 2022 07:52:11 +0200 Subject: Initial low verbosity diagnostics rework --- libbuild2/test/rule.cxx | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'libbuild2/test/rule.cxx') diff --git a/libbuild2/test/rule.cxx b/libbuild2/test/rule.cxx index 8a754e5..5cdd8fb 100644 --- a/libbuild2/test/rule.cxx +++ b/libbuild2/test/rule.cxx @@ -540,11 +540,19 @@ namespace build2 if (verb) { - diag_record dr (text); - dr << "test " << ts; - - if (!t.is_a ()) - dr << ' ' << t; + // If the target is an alias, then testscript itself is the + // target. + // + if (t.is_a ()) + print_diag ("test", ts); + else + { + // In this case the test is really a combination of the target + // and testscript and using "->" feels off. Also, let's list the + // testscript after the target even though its a source. + // + print_diag ("test", t, ts, "+"); + } } res.push_back (ctx.dry_run @@ -1247,7 +1255,7 @@ namespace build2 if (verb >= 2) print_process (args); // Note: prints the whole pipeline. else if (verb) - text << "test " << tt; + print_diag ("test", tt); if (!ctx.dry_run) { -- cgit v1.1