Data-Test-Executer Framework speziell zum Test von Datenverarbeitungen mit Datengenerierung, Systemvorbereitungen, Einspielungen, ganzheitlicher diversifizierender Vergleich
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 lines
1.1 KiB

import utils.config_tool
import utils.file_tool
import basic.program
def importEnvProperty():
job = basic.program.Job.getInstance()
path = utils.config_tool.getConfig("tool", "env")
props = utils.file_tool.readFileDict(path, job.m)
job.conf.confs["env"] = props["prop"]
def exportEnvProperty():
job = basic.program.Job.getInstance()
props = {}
if not hasattr(job, "conf"): return
if not hasattr(job.conf, "confs"): return
if not "env" in job.confconfs: return
props["prop"] = job.conf.confs["env"]
path = utils.config_tool.getConfig("tool", "env")
utils.file_tool.writeFileDict(job.m, path, props)
def setEnvProp(props):
job = basic.program.Job.getInstance()
path = utils.config_tool.getConfig("tool", "env")
utils.file_tool.writeFileDict(job.m, path, props)
def getEnvProperty(propname):
job = basic.program.Job.getInstance()
if "env" not in job.conf.confs:
importEnvProperty()
prop = job.conf.confs[propname]
if (prop["type"] == "succ"):
val = prop["value"]
val += 1
prop["value"] = val
return val