Mercurial > hg > orthanc-tests
comparison Tests/Run.py @ 44:ffa542cce638
Toolbox.FindExecutable()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 27 Aug 2015 11:57:16 +0200 |
parents | f2dcf96fec51 |
children | 97acfdf0dbce |
comparison
equal
deleted
inserted
replaced
43:5f3bcdde2461 | 44:ffa542cce638 |
---|---|
24 import subprocess | 24 import subprocess |
25 import unittest | 25 import unittest |
26 import pprint | 26 import pprint |
27 | 27 |
28 from Tests import * | 28 from Tests import * |
29 from Toolbox import DoGet | 29 import Toolbox |
30 | 30 |
31 | 31 |
32 ## | 32 ## |
33 ## Parse the command-line arguments | 33 ## Parse the command-line arguments |
34 ## | 34 ## |
80 ## Generate the configuration file for the anciliary instance of | 80 ## Generate the configuration file for the anciliary instance of |
81 ## Orthanc | 81 ## Orthanc |
82 ## | 82 ## |
83 | 83 |
84 CONFIG = '/tmp/IntegrationTestsConfiguration.json' | 84 CONFIG = '/tmp/IntegrationTestsConfiguration.json' |
85 subprocess.check_call([ 'Orthanc', '--config=%s' % CONFIG ]) | 85 subprocess.check_call([ Toolbox.FindExecutable('Orthanc'), |
86 '--config=%s' % CONFIG ]) | |
86 | 87 |
87 with open(CONFIG, 'rt') as f: | 88 with open(CONFIG, 'rt') as f: |
88 config = f.read() | 89 config = f.read() |
89 | 90 |
90 if args.docker and args.server == 'localhost': | 91 if args.docker and args.server == 'localhost': |
134 | 135 |
135 | 136 |
136 print('Waiting for the internal Orthanc to start...') | 137 print('Waiting for the internal Orthanc to start...') |
137 while True: | 138 while True: |
138 try: | 139 try: |
139 DoGet(LOCAL, '/instances') | 140 Toolbox.DoGet(LOCAL, '/instances') |
140 break | 141 break |
141 except: | 142 except: |
142 time.sleep(0.1) | 143 time.sleep(0.1) |
143 | 144 |
144 | 145 |