Browse Source

Fixed a bug with getting metadata

msmith-techempower 10 years ago
parent
commit
81e60f7d09
2 changed files with 36 additions and 22 deletions
  1. 23 22
      toolset/benchmark/benchmarker.py
  2. 13 0
      toolset/benchmark/framework_test.py

+ 23 - 22
toolset/benchmark/benchmarker.py

@@ -492,7 +492,7 @@ class Benchmarker:
       else:
         sys.exit(code)
 
-    logDir = os.path.join(self.latest_results_directory, 'logs', "{name}".format(name=test.name))
+    logDir = os.path.join(self.latest_results_directory, 'logs', test.name)
 
     try:
       os.makedirs(logDir)
@@ -841,27 +841,28 @@ class Benchmarker:
   # __finish
   ############################################################
   def __finish(self):
-    tests = self.__gather_tests
-    # Normally you don't have to use Fore.BLUE before each line, but 
-    # Travis-CI seems to reset color codes on newline (see travis-ci/travis-ci#2692)
-    # or stream flush, so we have to ensure that the color code is printed repeatedly
-    prefix = Fore.CYAN
-    for line in header("Verification Summary", top='=', bottom='').split('\n'):
-      print prefix + line
-    for test in tests:
-      print prefix + "| Test: %s" % test.name
-      if test.name in self.results['verify'].keys():
-        for test_type, result in self.results['verify'][test.name].iteritems():
-          if result.upper() == "PASS":
-            color = Fore.GREEN
-          elif result.upper() == "WARN":
-            color = Fore.YELLOW
-          else:
-            color = Fore.RED
-          print prefix + "|       " + test_type.ljust(11) + ' : ' + color + result.upper()
-      else:
-        print prefix + "|      " + Fore.RED + "NO RESULTS (Did framework launch?)"
-    print prefix + header('', top='', bottom='=') + Style.RESET_ALL
+    if not self.list_tests and not self.list_test_metadata and not self.parse:
+      tests = self.__gather_tests
+      # Normally you don't have to use Fore.BLUE before each line, but 
+      # Travis-CI seems to reset color codes on newline (see travis-ci/travis-ci#2692)
+      # or stream flush, so we have to ensure that the color code is printed repeatedly
+      prefix = Fore.CYAN
+      for line in header("Verification Summary", top='=', bottom='').split('\n'):
+        print prefix + line
+      for test in tests:
+        print prefix + "| Test: %s" % test.name
+        if test.name in self.results['verify'].keys():
+          for test_type, result in self.results['verify'][test.name].iteritems():
+            if result.upper() == "PASS":
+              color = Fore.GREEN
+            elif result.upper() == "WARN":
+              color = Fore.YELLOW
+            else:
+              color = Fore.RED
+            print prefix + "|       " + test_type.ljust(11) + ' : ' + color + result.upper()
+        else:
+          print prefix + "|      " + Fore.RED + "NO RESULTS (Did framework launch?)"
+      print prefix + header('', top='', bottom='=') + Style.RESET_ALL
 
     print "Time to complete: " + str(int(time.time() - self.start_time)) + " seconds"
     print "Results are saved in " + os.path.join(self.result_directory, self.timestamp)

+ 13 - 0
toolset/benchmark/framework_test.py

@@ -678,6 +678,19 @@ class FrameworkTest:
     self.benchmarker = benchmarker
     self.runTests = runTests
     self.fwroot = benchmarker.fwroot
+    self.approach = ""
+    self.classification = ""
+    self.database = ""
+    self.framework = ""
+    self.language = ""
+    self.orm = ""
+    self.platform = ""
+    self.webserver = ""
+    self.os = ""
+    self.database_os = ""
+    self.display_name = ""
+    self.notes = ""
+    self.versus = ""
     
     # setup logging
     logging.basicConfig(stream=sys.stderr, level=logging.INFO)