public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [RFA 4/8] validate_failures.py: rename --manifest to --manifest_path
@ 2012-11-24 22:50 Doug Evans
  2012-11-25 15:41 ` Diego Novillo
  0 siblings, 1 reply; 4+ messages in thread
From: Doug Evans @ 2012-11-24 22:50 UTC (permalink / raw)
  To: dnovillo, gcc-patches

Hi.
This fourth patch renames option --manifest to --manifest_path.
I have a later patch that adds a --manifest_name option, making "--manifest"
too confusing/ambiguous.

Ok to check in?
[I still have to update invocations that use --manifest,
but that's a separate patch.]

2012-11-24  Doug Evans  <dje@google.com>

	* testsuite-management/validate_failures.py: Rename option --manifest to
	--manifest_path.  Rename local variables manifest_name to manifest_path.

--- validate_failures.py=	2012-11-19 11:47:29.997632548 -0800
+++ validate_failures.py	2012-11-24 13:31:29.770809999 -0800
@@ -211,7 +211,7 @@ def ParseSummary(sum_fname):
   return result_set
 
 
-def GetManifest(manifest_name):
+def GetManifest(manifest_path):
   """Build a set of expected failures from the manifest file.
 
   Each entry in the manifest file should have the format understood
@@ -220,8 +220,8 @@ def GetManifest(manifest_name):
   If no manifest file exists for this target, it returns an empty
   set.
   """
-  if os.path.exists(manifest_name):
-    return ParseSummary(manifest_name)
+  if os.path.exists(manifest_path):
+    return ParseManifest(manifest_path)
   else:
     return set()
 
@@ -326,14 +326,14 @@ def CheckExpectedResults(options):
     (srcdir, target, valid_build) = GetBuildData(options)
     if not valid_build:
       return False
-    manifest_name = _MANIFEST_PATH_PATTERN % (srcdir, target)
+    manifest_path = _MANIFEST_PATH_PATTERN % (srcdir, target)
   else:
-    manifest_name = options.manifest
-    if not os.path.exists(manifest_name):
-      Error('Manifest file %s does not exist.' % manifest_name)
+    manifest_path = options.manifest
+    if not os.path.exists(manifest_path):
+      Error('Manifest file %s does not exist.' % manifest_path)
 
-  print 'Manifest:         %s' % manifest_name
-  manifest = GetManifest(manifest_name)
+  print 'Manifest:         %s' % manifest_path
+  manifest = GetManifest(manifest_path)
   sum_files = GetSumFiles(options.results, options.build_dir)
   actual = GetResults(sum_files)
 
@@ -349,14 +349,14 @@ def ProduceManifest(options):
   if not valid_build:
     return False
 
-  manifest_name = _MANIFEST_PATH_PATTERN % (srcdir, target)
-  if os.path.exists(manifest_name) and not options.force:
+  manifest_path = _MANIFEST_PATH_PATTERN % (srcdir, target)
+  if os.path.exists(manifest_path) and not options.force:
     Error('Manifest file %s already exists.\nUse --force to overwrite.' %
-          manifest_name)
+          manifest_path)
 
   sum_files = GetSumFiles(options.results, options.build_dir)
   actual = GetResults(sum_files)
-  manifest_file = open(manifest_name, 'w')
+  manifest_file = open(manifest_path, 'w')
   for result in sorted(actual):
     print result
     manifest_file.write('%s\n' % result)
@@ -406,8 +406,8 @@ def Main(argv):
                     'that the expected failure has been fixed, or '
                     'it did not run, or it may simply be flaky '
                     '(default = False)')
-  parser.add_option('--manifest', action='store', type='string',
-                    dest='manifest', default=None,
+  parser.add_option('--manifest_path', action='store', type='string',
+                    dest='manifest_path', default=None,
                     help='Name of the manifest file to use (default = '
                     'taken from contrib/testsuite-managment/<target>.xfail)')
   parser.add_option('--produce_manifest', action='store_true',

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA 4/8] validate_failures.py: rename --manifest to --manifest_path
  2012-11-24 22:50 [RFA 4/8] validate_failures.py: rename --manifest to --manifest_path Doug Evans
@ 2012-11-25 15:41 ` Diego Novillo
  2012-11-29 20:47   ` Doug Evans
  0 siblings, 1 reply; 4+ messages in thread
From: Diego Novillo @ 2012-11-25 15:41 UTC (permalink / raw)
  To: Doug Evans; +Cc: gcc-patches

On Sat, Nov 24, 2012 at 5:50 PM, Doug Evans <dje@google.com> wrote:
> Hi.
> This fourth patch renames option --manifest to --manifest_path.
> I have a later patch that adds a --manifest_name option, making "--manifest"
> too confusing/ambiguous.
>
> Ok to check in?
> [I still have to update invocations that use --manifest,
> but that's a separate patch.]
>
> 2012-11-24  Doug Evans  <dje@google.com>
>
>         * testsuite-management/validate_failures.py: Rename option --manifest to
>         --manifest_path.  Rename local variables manifest_name to manifest_path.


OK.


Diego.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA 4/8] validate_failures.py: rename --manifest to --manifest_path
  2012-11-25 15:41 ` Diego Novillo
@ 2012-11-29 20:47   ` Doug Evans
  2012-11-29 22:47     ` Diego Novillo
  0 siblings, 1 reply; 4+ messages in thread
From: Doug Evans @ 2012-11-29 20:47 UTC (permalink / raw)
  To: Diego Novillo; +Cc: gcc-patches

Diego Novillo writes:
 > On Sat, Nov 24, 2012 at 5:50 PM, Doug Evans <dje@google.com> wrote:
 > > Hi.
 > > This fourth patch renames option --manifest to --manifest_path.
 > > I have a later patch that adds a --manifest_name option, making "--manifest"
 > > too confusing/ambiguous.
 > >
 > > Ok to check in?
 > > [I still have to update invocations that use --manifest,
 > > but that's a separate patch.]
 > >
 > > 2012-11-24  Doug Evans  <dje@google.com>
 > >
 > >         * testsuite-management/validate_failures.py: Rename option --manifest to
 > >         --manifest_path.  Rename local variables manifest_name to manifest_path.
 > 
 > 
 > OK.

I ran into some issues, so I'm going to do this in baby steps.
This patch just renames the variables (for clarity's sake, at least for me :-)).

Ok to check in?

2012-11-29  Doug Evans  <dje@google.com>

	* testsuite-management/validate_failures.py: Rename variable
	manifest_name to manifest_path everywhere.

Index: validate_failures.py
===================================================================
--- validate_failures.py	(revision 193952)
+++ validate_failures.py	(working copy)
@@ -220,7 +220,7 @@
   return result_set
 
 
-def GetManifest(manifest_name):
+def GetManifest(manifest_path):
   """Build a set of expected failures from the manifest file.
 
   Each entry in the manifest file should have the format understood
@@ -228,8 +228,8 @@
 
   If no manifest file exists for this target, it returns an empty set.
   """
-  if os.path.exists(manifest_name):
-    return ParseSummary(manifest_name)
+  if os.path.exists(manifest_path):
+    return ParseManifest(manifest_path)
   else:
     return set()
 
@@ -334,14 +334,14 @@
     (srcdir, target, valid_build) = GetBuildData(options)
     if not valid_build:
       return False
-    manifest_name = _MANIFEST_PATH_PATTERN % (srcdir, target)
+    manifest_path = _MANIFEST_PATH_PATTERN % (srcdir, target)
   else:
-    manifest_name = options.manifest
-    if not os.path.exists(manifest_name):
-      Error('Manifest file %s does not exist.' % manifest_name)
+    manifest_path = options.manifest
+    if not os.path.exists(manifest_path):
+      Error('Manifest file %s does not exist.' % manifest_path)
 
-  print 'Manifest:         %s' % manifest_name
-  manifest = GetManifest(manifest_name)
+  print 'Manifest:         %s' % manifest_path
+  manifest = GetManifest(manifest_path)
   sum_files = GetSumFiles(options.results, options.build_dir)
   actual = GetResults(sum_files)
 
@@ -357,14 +357,14 @@
   if not valid_build:
     return False
 
-  manifest_name = _MANIFEST_PATH_PATTERN % (srcdir, target)
-  if os.path.exists(manifest_name) and not options.force:
+  manifest_path = _MANIFEST_PATH_PATTERN % (srcdir, target)
+  if os.path.exists(manifest_path) and not options.force:
     Error('Manifest file %s already exists.\nUse --force to overwrite.' %
-          manifest_name)
+          manifest_path)
 
   sum_files = GetSumFiles(options.results, options.build_dir)
   actual = GetResults(sum_files)
-  manifest_file = open(manifest_name, 'w')
+  manifest_file = open(manifest_path, 'w')
   for result in sorted(actual):
     print result
     manifest_file.write('%s\n' % result)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFA 4/8] validate_failures.py: rename --manifest to --manifest_path
  2012-11-29 20:47   ` Doug Evans
@ 2012-11-29 22:47     ` Diego Novillo
  0 siblings, 0 replies; 4+ messages in thread
From: Diego Novillo @ 2012-11-29 22:47 UTC (permalink / raw)
  To: Doug Evans; +Cc: gcc-patches

On Thu, Nov 29, 2012 at 3:46 PM, Doug Evans <dje@google.com> wrote:

> 2012-11-29  Doug Evans  <dje@google.com>
>
>         * testsuite-management/validate_failures.py: Rename variable
>         manifest_name to manifest_path everywhere.

OK.


Diego.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-29 21:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-24 22:50 [RFA 4/8] validate_failures.py: rename --manifest to --manifest_path Doug Evans
2012-11-25 15:41 ` Diego Novillo
2012-11-29 20:47   ` Doug Evans
2012-11-29 22:47     ` Diego Novillo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).