From 08483014988bcc7fc08e761be6fa55d3f331cc5f Mon Sep 17 00:00:00 2001 From: Anastasiya Semenkevich Date: Wed, 6 Mar 2024 16:41:54 +0300 Subject: [PATCH] chore: better dirs naming --- test/e2e/.gitignore | 1 + test/e2e/configs/testpath.py | 5 ++--- test/e2e/driver/aut.py | 4 ++-- test/e2e/requirements.txt | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test/e2e/.gitignore b/test/e2e/.gitignore index 2d8e833daf..90693b46e5 100644 --- a/test/e2e/.gitignore +++ b/test/e2e/.gitignore @@ -10,3 +10,4 @@ tmp/ *.DS_Store +/local run results/ diff --git a/test/e2e/configs/testpath.py b/test/e2e/configs/testpath.py index ae56ab46e8..46bd79166b 100644 --- a/test/e2e/configs/testpath.py +++ b/test/e2e/configs/testpath.py @@ -12,9 +12,8 @@ TEST_VP: typing.Optional[SystemPath] = None TEST_ARTIFACTS: typing.Optional[SystemPath] = None # Test Directories -RUN_ID = os.getenv('RUN_DIR', f'run_{datetime.now():%d%m%Y_%H%M%S}') -TEMP: SystemPath = ROOT / 'tmp' -RESULTS: SystemPath = TEMP / 'results' +RUN_ID = os.getenv('RUN_DIR', f'run_{datetime.today().strftime("%Y-%m-%d %H:%M:%S")}') +RESULTS: SystemPath = ROOT / 'local run results' RUN: SystemPath = RESULTS / RUN_ID VP: SystemPath = ROOT / 'ext' / 'vp' TEST_FILES: SystemPath = ROOT / 'ext' / 'test_files' diff --git a/test/e2e/driver/aut.py b/test/e2e/driver/aut.py index 30cce9c670..4b59d836a1 100644 --- a/test/e2e/driver/aut.py +++ b/test/e2e/driver/aut.py @@ -7,7 +7,7 @@ from PIL import ImageGrab import configs import driver -from os import path +import shortuuid from datetime import datetime from configs.system import IS_LIN from driver import context @@ -32,7 +32,7 @@ class AUT: self.pid = None self.port = None self.aut_id = f'AUT_{datetime.now():%H%M%S}' - self.app_data = configs.testpath.STATUS_DATA / f'app_{datetime.now():%H%M%S_%f}' + self.app_data = configs.testpath.STATUS_DATA / f'app_{shortuuid.ShortUUID().random(length=10)}' if user_data is not None: user_data.copy_to(self.app_data / 'data') self.options = '' diff --git a/test/e2e/requirements.txt b/test/e2e/requirements.txt index 0db3203e82..dc2009e789 100644 --- a/test/e2e/requirements.txt +++ b/test/e2e/requirements.txt @@ -11,3 +11,4 @@ pyperclip==1.8.2 pytest-rerunfailures==13.0 pytest-ignore-flaky==2.1.0 pytest-timeout==2.2.0 +shortuuid==1.0.12