Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit e3720d9

Browse files
committed
option to skip test jobs
1 parent df8a13a commit e3720d9

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

runbot_build_instructions/runbot_build.py

+21
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,27 @@ def job_00_init(self, cr, uid, build, lock_path, log_path):
6969
build.prebuilt = True
7070
return res
7171

72+
def job_10_test_base(self, cr, uid, build, lock_path, log_path):
73+
if build.branch_id.repo_id.skip_test_jobs:
74+
_logger.info('skipping job_10_test_base')
75+
return -2
76+
else:
77+
return super(runbot_build, self).job_10_test_base(
78+
cr, uid, build, lock_path, log_path
79+
)
80+
81+
def job_20_test_all(self, cr, uid, build, lock_path, log_path):
82+
if build.branch_id.repo_id.skip_test_jobs:
83+
_logger.info('skipping job_20_test_all')
84+
with open(log_path, 'w') as f:
85+
f.write('consider tests as passed: '
86+
'.modules.loading: Modules loaded.')
87+
return -2
88+
else:
89+
return super(runbot_build, self).job_20_test_all(
90+
cr, uid, build, lock_path, log_path
91+
)
92+
7293
def sub_cmd(self, build, cmd):
7394
if not cmd:
7495
return []

runbot_build_instructions/runbot_repo.py

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
class RunbotRepo(models.Model):
3737
_inherit = "runbot.repo"
3838
is_custom_build = fields.Boolean('Custom Build')
39+
skip_test_jobs = fields.Boolean('Skip standard test jobs')
3940
custom_build_dir = fields.Char(
4041
'Custom Build Directory',
4142
help="Relative directory where repo will be checked out"

runbot_build_instructions/runbot_repo_view.xml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<group string="Params" position="after">
1313
<group name="custom">
1414
<field name="is_custom_build"/>
15+
<field name="skip_test_jobs"/>
1516
<field name="custom_build_dir" attrs="{'invisible': [('is_custom_build', '=', False)]}"/>
1617
<field name="custom_server_path" attrs="{'invisible': [('is_custom_build', '=', False)], 'required': [('is_custom_build', '=', True)]}"/>
1718
<field name="custom_server_params" attrs="{'invisible': [('is_custom_build', '=', False)]}"/>

0 commit comments

Comments
 (0)