diff mbox

lib: fwts_framework: test names should be dislayed in a wider format field

Message ID 1355742464-32287-1-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King Dec. 17, 2012, 11:07 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

We are currently just printing the first 13 chars of the test name in the
--show-tests and --show-tests-full options.  We should expand this to 15
chars to cope with the larger test names being used nowadays.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/src/fwts_framework.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Keng-Yu Lin Dec. 18, 2012, 3:46 a.m. UTC | #1
On Mon, Dec 17, 2012 at 7:07 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> We are currently just printing the first 13 chars of the test name in the
> --show-tests and --show-tests-full options.  We should expand this to 15
> chars to cope with the larger test names being used nowadays.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/src/fwts_framework.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
> index eac05bd..c355ca0 100644
> --- a/src/lib/src/fwts_framework.c
> +++ b/src/lib/src/fwts_framework.c
> @@ -265,7 +265,7 @@ static void fwts_framework_show_tests(fwts_framework *fw, bool full)
>                                         test = fwts_list_data(fwts_framework_test *, item);
>                                         if (full) {
>                                                 int j;
> -                                               printf(" %-13.13s (%d test%s):\n",
> +                                               printf(" %-15.15s (%d test%s):\n",
>                                                         test->name, test->ops->total_tests,
>                                                         test->ops->total_tests > 1 ? "s" : "");
>                                                 for (j=0; j<test->ops->total_tests;j++)
> @@ -273,7 +273,7 @@ static void fwts_framework_show_tests(fwts_framework *fw, bool full)
>                                                 total += test->ops->total_tests;
>                                         }
>                                         else {
> -                                               printf(" %-13.13s %s\n", test->name,
> +                                               printf(" %-15.15s %s\n", test->name,
>                                                         test->ops->description ? test->ops->description : "");
>                                         }
>                                 }
> --
> 1.8.0
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Alex Hung Dec. 20, 2012, 9:47 a.m. UTC | #2
On 12/17/2012 07:07 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> We are currently just printing the first 13 chars of the test name in the
> --show-tests and --show-tests-full options.  We should expand this to 15
> chars to cope with the larger test names being used nowadays.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/src/fwts_framework.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
> index eac05bd..c355ca0 100644
> --- a/src/lib/src/fwts_framework.c
> +++ b/src/lib/src/fwts_framework.c
> @@ -265,7 +265,7 @@ static void fwts_framework_show_tests(fwts_framework *fw, bool full)
>   					test = fwts_list_data(fwts_framework_test *, item);
>   					if (full) {
>   						int j;
> -						printf(" %-13.13s (%d test%s):\n",
> +						printf(" %-15.15s (%d test%s):\n",
>   							test->name, test->ops->total_tests,
>   							test->ops->total_tests > 1 ? "s" : "");
>   						for (j=0; j<test->ops->total_tests;j++)
> @@ -273,7 +273,7 @@ static void fwts_framework_show_tests(fwts_framework *fw, bool full)
>   						total += test->ops->total_tests;
>   					}
>   					else {
> -						printf(" %-13.13s %s\n", test->name,
> +						printf(" %-15.15s %s\n", test->name,
>   							test->ops->description ? test->ops->description : "");
>   					}
>   				}
>
Acked-by: Alex Hung <alex.hung@canonical.com>
diff mbox

Patch

diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
index eac05bd..c355ca0 100644
--- a/src/lib/src/fwts_framework.c
+++ b/src/lib/src/fwts_framework.c
@@ -265,7 +265,7 @@  static void fwts_framework_show_tests(fwts_framework *fw, bool full)
 					test = fwts_list_data(fwts_framework_test *, item);
 					if (full) {
 						int j;
-						printf(" %-13.13s (%d test%s):\n",
+						printf(" %-15.15s (%d test%s):\n",
 							test->name, test->ops->total_tests,
 							test->ops->total_tests > 1 ? "s" : "");
 						for (j=0; j<test->ops->total_tests;j++)
@@ -273,7 +273,7 @@  static void fwts_framework_show_tests(fwts_framework *fw, bool full)
 						total += test->ops->total_tests;
 					}
 					else {
-						printf(" %-13.13s %s\n", test->name,
+						printf(" %-15.15s %s\n", test->name,
 							test->ops->description ? test->ops->description : "");
 					}
 				}