Age | Commit message (Collapse) | Author |
|
In some cases it is useful to force rebuilding of the integration tree.
Add option for force-rebuilding the integ.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
If there are two remotes and one of their remote names matches another
one as a regexp pattern, then it will not be added as a new remote.
This condition is met, when one remote name is a substring of another,
and it may result in a missing merge of a remote branch.
The problem is encountered by me, but the fix is attributed to Dmitry
Baryshkov.
Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
The purpose of this function is to remove remotes from the local trees
if they have been removed from the config file.
It is broken since 2ebf50e36955 (ci-merge: Add missing -q to grep when
searching for old branches). When we have -q everywhere like:
echo $LINE | grep -q "^$REMOTE_NAME\b" | grep -q $REMOTE_URL | grep -q "$REMOTE_BRANCH"
Then it will *always* be false, since the first grep command will
return an empty string.
What we really wanted to do is to find a remote in the local tree
which is *not* in the config, so that we can simply remove it. We
don't even need to look/match for branches, e.g. if we have a remote
with the same name and the same url, then it's found, and we can keep
it in case it's in the config file.
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
To avoid errors when more than one branch is get in REMOTE_BRANCH.
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Fixes multiple messages of,
...
grep: integration-linux-qcomlt-20180420-210521-999f6879aa74: No such file or directory
...
Example:
https://ci.linaro.org/job/lt-qcom-linux-automerge/722/consoleFull
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Describe how we share the rerere cache in the team
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
We no longer spawn a new terminal for 'git mergetool'. Remove the function
that tried to find a suitable terminal
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Random bunch of fixes to make the output a bit nicer to read
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Instead of trying to guess whether we're running interactively by checking
DISPLAY variable and other tricks, make non-interactive mode as default and
add a new config option for interactive mode.
mergetool will only be invoked in interactive mode.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Instead of creating an abundance of directories in /tmp, clone the rr-cache
into .automerge/rr-cache and symlink it into .git/rr-cache.
After running ci-merge a new commit is created in the rr-cache git, which
for now needs to be pushed manually to the shared rerere cache.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
[Manually applied the patch to master]
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Add support for local overrides in order to be able to rebase branches
and iteratively try to build up and test the merged branch. Each remote
being merged in can be overridden by a local branch named
"override/<remote>"
This makes it possible to create a bunch of local override branches,
prepare the rr-cache, build, boot test and then push all pieces at once.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Rather than depending on ci-config being available in the path, just allow
--config to be specified directly with ci-merge.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
[Refactor for master branch]
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Allow running mergetool in a non-windowing environment, by spawning
mergetool inline from the script. We no longer need to guess what terminal
might be installed on the system.
As the config file is fed line by line into the while loop we need to dup
the original stdin, or the spawned mergetool will read stdin from the
config file.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
[refactored to master]
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
The example CONFIG_PATH in the README refers to a directory,
when it should refer to a file.
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
'git describe' provides a better string to describe the branch, and for example
it would show the kernel version, assuming that Linus' tags have been
fetched. It makes it much simpler to look at branch history.
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
merge.conflictstyle can be either 'merge' or 'diff3'. When using 'diff3' there
is more context information provided by git for each merge conflict. While git
rerere will try to be smart to discard the additional data about 'common
ancestor', it is possible that the conflict left when making the same merge are
actually different when using these two conflict styles.
IOW, if the merge produces
<<<
side A
|||
common
===
side B
>>>
when diff3 style is chosen, but if the same merge results in
<<<
side A'
===
side B'
>>>
where side A' is not identical to side A (or B' and B are not
identical), then we will fail to find the previously recorded
resolution.
as discussed here: https://marc.info/?l=git&m=153003225927418&w=2
So basically, it's safer to force a specific merge conflcit style in automerge
to avoid this type of issues, especially when sharing a rr-cache within the
team.
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Acked-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
REMOTE_REPO and RR_CACHE can be made optional, so remove their default values
and make code that depends on them conditional on their being defined. This
allows someone to to locally run ci-merge without any rerere cache and
without requiring to push anything to a remote repository.
This CHANGES the default behaviour of ci-merge to require the -r and -c
options for REMOTE_REPO and RR_CACHE respectively.
To make things more robust, add a new function to check if repos specified
on the cmdline exist. We end up with some strange errors because we don't
error out early enough currently.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
The right behaviour is to exit when a merge fails instead
of continue to avoid spend time.
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Tested-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Used to handle when a merge conflict is resolved by rerere
should be ok to commit without any edit/add.
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
If a merge conflict is resolved by rerere auto add the files
to commit later.
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
'git remote show <remote name>' queries the remote server which takes a bit
of time. This makes the do_remove_old() operation very slow when you have
several branches being merged in the config file.
Since we check the REMOTE_NAME, REMOTE_URL, REMOTE_BRANCH of each line in
the config file against pre-configured remotes, we can safely query only
the local cache aka .git/config for these values instead of contacting the
server each time. Making this assumption significantly speeds up the
operation.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
grep'ping for regexes and piping the result for further munging can be
prone to breakage. As of Git 2.7, git remote get-url is officially
supported. Use it.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Pre-populates .git/rr-cache in the local tree with previous merge conflict
resolutions so that they can be shared across teams.
We currently don't push any new conflict resolutions directly to this
global rerere cache. That is left as an exercise for the user.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Acked-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
|
|
We can't proceed with a local tree that has any changes. Either offer to
clean them out, or abort and let the user clean them.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
|
|
If DISPLAY isn't set (user intervention), don't try
to make a conflict resolution and abort merge.
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Amit Kucheria <amit.kucheria@linaro.org>
|
|
When a new integ branch is made the old one is renamed to keep
history so push it also in remote repository.
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
|
|
This allows the environment variables to be set on the commandline
before calling the scripts.
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
|
|
Also change the hash to append an abbreviated hash to make it shorter
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
|
|
This defaults to whatever is the default terminal on the machine, which is
likely to be better set up for colors, fonts, keybindings, etc. For
example, the default xterm just looks ugly on my machine.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
|
|
We're printing REMOTE_BRANCH and REMOTE_URL but those are not set in the
function, fix that.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
|
|
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
|
|
to a more generic one.
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
|
|
With the current code, we consider the baseline as one regular remote but
that is not true as we have specific policy for modified and updated baseline
(tag or commit-id changes). That triggers multiple times an update of the CI
loop for the same commit-id as it is assumed we have a remote branch updated
when the baseline is changed (and we want to track per tag).
Fix this by discarding the baseline when updating the remotes.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Currently the script only works on the current directory, as the
local repository option is not set at the right moment.
Fix this by adding a setup path function to move the current directory
to the place set by the -l option or by default
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Depending on the passed option, we check against the last commit
id or the last tag change on the specified branch.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
We want to track the changes on HEAD or on the latest tag change.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
... and call it from the big setup function
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
This change group all setup functions into a bigger one which make
sure the underlying functions are called in the right order.
The baseline branch name is retrieved from the configuration file
in order to get the tag from the branch itself and not in a global
manner. That will allow to specify if we track <branch>/HEAD or
<branch>/TAG change.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
The usage of the name BASELINE_BRANCH is inadequate because it is a remote
repository, not a branch. As we will need to specify a branch to track the
baseline branch (which is today 'master' of Linus's tree), let's rename the
variable to its real name.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
In order to deal with generic code, we have to encapsulate the get
last tag into a function because the rule will be different on an
Android tree and we will have to deal the latest commit id.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Add options parsing in order to make the script more flexible for android
integration tree. Keep the default value to the current ones, so no
breakage will happen when installing the script.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
|
|
Launch some tests when kernelci doesn't report any errors linked to one of
our dev branches.
pmwg-ci_report will return 0 only if everything is ok for launching test:
- tests have not been done yet
- kernelci report for the branch is available
- No error reported by kernelci
When everything is correct, pmwg-ci launches ktest that will build the
kernel for our test platform, test that our platfrom boots correctly
with the kernel and then launch Workload Automation. The current yalm
agenda is simple and only runs hackbench cyclictest and ebizzy
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
|
|
url has changed when kernelci came back online after some maintenances
|