[scripts/generate_result] add '-a/--auth' command-line option
This commit is contained in:
@@ -32,6 +32,9 @@ def generate_test_result(args):
|
||||
if args.only_matching:
|
||||
opts = meta = None
|
||||
else:
|
||||
if args.auth:
|
||||
cfg = util.path("archive", "config.json")
|
||||
config.load((cfg,), strict=True)
|
||||
if args.options:
|
||||
args.options_parsed = options = {}
|
||||
for opt in args.options:
|
||||
@@ -83,6 +86,9 @@ def generate_head(args):
|
||||
def generate_opts(args, urls, exc=None):
|
||||
opts = {}
|
||||
|
||||
if args.auth is not None:
|
||||
opts["#auth"] = args.auth
|
||||
|
||||
if args.options:
|
||||
opts["#options"] = args.options_parsed
|
||||
|
||||
@@ -157,6 +163,8 @@ def insert_test_result(args, result, lines):
|
||||
|
||||
def parse_args(args=None):
|
||||
parser = argparse.ArgumentParser(args)
|
||||
parser.add_argument("-a", "--auth", action="store_true", default=None)
|
||||
parser.add_argument("-A", "--no-auth", action="store_false", dest="auth")
|
||||
parser.add_argument("-c", "--comment", default=None)
|
||||
parser.add_argument("-C", dest="comment", action="store_const", const="")
|
||||
parser.add_argument("-g", "--git", action="store_true")
|
||||
|
||||
Reference in New Issue
Block a user