comparison Tests/Run.py @ 342:bf8369ea3ff1

more tests of webdav
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 15 Oct 2020 17:34:01 +0200
parents da2be3ff2db5
children 79ce0f7a9714
comparison
equal deleted inserted replaced
341:66a36befb208 342:bf8369ea3ff1
57 help = 'Password to the REST API') 57 help = 'Password to the REST API')
58 parser.add_argument('--force', help = 'Do not warn the user', 58 parser.add_argument('--force', help = 'Do not warn the user',
59 action = 'store_true') 59 action = 'store_true')
60 parser.add_argument('--docker', help = 'These tests are run from Docker', 60 parser.add_argument('--docker', help = 'These tests are run from Docker',
61 action = 'store_true') 61 action = 'store_true')
62 parser.add_argument('--orthanc',
63 default = 'Orthanc',
64 help = 'Path to the executable of Orthanc')
62 parser.add_argument('options', metavar = 'N', nargs = '*', 65 parser.add_argument('options', metavar = 'N', nargs = '*',
63 help='Arguments to Python unittest') 66 help='Arguments to Python unittest')
64 67
65 args = parser.parse_args() 68 args = parser.parse_args()
66 69
81 ## Generate the configuration file for the anciliary instance of 84 ## Generate the configuration file for the anciliary instance of
82 ## Orthanc 85 ## Orthanc
83 ## 86 ##
84 87
85 CONFIG = '/tmp/IntegrationTestsConfiguration.json' 88 CONFIG = '/tmp/IntegrationTestsConfiguration.json'
86 subprocess.check_call([ Toolbox.FindExecutable('Orthanc'), 89 subprocess.check_call([ Toolbox.FindExecutable(args.orthanc),
87 '--config=%s' % CONFIG ]) 90 '--config=%s' % CONFIG ])
88 91
89 with open(CONFIG, 'rt') as f: 92 with open(CONFIG, 'rt') as f:
90 config = f.read() 93 config = f.read()
91 94
111 114
112 with open(CONFIG, 'wt') as f: 115 with open(CONFIG, 'wt') as f:
113 f.write(config) 116 f.write(config)
114 117
115 localOrthanc = ExternalCommandThread([ 118 localOrthanc = ExternalCommandThread([
116 'Orthanc', 119 Toolbox.FindExecutable(args.orthanc),
117 CONFIG, 120 CONFIG,
118 #'--verbose', 121 #'--verbose',
119 #'--no-jobs' 122 #'--no-jobs'
120 #'/home/jodogne/Subversion/Orthanc/i/Orthanc', CONFIG, '--verbose' 123 #'/home/jodogne/Subversion/Orthanc/i/Orthanc', CONFIG, '--verbose'
121 ]) 124 ])
122 125