Re: [Piglit] [PATCH v3 1/1] framework: change one missed core.checkDir call to core.check_dir

2018-03-26 Thread Dylan Baker
Quoting Petri Latvala (2018-03-26 02:51:08)
> 
> 
> On 03/23/2018 06:11 PM, Dylan Baker wrote:
> > Quoting Petri Latvala (2018-03-23 03:11:10)
> >> Commit 5e699e402a8b ("framework: rename core.checkDir to
> >> core.check_dir") missed one call to checkDir in summary/feature. Also
> >> convert the exception raised to PiglitFatalError.
> >>
> >> v2: Added exception changes
> >> v3: Fixed indentation
> >>
> >> Signed-off-by: Petri Latvala 
> >> Cc: Dylan Baker 
> >> Cc: Jari Tahvanainen 
> >> ---
> >>
> >> The indent was with spaces, but just incorrectly indented.
> >>
> >> framework/programs/summary.py | 8 +++-
> >>   1 file changed, 7 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/framework/programs/summary.py b/framework/programs/summary.py
> >> index c6f616dc8..ccfb24299 100644
> >> --- a/framework/programs/summary.py
> >> +++ b/framework/programs/summary.py
> >> @@ -307,6 +307,12 @@ def feature(input_):
> >>   shutil.rmtree(args.summaryDir)
> >>   
> >>   # If the requested directory doesn't exist, create it or throw an 
> >> error
> >> -core.checkDir(args.summaryDir, not args.overwrite)
> >> +try:
> >> +core.check_dir(args.summaryDir, not args.overwrite)
> >> +except exceptions.PiglitException:
> >> +raise exceptions.PiglitFatalError(
> >> +'{} already exists.\n'
> >> +'use -o/--overwrite if you want to overwrite it.'.format(
> >> +args.summaryDir))
> >>   
> >>   summary.feat(args.resultsFiles, args.summaryDir, args.featureFile)
> >> -- 
> >> 2.14.1
> >>
> > Reviewed-by: Dylan Baker 
> 
> Thanks. I don't have commit rights, could you push this for me?
> 
> 
> Petri
> 

Done, thanks for fixing this.

Dylan


signature.asc
Description: signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v3 1/1] framework: change one missed core.checkDir call to core.check_dir

2018-03-26 Thread Petri Latvala



On 03/23/2018 06:11 PM, Dylan Baker wrote:

Quoting Petri Latvala (2018-03-23 03:11:10)

Commit 5e699e402a8b ("framework: rename core.checkDir to
core.check_dir") missed one call to checkDir in summary/feature. Also
convert the exception raised to PiglitFatalError.

v2: Added exception changes
v3: Fixed indentation

Signed-off-by: Petri Latvala 
Cc: Dylan Baker 
Cc: Jari Tahvanainen 
---

The indent was with spaces, but just incorrectly indented.

framework/programs/summary.py | 8 +++-
  1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/framework/programs/summary.py b/framework/programs/summary.py
index c6f616dc8..ccfb24299 100644
--- a/framework/programs/summary.py
+++ b/framework/programs/summary.py
@@ -307,6 +307,12 @@ def feature(input_):
  shutil.rmtree(args.summaryDir)
  
  # If the requested directory doesn't exist, create it or throw an error

-core.checkDir(args.summaryDir, not args.overwrite)
+try:
+core.check_dir(args.summaryDir, not args.overwrite)
+except exceptions.PiglitException:
+raise exceptions.PiglitFatalError(
+'{} already exists.\n'
+'use -o/--overwrite if you want to overwrite it.'.format(
+args.summaryDir))
  
  summary.feat(args.resultsFiles, args.summaryDir, args.featureFile)

--
2.14.1


Reviewed-by: Dylan Baker 


Thanks. I don't have commit rights, could you push this for me?


Petri

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v3 1/1] framework: change one missed core.checkDir call to core.check_dir

2018-03-23 Thread Dylan Baker
Quoting Petri Latvala (2018-03-23 03:11:10)
> Commit 5e699e402a8b ("framework: rename core.checkDir to
> core.check_dir") missed one call to checkDir in summary/feature. Also
> convert the exception raised to PiglitFatalError.
> 
> v2: Added exception changes
> v3: Fixed indentation
> 
> Signed-off-by: Petri Latvala 
> Cc: Dylan Baker 
> Cc: Jari Tahvanainen 
> ---
> 
> The indent was with spaces, but just incorrectly indented.
> 
> framework/programs/summary.py | 8 +++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/framework/programs/summary.py b/framework/programs/summary.py
> index c6f616dc8..ccfb24299 100644
> --- a/framework/programs/summary.py
> +++ b/framework/programs/summary.py
> @@ -307,6 +307,12 @@ def feature(input_):
>  shutil.rmtree(args.summaryDir)
>  
>  # If the requested directory doesn't exist, create it or throw an error
> -core.checkDir(args.summaryDir, not args.overwrite)
> +try:
> +core.check_dir(args.summaryDir, not args.overwrite)
> +except exceptions.PiglitException:
> +raise exceptions.PiglitFatalError(
> +'{} already exists.\n'
> +'use -o/--overwrite if you want to overwrite it.'.format(
> +args.summaryDir))
>  
>  summary.feat(args.resultsFiles, args.summaryDir, args.featureFile)
> -- 
> 2.14.1
> 

Reviewed-by: Dylan Baker 


signature.asc
Description: signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit