Skip to content
Snippets Groups Projects
Commit d0359704 authored by John Chapman's avatar John Chapman
Browse files

Fix errors when running in athena config-only mode via a transform

Previously configuration-only unit tests of job transforms had
errors in their logs due to failed attempts to access the non-existant
output file. This change suppresses the problematic call in the case
that outputFileValidation is switched off. The change was made
in the individual transform files, so as not to alter the behaviour
for non-simulation transforms. It would be cleaner to tweak the
generateReport method of the `transform` module though.
parent bfd2c1ad
No related branches found
No related tags found
No related merge requests found
Showing
with 48 additions and 12 deletions
......@@ -31,7 +31,10 @@ def main():
trf = getTransform()
trf.parseCmdLineArgs(sys.argv[1:])
trf.execute()
trf.generateReport()
if 'outputFileValidation' in trf._argdict and trf._argdict['outputFileValidation'].value is False:
msg.info('Skipping report generation')
else:
trf.generateReport()
msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
sys.exit(trf.exitCode)
......
......@@ -35,7 +35,10 @@ def main():
trf = getTransform()
trf.parseCmdLineArgs(sys.argv[1:])
trf.execute()
trf.generateReport()
if 'outputFileValidation' in trf._argdict and trf._argdict['outputFileValidation'].value is False:
msg.info('Skipping report generation')
else:
trf.generateReport()
msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
sys.exit(trf.exitCode)
......
......@@ -34,7 +34,10 @@ def main():
trf = getTransform()
trf.parseCmdLineArgs(sys.argv[1:])
trf.execute()
trf.generateReport()
if 'outputFileValidation' in trf._argdict and trf._argdict['outputFileValidation'].value is False:
msg.info('Skipping report generation')
else:
trf.generateReport()
msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
sys.exit(trf.exitCode)
......
......@@ -34,7 +34,10 @@ def main():
trf = getTransform()
trf.parseCmdLineArgs(sys.argv[1:])
trf.execute()
trf.generateReport()
if 'outputFileValidation' in trf._argdict and trf._argdict['outputFileValidation'].value is False:
msg.info('Skipping report generation')
else:
trf.generateReport()
msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
sys.exit(trf.exitCode)
......
......@@ -37,7 +37,10 @@ def main():
trf = getTransform()
trf.parseCmdLineArgs(sys.argv[1:])
trf.execute()
trf.generateReport()
if 'outputFileValidation' in trf._argdict and trf._argdict['outputFileValidation'].value is False:
msg.info('Skipping report generation')
else:
trf.generateReport()
msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
sys.exit(trf.exitCode)
......
......@@ -30,7 +30,10 @@ def main():
trf = getTransform()
trf.parseCmdLineArgs(sys.argv[1:])
trf.execute()
trf.generateReport()
if 'outputFileValidation' in trf._argdict and trf._argdict['outputFileValidation'].value is False:
msg.info('Skipping report generation')
else:
trf.generateReport()
msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
sys.exit(trf.exitCode)
......
......@@ -36,7 +36,10 @@ def main():
trf = getTransform()
trf.parseCmdLineArgs(sys.argv[1:])
trf.execute()
trf.generateReport()
if 'outputFileValidation' in trf._argdict and trf._argdict['outputFileValidation'].value is False:
msg.info('Skipping report generation')
else:
trf.generateReport()
msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
sys.exit(trf.exitCode)
......
......@@ -36,7 +36,10 @@ def main():
trf = getTransform()
trf.parseCmdLineArgs(sys.argv[1:])
trf.execute()
trf.generateReport()
if 'outputFileValidation' in trf._argdict and trf._argdict['outputFileValidation'].value is False:
msg.info('Skipping report generation')
else:
trf.generateReport()
msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
sys.exit(trf.exitCode)
......
......@@ -38,7 +38,10 @@ def main():
trf = getTransform()
trf.parseCmdLineArgs(sys.argv[1:])
trf.execute()
trf.generateReport()
if 'outputFileValidation' in trf._argdict and trf._argdict['outputFileValidation'].value is False:
msg.info('Skipping report generation')
else:
trf.generateReport()
msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
sys.exit(trf.exitCode)
......
......@@ -30,7 +30,10 @@ def main():
trf = getTransform()
trf.parseCmdLineArgs(sys.argv[1:])
trf.execute()
trf.generateReport()
if 'outputFileValidation' in trf._argdict and trf._argdict['outputFileValidation'].value is False:
msg.info('Skipping report generation')
else:
trf.generateReport()
msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
sys.exit(trf.exitCode)
......
......@@ -37,7 +37,10 @@ def main():
trf = getTransform()
trf.parseCmdLineArgs(sys.argv[1:])
trf.execute()
trf.generateReport()
if 'outputFileValidation' in trf._argdict and trf._argdict['outputFileValidation'].value is False:
msg.info('Skipping report generation')
else:
trf.generateReport()
msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
sys.exit(trf.exitCode)
......
......@@ -37,7 +37,10 @@ def main():
trf = getTransform()
trf.parseCmdLineArgs(sys.argv[1:])
trf.execute()
trf.generateReport()
if 'outputFileValidation' in trf._argdict and trf._argdict['outputFileValidation'].value is False:
msg.info('Skipping report generation')
else:
trf.generateReport()
msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
sys.exit(trf.exitCode)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment