Patchwork [RFA,6/8] validate_failures.py: remove pass/fail from GetBuildData

login
register
mail settings
Submitter Doug Evans
Date Nov. 24, 2012, 10:54 p.m.
Message ID <yjt2wqxa629c.fsf@ruffy2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/201485/
State New
Headers show

Comments

Doug Evans - Nov. 24, 2012, 10:54 p.m.
Hi.
This sixth patch simplifies calls to GetBuildData.
It never returns false and always terminates the process with an error message
(which is fine by me).

Ok to check in?

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

	* testsuite-management/validate_failures.py: Remove pass/fail indicator from
	result of GetBuildData.
Diego Novillo - Nov. 26, 2012, 2:42 p.m.
On Sat, Nov 24, 2012 at 5:54 PM, Doug Evans <dje@google.com> wrote:

> 2012-11-24  Doug Evans  <dje@google.com>
>
>         * testsuite-management/validate_failures.py: Remove pass/fail
> indicator from
>         result of GetBuildData.

OK.


Diego.

Patch

--- validate_failures.py.options	2012-11-24 13:40:57.616245431 -0800
+++ validate_failures.py	2012-11-24 13:44:05.118039626 -0800
@@ -284,7 +284,7 @@  def GetBuildData():
           options.build_dir)
   print 'Source directory: %s' % srcdir
   print 'Build target:     %s' % target
-  return srcdir, target, True
+  return srcdir, target
 
 
 def PrintSummary(msg, summary):
@@ -326,9 +326,7 @@  def PerformComparison(expected, actual, 
 
 def CheckExpectedResults():
   if not options.manifest:
-    (srcdir, target, valid_build) = GetBuildData()
-    if not valid_build:
-      return False
+    (srcdir, target) = GetBuildData()
     manifest_path = _MANIFEST_PATH_PATTERN % (srcdir, target)
   else:
     manifest_path = options.manifest
@@ -348,10 +346,7 @@  def CheckExpectedResults():
 
 
 def ProduceManifest():
-  (srcdir, target, valid_build) = GetBuildData()
-  if not valid_build:
-    return False
-
+  (srcdir, target) = GetBuildData()
   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.' %
@@ -369,9 +364,7 @@  def ProduceManifest():
 
 
 def CompareBuilds():
-  (srcdir, target, valid_build) = GetBuildData()
-  if not valid_build:
-    return False
+  (srcdir, target) = GetBuildData()
 
   sum_files = GetSumFiles(options.results, options.build_dir)
   actual = GetResults(sum_files)