@@ -475,7 +475,13 @@ def parseGenTestPlan(tpFilePath, fout, fname, specs):
with open(tpFilePath) as f:
debug_print("parsing `%s' TP" % (tpFilePath), 1)
- jd = json.load(f)
+ try:
+ jd = json.load(f)
+ except:
+ print "Error parsing testplan file %s" % tpFilePath
+ f.seek(0)
+ js = json.load(f)
+
name = jd["testPlanName"]
fout.write("#testplan: %s\n" % (name))
for t in jd["tests"]:
@@ -504,7 +510,13 @@ def parseSpec(specFileName):
debug_print("Parsing %s spec file" % (specFileName))
with open(specFileName) as f:
- jd = json.load(f)
+ try:
+ jd = json.load(f)
+ except:
+ print "Error parsing spec file %s" % specFileName
+ f.seek(0)
+ jd = json.load(f)
+
name = jd["testName"]
debug_print("parsing `%s' spec" % (name), 1)