Skip to content

Commit

Permalink
allow to override cmssw branch
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Feb 19, 2018
1 parent 577b633 commit 0c1b892
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 12 additions & 3 deletions get-pr-branch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

from sys import exit, argv
from os.path import expanduser
from sys import exit, argv, path
from os.path import expanduser,dirname,abspath,join, exists
from github import Github
from socket import setdefaulttimeout
setdefaulttimeout(120)
Expand All @@ -26,4 +26,13 @@ if __name__ == "__main__":
if not o: o = CMSSW_DEVEL_BRANCH
print o
else:
print pr.base.ref
pr_branch = pr.base.ref
try:
SCRIPT_DIR = dirname(abspath(argv[0]))
repo_dir = join(SCRIPT_DIR,'repos',repo.replace("-","_"))
if exists(join(repo_dir,"repo_config.py")):
path.insert(0,repo_dir)
import repo_config
pr_branch = repo_config.PR_TEST_CMSSW_BRANCH[pr.base.ref]
except: pass
print pr_branch
4 changes: 4 additions & 0 deletions repos/cms_patatrack/cmssw/repo_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@
JENKINS_SLAVE_LABEL=""
#For cmsdist/cmssw repos , set it to False if you do not want to run standard cms pr tests
CMS_STANDARD_TESTS=True
#Map your branches with cmssw branches for tests
PR_TEST_CMSSW_BRANCH={
'CMSSW_10_1_X_Patatrack' : 'CMSSW_10_1_X'
}

0 comments on commit 0c1b892

Please sign in to comment.