All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
To: fuego@lists.linuxfoundation.org
Subject: [Fuego] [PATCH 16/16] a bit of cleaning and style fixes
Date: Thu, 30 Mar 2017 10:04:44 +0900	[thread overview]
Message-ID: <fc8719a40f2268a6b5c16c0d3a0934cb88e9cd74.1490835200.git.daniel.sangorrin@toshiba.co.jp> (raw)
In-Reply-To: <1490835884-19242-1-git-send-email-daniel.sangorrin@toshiba.co.jp>
In-Reply-To: <c8496081a9bc95768b6e9f57662b617fb27fa7a2.1490835200.git.daniel.sangorrin@toshiba.co.jp>

Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
---
 engine/scripts/functions.sh |  2 +-
 engine/scripts/ovgen.py     | 17 ++---------------
 2 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/engine/scripts/functions.sh b/engine/scripts/functions.sh
index 4379271..e499ab4 100755
--- a/engine/scripts/functions.sh
+++ b/engine/scripts/functions.sh
@@ -500,7 +500,7 @@ function log_compare {
 	  return $FUEGO_RESULT
   fi
 
-  cd ${LOGDIR} 
+  cd ${LOGDIR}
   LOGFILE="testlog.txt"
   PARSED_LOGFILE="testlog.${4}.txt"
 
diff --git a/engine/scripts/ovgen.py b/engine/scripts/ovgen.py
index 10d1cf4..4b25d86 100755
--- a/engine/scripts/ovgen.py
+++ b/engine/scripts/ovgen.py
@@ -37,7 +37,6 @@ OFVAR_DESCRIPTION="DESCRIPTION"
 LVAR_NAME="NAME"
 LVAR_DESCRIPTION="DESCRIPTION"
 
-
 class OFClass:
     def __init__(self):
         self.name=""
@@ -65,7 +64,6 @@ class OFLayer:
     def __str__(self):
         return "<OFLayer name:\"%s\" descr:\"%s\" vars:%s>\n" % (self.name, self.description, self.vars)
 
-
 class TestSpecs:
     def __init__(self):
         self.name=""
@@ -108,7 +106,6 @@ class SpecException(Exception):
      def __str__(self):
          return repr(self.value)
 
-
 def debug_print(string, lev=1):
     if lev <= log_lvl:
         print "log: " + string
@@ -130,7 +127,6 @@ def parseOFVars(line, ofc):
 
     return True
 
-
 # parse variables definitions
 def parseVars(line, ofc):
     m = re.search("(\w+)=\"(.*)\"", line)
@@ -164,7 +160,6 @@ def parseFunctionBody(name, f):
 
     return funcbody
 
-
 def parseFunction(line, f):
     m = re.search("\s?function (\w+).*{", line)
     if m==None:
@@ -209,7 +204,6 @@ def parseBaseFile(baseFilePath, ofc):
         elif baseParseFunction(line, f, ofc):
             debug_print("function found", 3)
 
-
 # parse all base files in dir
 def parseBaseDir(baseDirPath, ofcls):
     debug_print ("\n------------\nparsing " + baseDirPath + " fuegoclass dir ...\n")
@@ -221,13 +215,12 @@ def parseBaseDir(baseDirPath, ofcls):
         debug_print ("parsed %s class\n------------\n" % (ofc.name))
         ofcls[ofc.name]=(ofc)
 
-
 def parseInherit(line, ofcls):
     m = re.search("inherit \"(.+)\"", line)
-    if m==None: return None
+    if m == None:
+        return None
     clname = m.group(1)
 
-
     if clname not in ofcls:
         raise OFClassNotFoundException("No such class: %s" % (clname))
 
@@ -259,7 +252,6 @@ def parseLayerVarOverride(line, layer, inhclass):
 
     return True
 
-
 def parseLayerFuncOverride(line, layer, inhclass, f):
     m = re.search("override-func (\w+)(.*)", line)
     if m==None: return False
@@ -322,7 +314,6 @@ def parseLayerCapList(line, layer, inhclass):
 
     return True
 
-
 def parseOverrideFile(overrideFile, layer, ofcls):
     debug_print ("\n-----------\nparsing %s override ...\n" % (overrideFile))
     f = open(overrideFile)
@@ -472,7 +463,6 @@ def parseSpec(testdir, testspec):
 
 def run(test_args=None):
     parser = argparse.ArgumentParser(description='Read OF class files, override files and generate prolog defining all variables and functions')
-
     parser.add_argument('--classdir', help='OF base class directory', required=True)
     parser.add_argument('--ovfiles', nargs='+', metavar='OVFILE', help='list of directories containing .override files', required=True)
     parser.add_argument('--testdir', help='e.g.: Benchmark.Dhrystone', required=True)
@@ -483,11 +473,9 @@ def run(test_args=None):
     args = parser.parse_args(args=test_args)
 
     if args.debug:
-
         if args.debug < 1 or args.debug > 3:
             print "Error: wrong debug lvl: %s" % (args.debug)
             sys.exit
-
         global log_lvl
         log_lvl = args.debug
 
@@ -497,7 +485,6 @@ def run(test_args=None):
     parseBaseDir(args.classdir, ofcls)
 
     layers = {}
-
     classes = []
     for ovf in args.ovfiles:
         classes = classes + parseOverrideFile(ovf, layers, ofcls)
-- 
2.7.4



  parent reply	other threads:[~2017-03-30  1:04 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30  1:04 [Fuego] fuego-core patches (migration to testspecs and more) Daniel Sangorrin
2017-03-30  1:04 ` [Fuego] [PATCH 01/16] indentation: fix indentation for dhrystone parser Daniel Sangorrin
2017-03-30  1:04   ` [Fuego] [PATCH 02/16] abort: fix the abort function Daniel Sangorrin
2017-03-30 20:26     ` Bird, Timothy
2017-03-30 20:29     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 03/16] shell e flag: remove any e flag from fuego Daniel Sangorrin
2017-03-30 20:40     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 04/16] parser: remove error message when no matches Daniel Sangorrin
2017-03-30 20:51     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 05/16] benchmark: use the same pattern as in functional Daniel Sangorrin
2017-03-30 20:54     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 06/16] board file: remove conf from the path to the board file Daniel Sangorrin
2017-03-30 21:24     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 07/16] batch: remove batch_testplan reference Daniel Sangorrin
2017-03-30 21:32     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 08/16] testplans: use testspecs instead of testplans internally Daniel Sangorrin
2017-03-30 21:43     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 09/16] distrib: DISTRIB must be defined in the board file Daniel Sangorrin
2017-03-30 22:46     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 10/16] user_checks: add to commands so they execute under jenkins Daniel Sangorrin
2017-03-30 22:49     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 11/16] ftc:rm-jobs: remove limitation of 4 words Daniel Sangorrin
2017-03-30 22:50     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 12/16] description setter: put log if the test fails Daniel Sangorrin
2017-03-30 23:04     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 13/16] ftc: remove testplans and use testspecs Daniel Sangorrin
2017-03-30 23:06     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 14/16] ftc test: remove distrib and update paths Daniel Sangorrin
2017-03-30 23:13     ` Bird, Timothy
2017-03-30  1:04   ` [Fuego] [PATCH 15/16] fail_check_cases should not abort the job Daniel Sangorrin
2017-03-30 23:16     ` Bird, Timothy
2017-03-30  1:04   ` Daniel Sangorrin [this message]
2017-03-30 23:19     ` [Fuego] [PATCH 16/16] a bit of cleaning and style fixes Bird, Timothy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc8719a40f2268a6b5c16c0d3a0934cb88e9cd74.1490835200.git.daniel.sangorrin@toshiba.co.jp \
    --to=daniel.sangorrin@toshiba.co.jp \
    --cc=fuego@lists.linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.