Browse Source

Minor changes

Hamilton Turner 10 years ago
parent
commit
8a9f40f5d0

+ 3 - 0
toolset/benchmark/benchmarker.py

@@ -551,11 +551,13 @@ class Benchmarker:
           self.__write_intermediate_results(test.name,"<setup.py>#start() returned non-zero")
           self.__write_intermediate_results(test.name,"<setup.py>#start() returned non-zero")
           return exit_with_code(1)
           return exit_with_code(1)
         
         
+        logging.info("Sleeping %s seconds to ensure framework is ready" % self.sleep)
         time.sleep(self.sleep)
         time.sleep(self.sleep)
 
 
         ##########################
         ##########################
         # Verify URLs
         # Verify URLs
         ##########################
         ##########################
+        logging.info("Verifying framework URLs")
         passed_verify = test.verify_urls(out, err)
         passed_verify = test.verify_urls(out, err)
         out.flush()
         out.flush()
         err.flush()
         err.flush()
@@ -564,6 +566,7 @@ class Benchmarker:
         # Benchmark this test
         # Benchmark this test
         ##########################
         ##########################
         if self.mode == "benchmark":
         if self.mode == "benchmark":
+          logging.info("Benchmarking")
           out.write(header("Benchmarking %s" % test.name))
           out.write(header("Benchmarking %s" % test.name))
           out.flush()
           out.flush()
           test.benchmark(out, err)
           test.benchmark(out, err)

+ 4 - 2
toolset/benchmark/framework_test.py

@@ -239,7 +239,7 @@ class FrameworkTest:
     # Stop the progress printer
     # Stop the progress printer
     stopFlag.set()
     stopFlag.set()
 
 
-    logging.info("Start completed, running %s", self.benchmarker.mode)
+    logging.info("Called setup.py start")
 
 
     return retcode
     return retcode
   ############################################################
   ############################################################
@@ -312,8 +312,10 @@ class FrameworkTest:
         results = [('fail',"""Caused Exception in TFB
         results = [('fail',"""Caused Exception in TFB
           This almost certainly means your return value is incorrect, 
           This almost certainly means your return value is incorrect, 
           but also that you have found a bug. Please submit an issue
           but also that you have found a bug. Please submit an issue
-          including this message: %s""" % e,base_url)]
+          including this message: %s\n%s""" % (e, traceback.format_exc()), 
+          base_url)]
         logging.warning("Verifying test %s for %s caused an exception: %s", test_type, self.name, e)
         logging.warning("Verifying test %s for %s caused an exception: %s", test_type, self.name, e)
+        traceback.format_exc()
 
 
       test.failed = any(result is 'fail' for (result, reason, url) in results)
       test.failed = any(result is 'fail' for (result, reason, url) in results)
       test.warned = any(result is 'warn' for (result, reason, url) in results)
       test.warned = any(result is 'warn' for (result, reason, url) in results)

+ 4 - 5
toolset/benchmark/test_types/framework_test_type.py

@@ -74,11 +74,6 @@ class FrameworkTestType:
     [item.write(err+'\n') for item in self.err]
     [item.write(err+'\n') for item in self.err]
     return out
     return out
   
   
-  def copy(self):
-    '''Returns a copy that can be safely modified. Use before calling 
-    parse'''
-    return copy.copy(self)
-
   def verify(self, base_url):
   def verify(self, base_url):
     '''Accesses URL used by this test type and checks the return 
     '''Accesses URL used by this test type and checks the return 
     values for correctness. Most test types run multiple checks,
     values for correctness. Most test types run multiple checks,
@@ -105,4 +100,8 @@ class FrameworkTestType:
     # for their URL so the base class can't know which arg is the URL
     # for their URL so the base class can't know which arg is the URL
     raise NotImplementedError("Subclasses must provide verify")
     raise NotImplementedError("Subclasses must provide verify")
 
 
+  def copy(self):
+    '''Returns a copy that can be safely modified. Use before calling 
+    parse'''
+    return copy.copy(self)
 
 

+ 0 - 2
toolset/benchmark/test_types/update_type.py

@@ -9,8 +9,6 @@ class UpdateTestType(QueryTestType):
     FrameworkTestType.__init__(self, name='update', requires_db=True, 
     FrameworkTestType.__init__(self, name='update', requires_db=True, 
       accept_header=self.accept_json, args=args)
       accept_header=self.accept_json, args=args)
 
 
-    pprint(self.__dict__)
-
   def get_url(self):
   def get_url(self):
     return self.update_url
     return self.update_url