Mercurial > hg > orthanc-tests
comparison GenerateConfigurationForTests.py @ 31:e07deb07289d
path to plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 03 Jul 2015 11:10:24 +0200 |
parents | 8f4b70c89467 |
children | f2dcf96fec51 |
comparison
equal
deleted
inserted
replaced
30:1f8d1f64e5d1 | 31:e07deb07289d |
---|---|
37 help = 'Configuration file to generate') | 37 help = 'Configuration file to generate') |
38 | 38 |
39 parser.add_argument('--force', | 39 parser.add_argument('--force', |
40 help = 'Overwrite the file even if it already exists', | 40 help = 'Overwrite the file even if it already exists', |
41 action = 'store_true') | 41 action = 'store_true') |
42 | |
43 parser.add_argument('--plugins', | |
44 help = 'Add a path to a folder containing plugins') | |
42 | 45 |
43 args = parser.parse_args() | 46 args = parser.parse_args() |
44 | 47 |
45 | 48 |
46 ## | 49 ## |
83 (ip, 5000, 'alice', 'orthanctest'), config) | 86 (ip, 5000, 'alice', 'orthanctest'), config) |
84 | 87 |
85 # Enable case-insensitive PN (the default on versions <= 0.8.6) | 88 # Enable case-insensitive PN (the default on versions <= 0.8.6) |
86 config = re.sub(r'("CaseSensitivePN"\s*:)\s*true', r'\1 false', config) | 89 config = re.sub(r'("CaseSensitivePN"\s*:)\s*true', r'\1 false', config) |
87 | 90 |
91 if args.plugins != None: | |
92 config = re.sub(r'("Plugins"\s*:\s*\[)', r'\1 "%s"' % args.plugins, config) | |
93 | |
94 | |
88 with open(args.target, 'wt') as f: | 95 with open(args.target, 'wt') as f: |
89 f.write(config) | 96 f.write(config) |
90 | 97 |