From 917a4bfde17706f2ff157d588969aad202bb9bc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Thu, 30 Nov 2023 11:23:50 +0100 Subject: [PATCH] fix(driver): remove pointless ATTACH_MODE config value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removing `ATTACH_MODE` since as far as I can tell it's always `true`. Signed-off-by: Jakub SokoĊ‚owski --- test/e2e/configs/__init__.py | 4 ---- test/e2e/driver/aut.py | 27 ++++++++++----------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/test/e2e/configs/__init__.py b/test/e2e/configs/__init__.py index 79ebe71721..c8a0969b9d 100644 --- a/test/e2e/configs/__init__.py +++ b/test/e2e/configs/__init__.py @@ -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 diff --git a/test/e2e/driver/aut.py b/test/e2e/driver/aut.py index a7b1c25291..48dcf85f30 100644 --- a/test/e2e/driver/aut.py +++ b/test/e2e/driver/aut.py @@ -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