self.copyright = copyright
class Configuration:
- def __init__ (self, name, filters, glconfig = None, rotation = "unspecified", surfacetype = None, surfacewidth = None, surfaceheight = None, baseseed = None, fboconfig = None, required = False, runtime = None, os = "any"):
+ def __init__ (self, name, filters, glconfig = None, rotation = "unspecified", surfacetype = None, surfacewidth = None, surfaceheight = None, baseseed = None, fboconfig = None, required = False, runtime = None, os = "any"):
self.name = name
self.glconfig = glconfig
self.rotation = rotation
try:
execute(['git', 'checkout', '--quiet', package.conformVersion])
- except Exception, e:
+ except Exception as e:
print(str(e))
print("Failed to checkout release tag %s." % package.conformVersion)
return messages
for log, path in package.gitLog:
try:
isEmpty = isGitLogFileEmpty(package, path, log)
- except Exception, e:
+ except Exception as e:
print(str(e))
isEmpty = False
sys.exit(-1)
try:
execute(['git', 'ls-remote', 'origin', '--quiet'])
- except Exception, e:
+ except Exception as e:
print(str(e))
print("This script must be executed inside VK-GL-CTS directory.")
sys.exit(-1)
if caseResult == None:
print("FAIL: %s not found" % caseName)
- return False
+ return False
if not isStatusCodeOk(caseResult.statusCode):
print("FAIL: %s" % caseResult)
- return False
+ return False
return True
isOk = verifySubmission(argv[1])
print("Verification %s" % ("PASSED" if isOk else "FAILED!"))
sys.exit(0 if isOk else 1)
- except Exception, e:
+ except Exception as e:
print(str(e))
print("Error occurred during verification")
sys.exit(-1)
def compare_rev(self):
fullDstPath = os.path.join(EXTERNAL_DIR, self.baseDir, self.extractDir)
pushWorkingDir(fullDstPath)
- try:
+ try:
out = subprocess.check_output(["git", "rev-parse", "HEAD"])
if out.replace('\n', '') != SHA1:
raise Exception ("KC CTS checkout revision %s in external/fetch_kc_cts.py doesn't match KC CTS master HEAD revision %s" % (SHA1, out))
- finally:
- popWorkingDir()
+ finally:
+ popWorkingDir()
PACKAGES = [
GitRepo(
job.join()
if errorCode.error:
- raise errorCode.error[0], errorCode.error[1], errorCode.error[2]
+ raise errorCode.error[0](errorCode.error[1]).with_traceback(errorCode.error[2])
def uninstall (adbPath, packageName, extraArgs = [], printPrefix=""):
print(printPrefix + "Removing existing %s...\n" % packageName,)
yield os.path.join(root, file)
def checkBOMs (files, fix):
- correct = True
- for file in files:
- if hasBOM(file):
+ correct = True
+ for file in files:
+ if hasBOM(file):
if fix:
removeBOM(file)
print("File %s contained BOM and was fixed" % file)
else:
correct = False
print("File %s contains BOM" % file)
- return correct
+ return correct
if __name__ == "__main__":
parser = OptionParser()