diff mbox

[3/6] lib: fwts_framework: output all logfile names being written to

Message ID 1340191829-27444-4-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King June 20, 2012, 11:30 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

With multi-logging we need to mention all the log file names
that we are writing to.

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

Comments

Keng-Yu Lin June 20, 2012, 3:01 p.m. UTC | #1
On Wed, Jun 20, 2012 at 7:30 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> With multi-logging we need to mention all the log file names
> that we are writing to.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/src/fwts_framework.c |   14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
> index b9c6f58..f53bbf2 100644
> --- a/src/lib/src/fwts_framework.c
> +++ b/src/lib/src/fwts_framework.c
> @@ -1184,10 +1184,16 @@ int fwts_framework_args(const int argc, char **argv)
>                }
>        }
>
> -       if (!(fw->flags & FWTS_FRAMEWORK_FLAGS_QUIET))
> -               printf("Running %d tests, results appended to %s\n",
> -                       fwts_list_len(&tests_to_run),
> -                       fw->results_logname);
> +       if (!(fw->flags & FWTS_FRAMEWORK_FLAGS_QUIET)) {
> +               char *filenames = fwts_log_get_filenames(fw->results_logname, fw->log_type);
> +
> +               if (filenames) {
> +                       printf("Running %d tests, results appended to %s\n",
> +                               fwts_list_len(&tests_to_run),
> +                               filenames);
> +                       free(filenames);
> +               }
> +       }
>
>        fwts_log_section_begin(fw->results, "heading");
>        fwts_framework_heading_info(fw, &tests_to_run);
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Alex Hung June 21, 2012, 1:04 a.m. UTC | #2
On 06/20/2012 07:30 PM, Colin King wrote:
> From: Colin Ian King<colin.king@canonical.com>
>
> With multi-logging we need to mention all the log file names
> that we are writing to.
>
> Signed-off-by: Colin Ian King<colin.king@canonical.com>
> ---
>   src/lib/src/fwts_framework.c |   14 ++++++++++----
>   1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
> index b9c6f58..f53bbf2 100644
> --- a/src/lib/src/fwts_framework.c
> +++ b/src/lib/src/fwts_framework.c
> @@ -1184,10 +1184,16 @@ int fwts_framework_args(const int argc, char **argv)
>   		}
>   	}
>
> -	if (!(fw->flags&  FWTS_FRAMEWORK_FLAGS_QUIET))
> -		printf("Running %d tests, results appended to %s\n",
> -			fwts_list_len(&tests_to_run),
> -			fw->results_logname);
> +	if (!(fw->flags&  FWTS_FRAMEWORK_FLAGS_QUIET)) {
> +		char *filenames = fwts_log_get_filenames(fw->results_logname, fw->log_type);
> +		
> +		if (filenames) {
> +			printf("Running %d tests, results appended to %s\n",
> +				fwts_list_len(&tests_to_run),
> +				filenames);
> +			free(filenames);
> +		}
> +	}
>
>   	fwts_log_section_begin(fw->results, "heading");
>   	fwts_framework_heading_info(fw,&tests_to_run);
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 b9c6f58..f53bbf2 100644
--- a/src/lib/src/fwts_framework.c
+++ b/src/lib/src/fwts_framework.c
@@ -1184,10 +1184,16 @@  int fwts_framework_args(const int argc, char **argv)
 		}
 	}
 
-	if (!(fw->flags & FWTS_FRAMEWORK_FLAGS_QUIET))
-		printf("Running %d tests, results appended to %s\n",
-			fwts_list_len(&tests_to_run),
-			fw->results_logname);
+	if (!(fw->flags & FWTS_FRAMEWORK_FLAGS_QUIET)) {
+		char *filenames = fwts_log_get_filenames(fw->results_logname, fw->log_type);
+		
+		if (filenames) {
+			printf("Running %d tests, results appended to %s\n",
+				fwts_list_len(&tests_to_run),
+				filenames);
+			free(filenames);
+		}
+	}
 
 	fwts_log_section_begin(fw->results, "heading");
 	fwts_framework_heading_info(fw, &tests_to_run);