Skip to content

[cmake] Clone the corresponding roottest branch, if latest-stable has been checked out for root#9025

Merged
jalopezg-git merged 2 commits intoroot-project:masterfrom
jalopezg-git:roottest-latest-stable
Sep 26, 2021
Merged

[cmake] Clone the corresponding roottest branch, if latest-stable has been checked out for root#9025
jalopezg-git merged 2 commits intoroot-project:masterfrom
jalopezg-git:roottest-latest-stable

Conversation

@jalopezg-git
Copy link
Copy Markdown
Contributor

@jalopezg-git jalopezg-git commented Sep 23, 2021

This pull-request fixes a couple of issues related to roottest branch sync'ing. See issue #8783 for more information.

Changes or fixes:

  • Checkout the correct roottest head/tag if root is at latest-stable. If the current checked out branch is latest-stable, resolve it to the latest merged head/tag (i.e. second parent of latest-stable), and use that to clone roottest. These two commands illustrate the proposed behavior:
$ git for-each-ref --points-at=latest-stable^2 --format=%(refname:short)
v6-24-06
$ git clone -b v6-24-06 https://github.com/root-project/roottest.git
  • If the checked out ref in root is a tag (e.g. as a result of $ git checkout v6-24-06), roottest is not cloned at the expected revision. The previous implementation relied on git rev-parse --abbrev-ref HEAD to get the name of the checked out branch. While this works for branch heads, it fails for tags, i.e.
$ git checkout v6-24-06
HEAD is now at 3b796f86a3 "Update ROOT version files to v6.24/06."
$ git rev-parse --abbrev-ref HEAD
HEAD

The proposed solution in this case is to use git for-each-ref (or alternatively git describe), i.e.

$ git for-each-ref --points-at=HEAD --format='%(refname:short)'
v6-24-06

Checklist:

  • tested changes locally

This PR fixes #8783.

…-stable

If the current checked out branch is `latest-stable`, resolve it to the latest
merged head/tag (i.e. latest-stable^2), and use that to clone `roottest`, e.g.

```
$ git for-each-ref --points-at=latest-stable^2 --format=%(refname:short)
v6-24-06
$ git clone -b v6-24-06 https://github.com/root-project/roottest.git
```

Closes issue root-project#8783.
If the checked out ref in `root` is a tag, `roottest` is not cloned at the
expected revision, i.e. current implementation only works for heads.  This
commit fixes the issue.
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Copy Markdown

Build failed on mac11.0/cxx17.
Running on macphsft23.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link
Copy Markdown

Build failed on windows10/cxx14.
Running on null:C:\build\workspace\root-pullrequests-build
See console output.

Failing tests:

Copy link
Copy Markdown
Member

@amadio amadio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jalopezg-git
Copy link
Copy Markdown
Contributor Author

@phsft-bot build just on windows10/cxx14

@phsft-bot
Copy link
Copy Markdown

Starting build on windows10/cxx14
How to customize builds

Copy link
Copy Markdown
Member

@bellenot bellenot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jalopezg-git jalopezg-git merged commit cbe17db into root-project:master Sep 26, 2021
@jalopezg-git jalopezg-git deleted the roottest-latest-stable branch September 26, 2021 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Branch sync of roottest broken for latest-stable

4 participants