prscript: improve command line

You can now directly access to docker related command:

 qa/prscript.py -C # create container
 qa/prscript.py -s # start container
 qa/prscript.py -S # stop container

The build option does not change:

 qa/prscript.pu -l -d MY_BRANCH # build test of branch MY_BRANCH
pull/1405/head
Eric Leblond 11 years ago committed by Victor Julien
parent fe45f2a342
commit 8a0ebc4ade

@ -65,19 +65,23 @@ if GOT_DOCKER:
parser.add_argument('-C', '--create', action='store_const', const=True, help='create docker container', default=False)
parser.add_argument('-s', '--start', action='store_const', const=True, help='start docker container', default=False)
parser.add_argument('-S', '--stop', action='store_const', const=True, help='stop docker container', default=False)
parser.add_argument('branch', metavar='branch', help='github branch to build')
parser.add_argument('branch', metavar='branch', help='github branch to build', nargs='?')
args = parser.parse_args()
username = args.username
password = args.password
cookie = None
if GOT_DOCKER:
if args.create or args.start or args.stop:
args.docker = True
args.local = True
if args.docker:
BASE_URI="http://localhost:8010/"
BUILDERS_LIST = ["gcc", "clang", "debug", "features", "profiling", "pcaps"]
else:
BUILDERS_LIST = [username, username + "-pcap"]
BUILDERS_URI=BASE_URI+"builders/"
JSON_BUILDERS_URI=BASE_URI+"json/builders/"
@ -244,6 +248,10 @@ if GOT_DOCKER:
if args.stop:
StopContainer()
if not args.branch:
print "You need to specify a branch for this mode"
sys.exit(-1)
# submit buildbot form to build current branch on the devel builder
if not args.check:
if not args.docker:

Loading…
Cancel
Save