|
@@ -31,15 +31,32 @@ from hpcc.regression.regress import Regression
|
|
|
from hpcc.util.ecl.file import ECLFile
|
|
|
from hpcc.util.util import checkPqParam, getVersionNumbers
|
|
|
|
|
|
+prog_version = "0.0.10"
|
|
|
+
|
|
|
if __name__ == "__main__":
|
|
|
- ver = getVersionNumbers()
|
|
|
- if (ver['main'] >= 2) and (ver['minor'] >= 7):
|
|
|
- atexit.register(logging.shutdown)
|
|
|
- prog = "regress"
|
|
|
+
|
|
|
+ prog = "regress v:"+prog_version
|
|
|
description = 'HPCC Platform Regression suite'
|
|
|
+ pythonVer = getVersionNumbers()
|
|
|
+
|
|
|
+ if (pythonVer['main'] <= 2) and (pythonVer['minor'] <=6) and (pythonVer['patch'] <6):
|
|
|
+ print "\nError!"
|
|
|
+ print "Your system has Python version "+platform.python_version()
|
|
|
+ print "To run "+description+", you need version: 2.6.6 or higher, but less than 3.x!\n"
|
|
|
+ exit()
|
|
|
+
|
|
|
+ if pythonVer['main'] >= 3:
|
|
|
+ print "\nError!"
|
|
|
+ print "Your system has Python version "+platform.python_version()
|
|
|
+ print "Actually "+description+", supports version >= 2.6.6 and <= 2.7.x\n"
|
|
|
+ exit()
|
|
|
+
|
|
|
+ if (pythonVer['main'] >= 2) and (pythonVer['minor'] >= 7):
|
|
|
+ atexit.register(logging.shutdown)
|
|
|
+
|
|
|
parser = argparse.ArgumentParser(prog=prog, description=description)
|
|
|
parser.add_argument('--version', '-v', action='version',
|
|
|
- version='%(prog)s 0.0.10')
|
|
|
+ version='%(prog)s')
|
|
|
parser.add_argument('--config', help="config file to use. Default: regress.json",
|
|
|
nargs='?', default="regress.json")
|
|
|
parser.add_argument('--loglevel', help="set the log level. Use debug for more detailed logfile.",
|