Mercurial > hg > orthanc-tests
diff PerfsDb/TestConfig.py @ 161:27b3b0df5f90
2 upload tests
author | am@osimis.io |
---|---|
date | Fri, 17 Aug 2018 17:24:11 +0200 |
parents | 6995d5d12d88 |
children | 53575aa2614b |
line wrap: on
line diff
--- a/PerfsDb/TestConfig.py Fri Aug 17 16:17:57 2018 +0200 +++ b/PerfsDb/TestConfig.py Fri Aug 17 17:24:11 2018 +0200 @@ -42,7 +42,7 @@ if self._dbServer is not None: self._dbServer.launch() - def launchOrthanc(self, orthancPath) -> bool: + def launchOrthanc(self, orthancPath, verboseEnabled: bool=False, traceEnabled: bool=False) -> bool: orthanc = OrthancClient("http://127.0.0.1:8042") print("Checking if Orthanc is already running") @@ -51,10 +51,16 @@ return False print("Launching Orthanc") - self._orthancProcess = subprocess.Popen([ + runOrthancCommand = [ os.path.join(orthancPath, "Orthanc"), os.path.join(os.path.abspath(os.path.dirname(__file__)), "ConfigFiles", self.label + ".json"), - ]) + ] + if traceEnabled: + runOrthancCommand.append("--trace") + elif verboseEnabled: + runOrthancCommand.append("--verbose") + + self._orthancProcess = subprocess.Popen(runOrthancCommand) print("Waiting for Orthanc to start") orthanc.waitStarted(timeout=30)