Example #1
0
def bctester(testDir, input_basename, buildenv):
  """
  """
  input_filename = testDir + "/" + input_basename
  raw_data = open(input_filename).read()
  input_data = json.loads(raw_data)

  failed_testcase = []

  for testObj in input_data:
    try:
      bctest(testDir, testObj, buildenv.exeext)
      logging.info("PASSED: " + testObj["description"])
    except:
      logging.info("FAILED: " + testObj["description"])
      failed_testcases.append(testObj["description"])

  if failed_testcases:
    error_message = "FAILED_TESTCASES:\n"
    error_message += pprint.pfromat(failed_testcases, width=400)
    logging.error(error_message)
    sys.exit(1)
  else:
    sys.exit(0)
Example #2
0
 def __repr__(self):
     return pprint.pfromat(dataCapsule)