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.2 KiB

import utils.config_tool
import utils.file_tool
import basic.program
def importEnvProperty(job):
#job = basic.program.Job.getInstance()
path = utils.config_tool.getConfig(job, "tool", "env")
props = utils.file_tool.readFileDict(job, path, job.m)
job.conf.confs["env"] = props["prop"]
def exportEnvProperty(job):
# 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(job, "tool", "env")
utils.file_tool.writeFileDict(job.m, job, path, props)
def setEnvProp(job, props):
# job = basic.program.Job.getInstance()
path = utils.config_tool.getConfig(job, "tool", "env")
utils.file_tool.writeFileDict(job.m, job, path, props)
def getEnvProperty(job, propname):
# job = basic.program.Job.getInstance()
if "env" not in job.conf.confs:
importEnvProperty(job)
prop = job.conf.confs[propname]
if (prop["type"] == "succ"):
val = prop["value"]
val += 1
prop["value"] = val
return val