fix(driver): remove pointless ATTACH_MODE config value

Removing `ATTACH_MODE` since as far as I can tell it's always `true`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-11-30 11:23:50 +01:00
parent 81fe247d5a
commit 917a4bfde1
2 changed files with 10 additions and 21 deletions

View File

@ -19,7 +19,3 @@ if APP_DIR is None:
if system.IS_WIN and 'bin' not in APP_DIR:
exit('Please use launcher from "bin" folder in "APP_DIR"')
APP_DIR = SystemPath(APP_DIR)
# Application will be stuck in test execution if set to False (Mac only)
# We need to investigate more time on it.
ATTACH_MODE = True

View File

@ -100,23 +100,16 @@ class AUT:
self.options = options
try:
self.port = local_system.find_free_port(configs.squish.AUT_PORT, 1000)
if configs.ATTACH_MODE:
SquishServer().add_attachable_aut(self.aut_id, self.port)
command = [
configs.testpath.SQUISH_DIR / 'bin' / 'startaut',
f'--port={self.port}',
f'"{self.path}"',
f'-d={self.app_data}',
f'--LOG_LEVEL={configs.testpath.LOG_LEVEL}',
options
]
self.pid = local_system.execute(command)
else:
SquishServer().add_executable_aut(self.aut_id, self.path.parent)
command = [self.aut_id, f'-d={self.app_data}']
self.ctx = squish.startApplication(' '.join(command), configs.timeouts.PROCESS_TIMEOUT_SEC)
self.pid = self.ctx.pid
SquishServer().add_attachable_aut(self.aut_id, self.port)
command = [
configs.testpath.SQUISH_DIR / 'bin' / 'startaut',
f'--port={self.port}',
f'"{self.path}"',
f'-d={self.app_data}',
f'--LOG_LEVEL={configs.testpath.LOG_LEVEL}',
options
]
self.pid = local_system.execute(command)
self.attach()
assert squish.waitFor(lambda: self.ctx.isRunning, configs.timeouts.PROCESS_TIMEOUT_SEC)
return self