mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[ADD] warning levels in tests
This commit is contained in:
parent
e49cde3032
commit
81a66c4a78
@ -409,7 +409,7 @@ class runbot_build(osv.osv):
|
||||
'author': fields.char('Author'),
|
||||
'subject': fields.text('Subject'),
|
||||
'sequence': fields.integer('Sequence'),
|
||||
'result': fields.char('Result'), # ok, ko, skipped
|
||||
'result': fields.char('Result'), # ok, ko, warn, skipped
|
||||
'pid': fields.integer('Pid'),
|
||||
'state': fields.char('Status'), # pending, testing, running, done
|
||||
'job': fields.char('Job'), # job_*
|
||||
@ -608,12 +608,16 @@ class runbot_build(osv.osv):
|
||||
log_time = time.localtime(os.path.getmtime(log_all))
|
||||
v = {
|
||||
'job_end': time.strftime(openerp.tools.DEFAULT_SERVER_DATETIME_FORMAT, log_time),
|
||||
'result': 'ko',
|
||||
}
|
||||
if grep(log_all, "openerp.modules.loading: Modules loaded."):
|
||||
if not grep(log_all, "FAIL"):
|
||||
if not grep(build.path("openerp/test/common.py"), "post_install") or grep(log_all, "Initiating shutdown."):
|
||||
v['result'] = "ok"
|
||||
if grep(log_all, "FAIL"):
|
||||
v['result'] = "ko"
|
||||
elif grep(log_all, "WARNING"):
|
||||
v['result'] = "warn"
|
||||
elif not grep(build.path("openerp/test/common.py"), "post_install") or grep(log_all, "Initiating shutdown."):
|
||||
v['result'] = "ok"
|
||||
else:
|
||||
v['result'] = "ko"
|
||||
build.write(v)
|
||||
build.github_status()
|
||||
|
||||
|
@ -208,7 +208,7 @@
|
||||
<t t-if="bu.state=='pending'"><i class="text-default fa fa-pause"/> pending</t>
|
||||
<t t-if="bu.state=='testing'"><i class="text-info fa fa-spinner"/> testing <t t-esc="bu.job[4:]"/> <small><t t-esc="s2h(bu.job_time)"/></small></t>
|
||||
<t t-if="bu.result=='ok'"><i class="text-success fa fa-thumbs-up"/><small> age <t t-esc="s2h(bu.job_age)"/> time <t t-esc="s2h(bu.job_time)"/></small></t>
|
||||
<t t-if="bu.result=='ko'"><i class="text-danger fa fa-thumbs-down"/><small> age <t t-esc="s2h(bu.job_age)"/> time <t t-esc="s2h(bu.job_time)"/></small></t>
|
||||
<t t-if="bu.result=='ko' || bu.result=='warn'"><i class="text-danger fa fa-thumbs-down"/><small> age <t t-esc="s2h(bu.job_age)"/> time <t t-esc="s2h(bu.job_time)"/></small></t>
|
||||
<t t-if="bu.result=='skipped'"><i class="text-danger fa fa-ban"/> skipped</t>
|
||||
</template>
|
||||
|
||||
@ -341,6 +341,7 @@
|
||||
<t t-if="bu.state=='pending'"><t t-set="klass">default</t></t>
|
||||
<t t-if="bu.state=='testing'"><t t-set="klass">info</t></t>
|
||||
<t t-if="bu.state in ['running','done'] and bu.result == 'ko'"><t t-set="klass">danger</t></t>
|
||||
<t t-if="bu.state in ['running','done'] and bu.result == 'warn'"><t t-set="klass">warning</t></t>
|
||||
<t t-if="bu.state in ['running','done'] and bu.result == 'ok'"><t t-set="klass">success</t></t>
|
||||
<t t-if="bu.state in ['running','done'] and bu.result == 'skipped'"><t t-set="klass">default</t></t>
|
||||
<td t-attf-class="{{klass}}">
|
||||
|
Loading…
Reference in New Issue
Block a user