if self.options.list_steps:
self.init_steps()
self.list_steps()
- return True
+ return 'SUCCESS'
# steps
if not self.options.steps:
self.options.exclude = [ step.replace('-','_') for step in self.options.exclude ]
self.options.ignore = [ step.replace('-','_') for step in self.options.ignore ]
+ # technicality, decorate known steps to produce the '_ignore' version
TestPlc.create_ignore_steps()
# exclude
skip_step=True
elif answer in ['q','b']: # quit/bye
print 'Exiting'
- return
+ return 'FAILURE'
elif answer in ['d']: # dry_run
dry_run=self.options.dry_run
self.options.dry_run=True
if __name__ == "__main__":
exit_code = TestMain().main()
print 'run_log is exiting',exit_code
- sys.exit(TestMain().main())
+ sys.exit(exit_code)
class slice_mapper__tasks (object):
# could not get this to work with named arguments
def __init__ (self,timeout_minutes,silent_minutes,period_seconds):
- print "timeout_minutes,silent_minutes,period_seconds",timeout_minutes,silent_minutes,period_seconds
self.timeout=timedelta(minutes=timeout_minutes)
self.silent=timedelta(minutes=silent_minutes)
self.period=timedelta(seconds=period_seconds)
rm -f logs/success
rm -f logs/$runlast; (cd logs; ln -s $runfile $runlast)
rm -f logs/$tracelast; (cd logs; ln -s $tracefile $tracelast)
-python -u TestMain.py -t logs/$tracefile "$@" &> logs/$runfile && touch logs/success
+python -u TestMain.py -t logs/$tracefile "$@" &> logs/$runfile ; retcod=$?
cat logs/$runfile
+[ "$retcod" == 0 ] && touch logs/success
-if [ -f logs/success ] ; then
- exit 0
-else
- exit 1
-fi
+echo "run_log is exiting" $retcod
+exit $retcod