log.exitcode = ret
log.stdout = output
log.message = ''
- if ret != 0:
- if os.path.exists("_canttest"):
- log.message = file("_canttest").read()
- log.canttest = 1
- elif os.path.exists("_error"):
+ if os.path.exists("_canttest"):
+ log.message = file("_canttest").read()
+ log.canttest = 1
+ ret = 2 # If Makefile sets canttest, override the exit code which might be zero
+ log.exitcode = ret
+ elif ret != 0:
+ if os.path.exists("_error"):
log.message = file("_error").read()
return ret
print " ",os.environ['OMK_RULES'],
sys.stdout.flush()
ret = self._exec(log)
- if ret == 0: retstr = "OK"
- elif log.canttest: retstr = "--"
+ if log.canttest: retstr = "--"
+ elif ret == 0: retstr = "OK"
else: retstr = "FAILED"
print "%*s%s" % (20-len(os.environ['OMK_RULES']), "", retstr)