|
@ -30,84 +30,120 @@ jobdef = { |
|
|
"pfiletarget": "", |
|
|
"pfiletarget": "", |
|
|
"basedir": "workbase", |
|
|
"basedir": "workbase", |
|
|
"dirname": "workdir", |
|
|
"dirname": "workdir", |
|
|
"logdir": "{job.par.debugs}/webflask/log_{time}.txt" }, |
|
|
"loglevel": basic.message.LIMIT_INFO, |
|
|
|
|
|
"logpath": "{job.conf.data}/workspace/webflask_{job.start:H}.txt" }, |
|
|
|
|
|
"declare_result": { |
|
|
|
|
|
"pardef": "", |
|
|
|
|
|
"pfilesource": "", |
|
|
|
|
|
"pfiletarget": "", |
|
|
|
|
|
"basedir": "workbase", |
|
|
|
|
|
"dirname": "workdir", |
|
|
|
|
|
"loglevel": basic.message.LIMIT_INFO, |
|
|
|
|
|
"logpath": "{job.conf.data}/workspace/reorg_{job.start:H}.txt" }, |
|
|
|
|
|
"temp": { |
|
|
|
|
|
"pardef": "", |
|
|
|
|
|
"pfilesource": "", |
|
|
|
|
|
"pfiletarget": "", |
|
|
|
|
|
"basedir": "workbase", |
|
|
|
|
|
"dirname": "workdir", |
|
|
|
|
|
"loglevel": basic.message.LIMIT_INFO, |
|
|
|
|
|
"logpath": "{job.par.envdir}/{log}/log_{job.start:H}.txt" }, |
|
|
"unit": { |
|
|
"unit": { |
|
|
"pardef": "", |
|
|
"pardef": "", |
|
|
"pfilesource": "", |
|
|
"pfilesource": "", |
|
|
"pfiletarget": "envparfile", |
|
|
"pfiletarget": "envparfile", |
|
|
"basedir": "envbase", |
|
|
"basedir": "envbase", |
|
|
"dirname": "envdir", |
|
|
"dirname": "envdir", |
|
|
"logdir": "{job.par.envdir}/{log}/log_{time}.txt" }, |
|
|
"loglevel": basic.message.LIMIT_DEBUG, |
|
|
|
|
|
"logpath": "{job.par.envdir}/{log}/log_{job.start:H}.txt" }, |
|
|
"check_environment": { |
|
|
"check_environment": { |
|
|
"pardef": "", |
|
|
"pardef": "", |
|
|
"pfilesource": "", |
|
|
"pfilesource": "", |
|
|
"pfiletarget": "envparfile", |
|
|
"pfiletarget": "envparfile", |
|
|
"basedir": "envbase", |
|
|
"basedir": "envbase", |
|
|
"dirname": "envdir", |
|
|
"dirname": "envdir", |
|
|
"logdir": "{job.par.envdir}/{log}/log_{time}.txt" }, |
|
|
"loglevel": basic.message.LIMIT_INFO, |
|
|
|
|
|
"logpath": "{job.par.envdir}/{log}/log_{job.start}.txt" }, |
|
|
"test_executer": { |
|
|
"test_executer": { |
|
|
"pardef": "", |
|
|
"pardef": "", |
|
|
"pfilesource": "tsparfile", |
|
|
"pfilesource": "tsparfile", |
|
|
"pfiletarget": "tsparfile", |
|
|
"pfiletarget": "tsparfile", |
|
|
"basedir": "tsbase", |
|
|
"basedir": "tsbase", |
|
|
"dirname": "tsdir", |
|
|
"dirname": "tsdir", |
|
|
"logdir": "{job.par.tsdir}/{log}/log_{time}.txt" }, |
|
|
"loglevel": basic.message.LIMIT_INFO, |
|
|
|
|
|
"logpath": "{job.par.tsdir}/{log}/{job.program}_{job.start}.txt" }, |
|
|
"init_testsuite": { |
|
|
"init_testsuite": { |
|
|
"pardef": "tsdir", # ,tdtyp,tdsrc,tdname", |
|
|
"pardef": "tsdir", # ,tdtyp,tdsrc,tdname", |
|
|
"pfilesource": "envparfile", |
|
|
"pfilesource": "envparfile", |
|
|
"pfiletarget": "tsparfile", |
|
|
"pfiletarget": "tsparfile", |
|
|
"basedir": "tsbase", |
|
|
"basedir": "tsbase", |
|
|
"dirname": "tsdir", |
|
|
"dirname": "tsdir", |
|
|
"logdir": "{job.par.tsdir}/{log}/log_{tstime}.txt" }, |
|
|
"loglevel": basic.message.LIMIT_INFO, |
|
|
|
|
|
"logpath": "{job.par.tsdir}/{log}/{job.program}_{job.start}.txt" }, |
|
|
"init_testcase": { |
|
|
"init_testcase": { |
|
|
"pardef": "tcdir", # ",tdtyp,tdsrc,tdname", |
|
|
"pardef": "tcdir", # ",tdtyp,tdsrc,tdname", |
|
|
"pfilesource": "envparfile", |
|
|
"pfilesource": "envparfile", |
|
|
"pfiletarget": "tcparfile", |
|
|
"pfiletarget": "tcparfile", |
|
|
"basedir": "tcbase", |
|
|
"basedir": "tcbase", |
|
|
"dirname": "tcdir", |
|
|
"dirname": "tcdir", |
|
|
"logdir": "{job.par.tcdir}/{log}/log_{tctime}.txt" }, |
|
|
"loglevel": basic.message.LIMIT_INFO, |
|
|
|
|
|
"logpath": "{job.par.tcdir}/{log}/{job.program}_{job.start}.txt" }, |
|
|
"execute_testcase": { |
|
|
"execute_testcase": { |
|
|
"pardef": "tcdir", # ",tdtyp,tdsrc,tdname", |
|
|
"pardef": "tcdir", # ",tdtyp,tdsrc,tdname", |
|
|
"pfilesource": "tcparfile", |
|
|
"pfilesource": "tcparfile", |
|
|
"pfiletarget": "tcparfile", |
|
|
"pfiletarget": "tcparfile", |
|
|
"basedir": "tcbase", |
|
|
"basedir": "tcbase", |
|
|
"dirname": "tcdir", |
|
|
"dirname": "tcdir", |
|
|
"logdir": "{job.par.tcdir}/{log}/log_{tctime}.txt" }, |
|
|
"loglevel": basic.message.LIMIT_INFO, |
|
|
|
|
|
"logpath": "{job.par.tcdir}/{log}/{job.program}_{job.start}.txt" }, |
|
|
"collect_testcase": { |
|
|
"collect_testcase": { |
|
|
"pardef": "tcdir", # ",tdtyp,tdsrc,tdname", |
|
|
"pardef": "tcdir", # ",tdtyp,tdsrc,tdname", |
|
|
"pfilesource": "tcparfile", |
|
|
"pfilesource": "tcparfile", |
|
|
"pfiletarget": "tcparfile", |
|
|
"pfiletarget": "tcparfile", |
|
|
"basedir": "tcbase", |
|
|
"basedir": "tcbase", |
|
|
"dirname": "tcdir", |
|
|
"dirname": "tcdir", |
|
|
"logdir": "{job.par.tcdir}/{log}/log_{tctime}.txt" }, |
|
|
"loglevel": basic.message.LIMIT_INFO, |
|
|
|
|
|
"logpath": "{job.par.tcdir}/{log}/{job.program}_{job.start}.txt" }, |
|
|
|
|
|
"copy_appdummy": { |
|
|
|
|
|
"pardef": "tcdir", # ",tdtyp,tdsrc,tdname", |
|
|
|
|
|
"pfilesource": "tcparfile", |
|
|
|
|
|
"pfiletarget": "tcparfile", |
|
|
|
|
|
"basedir": "tcbase", |
|
|
|
|
|
"dirname": "tcdir", |
|
|
|
|
|
"loglevel": basic.message.LIMIT_INFO, |
|
|
|
|
|
"logpath": "{job.par.tcdir}/{log}/{job.program}_{job.start}.txt"}, |
|
|
"compare_testcase": { |
|
|
"compare_testcase": { |
|
|
"pardef": "tcdir", # ",tdtyp,tdsrc,tdname", |
|
|
"pardef": "tcdir", # ",tdtyp,tdsrc,tdname", |
|
|
"pfilesource": "tcparfile", |
|
|
"pfilesource": "tcparfile", |
|
|
"pfiletarget": "tcparfile", |
|
|
"pfiletarget": "tcparfile", |
|
|
"basedir": "tcbase", |
|
|
"basedir": "tcbase", |
|
|
"dirname": "tcdir", |
|
|
"dirname": "tcdir", |
|
|
"logdir": "{job.par.tcdir}/{log}/log_{tctime}.txt" }, |
|
|
"loglevel": basic.message.LIMIT_INFO, |
|
|
|
|
|
"logpath": "{job.par.tcdir}/{log}/{job.program}_{job.start}.txt" }, |
|
|
"test_system": { |
|
|
"test_system": { |
|
|
"pardef": "tcdir,tdtyp,tdsrc,tdname", |
|
|
"pardef": "tcdir,tdtyp,tdsrc,tdname", |
|
|
"pfilesource": "tsparfile", |
|
|
"pfilesource": "tsparfile", |
|
|
"pfiletarget": "tsparfile", |
|
|
"pfiletarget": "tsparfile", |
|
|
"basedir": "tcbase", |
|
|
"basedir": "tcbase", |
|
|
"dirname": "tcdir", |
|
|
"dirname": "tcdir", |
|
|
"logdir": "{job.par.tcdir}/{log}/log_{tctime}.txt"}, |
|
|
"loglevel": basic.message.LIMIT_INFO, |
|
|
|
|
|
"logpath": "{job.par.tcdir}/{log}/{job.program}_{job.start}.txt"}, |
|
|
"finish_testcase": { |
|
|
"finish_testcase": { |
|
|
"pardef": "tcdir", |
|
|
"pardef": "tcdir", |
|
|
"pfilesource": "tcparfile", |
|
|
"pfilesource": "tcparfile", |
|
|
"pfiletarget": "tcparfile", |
|
|
"pfiletarget": "tcparfile", |
|
|
"basedir": "tcbase", |
|
|
"basedir": "tcbase", |
|
|
"dirname": "tcdir", |
|
|
"dirname": "tcdir", |
|
|
"logdir": "{job.par.tcdir}/{log}/log_{tctime}.txt"}, |
|
|
"loglevel": basic.message.LIMIT_INFO, |
|
|
|
|
|
"logpath": "{job.par.tcdir}/{log}/{job.program}_{job.start}.txt"}, |
|
|
"finish_testsuite": { |
|
|
"finish_testsuite": { |
|
|
"pardef": "tsdir", |
|
|
"pardef": "tsdir", |
|
|
"pfilesource": "tsparfile", |
|
|
"pfilesource": "tsparfile", |
|
|
"pfiletarget": "tssarfile", |
|
|
"pfiletarget": "tssarfile", |
|
|
"basedir": "tsbase", |
|
|
"basedir": "tsbase", |
|
|
"dirname": "tsdir", |
|
|
"dirname": "tsdir", |
|
|
"logdir": "{job.par.tcdir}/{log}/log_{tctime}.txt"} |
|
|
"loglevel": basic.message.LIMIT_INFO, |
|
|
|
|
|
"logpath": "{job.par.tcdir}/{log}/{job.program}_{job.start}.txt"} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -125,6 +161,8 @@ DEFAULT_ENV = "Workspace" |
|
|
DEFAULT_MODE = "test" |
|
|
DEFAULT_MODE = "test" |
|
|
DEFAULT_TIME = "2022-08-29_17-29-59" |
|
|
DEFAULT_TIME = "2022-08-29_17-29-59" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def createJob(pprg="", pgran="", papp="", penv="", ptstamp="", pmode=""): |
|
|
def createJob(pprg="", pgran="", papp="", penv="", ptstamp="", pmode=""): |
|
|
""" |
|
|
""" |
|
|
this creates a Job-Object with the main arguments. |
|
|
this creates a Job-Object with the main arguments. |
|
@ -187,18 +225,31 @@ class Job: |
|
|
__instances = [] |
|
|
__instances = [] |
|
|
__jobid = 100000 |
|
|
__jobid = 100000 |
|
|
|
|
|
|
|
|
def __init__ (self, program): |
|
|
def __init__ (self, program, args=None): |
|
|
|
|
|
""" |
|
|
|
|
|
initializing the job-object as a global structure for the actual doing |
|
|
|
|
|
type of job: |
|
|
|
|
|
a) (single) job for testing work [--args] |
|
|
|
|
|
work-folder is the testcase-folder, logging into testcase-log |
|
|
|
|
|
b) (single) job for reorganization of the testing area [--args] |
|
|
|
|
|
working-folder is the workspace or the environment-folder, logging is there |
|
|
|
|
|
c) webflask-job for the web-server --args |
|
|
|
|
|
work-folder is the web-workspace, |
|
|
|
|
|
if real jobs created these jobs runs as testing resp. reorganization-job |
|
|
|
|
|
d) unit-testing job --args! |
|
|
|
|
|
work-folder is the debug-area |
|
|
|
|
|
if real jobs for unit-testing created these jobs runs with unit-mode like a unit-test |
|
|
|
|
|
:param program: |
|
|
|
|
|
:param args: optional with arguments otherwise the cli-parameter |
|
|
|
|
|
""" |
|
|
|
|
|
# postcondition |
|
|
|
|
|
# - job.conf with basis config |
|
|
|
|
|
# - job.par with parameter-args or cli-args |
|
|
|
|
|
# - job.msg |
|
|
print ("################# init Job ## " + program + " #################") |
|
|
print ("################# init Job ## " + program + " #################") |
|
|
Job.__jobid += 1 |
|
|
Job.__jobid += 1 |
|
|
self.jobid = str(Job.__jobid) |
|
|
self.jobid = str(Job.__jobid) |
|
|
self.program = program |
|
|
self.program = program |
|
|
Job.__instance = self |
|
|
|
|
|
if Job.__instances is None: |
|
|
|
|
|
Job.__instances = [] |
|
|
|
|
|
#Job.pushInstance(self) |
|
|
|
|
|
par = Parameter(self, program) |
|
|
|
|
|
self.par = par |
|
|
|
|
|
print("prog-42 " + str(self.par.basedir)) |
|
|
|
|
|
conf = Configuration(self, program) |
|
|
conf = Configuration(self, program) |
|
|
self.conf = conf |
|
|
self.conf = conf |
|
|
try: |
|
|
try: |
|
@ -211,7 +262,18 @@ class Job: |
|
|
print(appl) |
|
|
print(appl) |
|
|
if appl is not None: |
|
|
if appl is not None: |
|
|
self.conf.confs[B.SUBJECT_APPS] = appl[B.SUBJECT_APPS] |
|
|
self.conf.confs[B.SUBJECT_APPS] = appl[B.SUBJECT_APPS] |
|
|
print("prog-45 " + str(self.par.basedir)) |
|
|
par = Parameter(self, program, args) |
|
|
|
|
|
self.par = par |
|
|
|
|
|
logTime = utils.date_tool.getActdate(utils.date_tool.F_LOG) |
|
|
|
|
|
self.start = logTime |
|
|
|
|
|
self.m = basic.message.Message(self, jobdef[program]["loglevel"], logTime, None) |
|
|
|
|
|
|
|
|
|
|
|
def getLogpath(self): |
|
|
|
|
|
path = utils.path_tool.composePattern(self, jobdef[self.program]["logpath"], None) |
|
|
|
|
|
return path |
|
|
|
|
|
|
|
|
|
|
|
def murks(self, par, program): |
|
|
|
|
|
self.par = par |
|
|
dirpath = self.par.getDirParameter() |
|
|
dirpath = self.par.getDirParameter() |
|
|
setGlobal() |
|
|
setGlobal() |
|
|
if dirpath is not None: |
|
|
if dirpath is not None: |
|
@ -237,6 +299,7 @@ class Job: |
|
|
if not hasattr(self.par, jobdef[program]["dirname"]): |
|
|
if not hasattr(self.par, jobdef[program]["dirname"]): |
|
|
setattr(self.par, jobdef[program]["dirname"], |
|
|
setattr(self.par, jobdef[program]["dirname"], |
|
|
utils.path_tool.composePattern(self, "{"+basedir+"}", None)) |
|
|
utils.path_tool.composePattern(self, "{"+basedir+"}", None)) |
|
|
|
|
|
print(parstring) |
|
|
self.par.setParameterLoaded(self) |
|
|
self.par.setParameterLoaded(self) |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -250,6 +313,7 @@ class Job: |
|
|
self.m.logInfo("# # # Start Job " + self.start.strftime("%d.%m.%Y %H:%M:%S") + " # # # ") |
|
|
self.m.logInfo("# # # Start Job " + self.start.strftime("%d.%m.%Y %H:%M:%S") + " # # # ") |
|
|
self.m.debug(basic.message.LIMIT_INFO, "# # # Start Job " + self.start.strftime("%d.%m.%Y %H:%M:%S") + " # # # ") |
|
|
self.m.debug(basic.message.LIMIT_INFO, "# # # Start Job " + self.start.strftime("%d.%m.%Y %H:%M:%S") + " # # # ") |
|
|
self.par.checkParameter(self) |
|
|
self.par.checkParameter(self) |
|
|
|
|
|
self.m.logInfo(self.par.parstring) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def stopJob(self, reboot=0): |
|
|
def stopJob(self, reboot=0): |
|
@ -292,9 +356,11 @@ class Job: |
|
|
if len(str(jobdef[self.program]["pfilesource"])) < 2: |
|
|
if len(str(jobdef[self.program]["pfilesource"])) < 2: |
|
|
return None |
|
|
return None |
|
|
parpath = utils.path_tool.composePath(self, jobdef[self.program]["pfilesource"], None) |
|
|
parpath = utils.path_tool.composePath(self, jobdef[self.program]["pfilesource"], None) |
|
|
|
|
|
print("parpath "+parpath) |
|
|
if not os.path.join(parpath): |
|
|
if not os.path.join(parpath): |
|
|
return None |
|
|
return None |
|
|
doc = utils.file_tool.readFileDict(self, parpath, self.m) |
|
|
print("parpath "+parpath) |
|
|
|
|
|
doc = utils.file_tool.readFileDict(self, parpath, None) |
|
|
for k in doc.keys(): |
|
|
for k in doc.keys(): |
|
|
output[k] = copy.deepcopy(doc[k]) |
|
|
output[k] = copy.deepcopy(doc[k]) |
|
|
return output |
|
|
return output |
|
@ -307,6 +373,10 @@ class Job: |
|
|
neu = utils.date_tool.getActdate(utils.date_tool.F_DIR) |
|
|
neu = utils.date_tool.getActdate(utils.date_tool.F_DIR) |
|
|
# setattr(self.par, parameter, neu) |
|
|
# setattr(self.par, parameter, neu) |
|
|
return neu |
|
|
return neu |
|
|
|
|
|
else: |
|
|
|
|
|
print("Parameter "+parameter+" nicht in job.par ") |
|
|
|
|
|
for attr, value in self.par.__dict__.items(): |
|
|
|
|
|
print(attr, value) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def hasElement(self, parameter, elem): |
|
|
def hasElement(self, parameter, elem): |
|
@ -371,17 +441,34 @@ class Job: |
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------------------------------------------ |
|
|
# ------------------------------------------------------------------------------------------------------------------ |
|
|
class Parameter: |
|
|
class Parameter: |
|
|
|
|
|
""" |
|
|
|
|
|
parameter with source either the list args or the args of the main-program |
|
|
|
|
|
content of parameter: |
|
|
|
|
|
+ single arguments |
|
|
|
|
|
+ dirname of work-folder either from dir-parameter or composed from single parameter |
|
|
|
|
|
comparison with a parameter-file from the work-folder |
|
|
|
|
|
""" |
|
|
print ("class Parameter") |
|
|
print ("class Parameter") |
|
|
def __init__ (self, job, program): |
|
|
def __init__ (self, job, program, args=None): |
|
|
print ("# init Parameter for " + program) |
|
|
print ("# init Parameter for " + program) |
|
|
self.program = program |
|
|
self.program = program |
|
|
self.basedir = "debugs" |
|
|
if args is not None and isinstance(args, dict): |
|
|
self.setBasedir(program) |
|
|
self.setParameterArgs(job, args) |
|
|
|
|
|
else: |
|
|
|
|
|
self.setParameter(job) |
|
|
|
|
|
self.basedir = jobdef[program]["basedir"] |
|
|
|
|
|
job.basedir = jobdef[program]["basedir"] |
|
|
print (f"# Parameter initialisiert {self.program} mit basedir {self.basedir}") |
|
|
print (f"# Parameter initialisiert {self.program} mit basedir {self.basedir}") |
|
|
if (program not in ["unit", "webflask"] ): self.setParameter(job) |
|
|
job.par = self |
|
|
|
|
|
if not hasattr(self, jobdef[program]["dirname"]): |
|
|
|
|
|
setattr(self, jobdef[program]["dirname"], |
|
|
|
|
|
utils.path_tool.composePattern(job, "{"+self.basedir+"}", None)) |
|
|
|
|
|
else: |
|
|
|
|
|
utils.path_tool.extractPath(job, jobdef[program]["basedir"], getattr(self, jobdef[program]["dirname"])) |
|
|
|
|
|
self.setParameterLoaded(job) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def setBasedir(self, program): |
|
|
def setBasedir(self, job, program): |
|
|
if jobdef[program]: |
|
|
if jobdef[program]: |
|
|
self.basedir = jobdef[program]["basedir"] |
|
|
self.basedir = jobdef[program]["basedir"] |
|
|
if hasattr(self, jobdef[program]["dirname"]): |
|
|
if hasattr(self, jobdef[program]["dirname"]): |
|
@ -391,7 +478,8 @@ class Parameter: |
|
|
dirpath = os.path.join(home, "data", "workspace") |
|
|
dirpath = os.path.join(home, "data", "workspace") |
|
|
setattr(self, jobdef[program]["dirname"], dirpath) |
|
|
setattr(self, jobdef[program]["dirname"], dirpath) |
|
|
elif program != "unit": |
|
|
elif program != "unit": |
|
|
dirpath = utils.path_tool.composePattern(None, "{"+jobdef[program]["basedir"]+"}", None) |
|
|
# compose after setargs |
|
|
|
|
|
dirpath = utils.path_tool.composePattern(job, "{"+jobdef[program]["basedir"]+"}", None) |
|
|
setattr(self, jobdef[program]["dirname"], dirpath) |
|
|
setattr(self, jobdef[program]["dirname"], dirpath) |
|
|
else: |
|
|
else: |
|
|
self.basedir = "debugs" |
|
|
self.basedir = "debugs" |
|
@ -468,21 +556,20 @@ class Parameter: |
|
|
if getattr(args, k) is not None: |
|
|
if getattr(args, k) is not None: |
|
|
self.setJobAttr(k , getattr(args, k)) |
|
|
self.setJobAttr(k , getattr(args, k)) |
|
|
dirpath = self.getDirParameter() |
|
|
dirpath = self.getDirParameter() |
|
|
if dirpath is not None: |
|
|
#if dirpath is not None: |
|
|
utils.path_tool.extractPath(job, dirpath[0], dirpath[1]) |
|
|
# utils.path_tool.extractPath(job, dirpath[0], dirpath[1]) |
|
|
app = self.application |
|
|
if hasattr(self, "application") and self.application in job.conf.confs[B.SUBJECT_APPS]: |
|
|
if self.application in job.conf.confs[B.SUBJECT_APPS]: |
|
|
|
|
|
if B.ATTR_APPS_PROJECT in job.conf.confs[B.SUBJECT_APPS][self.application]: |
|
|
if B.ATTR_APPS_PROJECT in job.conf.confs[B.SUBJECT_APPS][self.application]: |
|
|
setattr(self, B.ATTR_APPS_PROJECT, job.conf.confs[B.SUBJECT_APPS][self.application][B.ATTR_APPS_PROJECT]) |
|
|
setattr(self, B.ATTR_APPS_PROJECT, job.conf.confs[B.SUBJECT_APPS][self.application][B.ATTR_APPS_PROJECT]) |
|
|
proj = getattr(self, B.ATTR_APPS_PROJECT) |
|
|
proj = getattr(self, B.ATTR_APPS_PROJECT) |
|
|
app2 = self.application |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def setParameterLoaded(self, job): |
|
|
def setParameterLoaded(self, job): |
|
|
#job = Job.getInstance() |
|
|
#job = Job.getInstance() |
|
|
print("setParLoaded " ) |
|
|
print("setParLoaded "+job.program) |
|
|
readedPar = job.loadParameter() |
|
|
readedPar = job.loadParameter() |
|
|
if readedPar is not None: |
|
|
if readedPar is not None: |
|
|
|
|
|
print(str(readedPar)) |
|
|
for k in readedPar["par"].keys(): |
|
|
for k in readedPar["par"].keys(): |
|
|
if not hasattr(self, k): |
|
|
if not hasattr(self, k): |
|
|
self.setJobAttr(k, readedPar["par"][k]) |
|
|
self.setJobAttr(k, readedPar["par"][k]) |
|
|