prscript: add --norebase option

If --norebase option is provided, the prscript will start a build
that can be used to check if an out-of-sync branch pass the test.
pull/758/head
Eric Leblond 13 years ago committed by Victor Julien
parent 4d6b48ea9e
commit 55108167e5

@ -35,6 +35,7 @@ parser.add_argument('-u', '--username', dest='username', help='github and buildb
parser.add_argument('-p', '--password', dest='password', help='buildbot password')
parser.add_argument('-c', '--check', action='store_const', const=True, help='only check last build', default=False)
parser.add_argument('-v', '--verbose', action='store_const', const=True, help='verbose output', default=False)
parser.add_argument('--norebase', action='store_const', const=True, help='do not test if branch is in sync with master', default=False)
parser.add_argument('-r', '--repository', dest='repository', default='suricata', help='name of suricata repository on github')
parser.add_argument('branch', metavar='branch', help='github branch to build')
args = parser.parse_args()
@ -132,8 +133,11 @@ def WaitForBuildResult(builder, buildid, extension=""):
print "Build failure: " + BUILDERS_URI + username + extension + '/builds/' + str(buildid)
return res
# check that github branch and inliniac master branch are sync
# check that github branch and inliniac master branch are sync
if TestRepoSync(args.branch) == -1:
if args.norebase:
print "Branch " + args.branch + " is not in sync with inliniac's master branch. Continuing due to --norebase option."
else:
print "Branch " + args.branch + " is not in sync with inliniac's master branch. Rebase needed."
sys.exit(-1)
@ -183,6 +187,7 @@ if buildidpcap != -1:
res += WaitForBuildResult(username, buildidpcap, extension="-pcap")
if res == 0:
if not args.norebase:
print "You can copy/paste following lines into github PR"
print "- PR build: " + BUILDERS_URI + username + "/builds/" + str(buildid)
print "- PR pcaps: " + BUILDERS_URI + username + "-pcap/builds/" + str(buildidpcap)

Loading…
Cancel
Save