Browse Source

Log request bodies, fix comparisons

Zane Kansil 10 years ago
parent
commit
de6e4a3348

+ 3 - 3
toolset/benchmark/framework_test.py

@@ -383,9 +383,9 @@ class FrameworkTest:
         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.warned = any(result is 'warn' for (result, reason, url) in results)
-      test.passed = all(result is 'pass' for (result, reason, url) in results)
+      test.failed = any(result == 'fail' for (result, reason, url) in results)
+      test.warned = any(result == 'warn' for (result, reason, url) in results)
+      test.passed = all(result == 'pass' for (result, reason, url) in results)
       
       def output_result(result, reason, url):
         specific_rules_url = "http://frameworkbenchmarks.readthedocs.org/en/latest/Project-Information/Framework-Tests/#specific-test-requirements"

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

@@ -79,6 +79,10 @@ class FrameworkTestType:
       body = r.content
       self.out.write(str(headers))
       self.out.write(body)
+      
+      b = 40
+      print "  Response (trimmed to %d bytes): \"%s\"" % (b, body.strip()[:b])
+      
       return headers, body
     except requests.HTTPError as err:
       self.err.write(err + '\n')