mirror of
https://github.com/odoo/runbot.git
synced 2025-03-19 09:25:46 +07:00
![]() rebase-and-merge (or squash-merge if pr.commits == 1) remains default, but there are use cases like forward ports (merge branch X into branch X+1 so that fixes to X are available in X+1) where we really really don't want to rebase the source. This commits implements two alternative merge methods: If the PR and its target are ~disjoint, perform a straight merge (same as old default mode). However if the head of the PR has two parents *and* one of these parents is a commit of the target, assume this is a merge commit to fix a conflict (common during forward ports as X+1 will have changed independently from and incompatibly with X in some ways). In that case, merge by copying the PR's head atop the target (basically rebase just that commit, only updating the link to the parent which is part of target so that it points to the head of target instead of whatever it was previously). |
||
---|---|---|
.. | ||
fake_github | ||
conftest.py | ||
local.py | ||
README.txt | ||
remote.py | ||
test_basic.py | ||
test_multirepo.py |
Execute this test suite using pytest. The default mode is to run tests locally using mock objects in place of github, see the docstring of remote.py for additional instructions to run against github "actual". Shared properties running tests, regardless of the github implementation: * test should be run from the root of the runbot repository providing the name of this module aka ``pytest runbot_merge`` or ``python -mpytest runbot_merge`` * a database name to use must be provided using ``--db``, the database should not exist beforehand * the addons path must be specified using ``--addons-path``, both "runbot" and the standard addons (odoo/addons) must be provided explicitly See pytest's documentation for other options, I would recommend ``-rXs``, ``-v`` and ``--showlocals``. When running "remote" tests as they take a very long time (hours) `-x` (aka ``--maxfail=1``) and ``--ff`` (run previously failed first) is also recommended unless e.g. you run the tests overnight.